The SYSPROC.ADMIN_COPY_SCHEMA () procedure

With the SYSPROC.ADMIN_COPY_SCHEMA () procedure, you can copy a specific database schema and associated objects to a new target schema by using the same object names as in the source schema, but with the target schema qualifier. The simple syntax for the copy a schema DEMO into DEMO2 using the copy procedure is as follows:

CALL SYSPROC.ADMIN_COPY_SCHEMA ('DEMO', 'DEMO2', 'COPY', NULL, '', ' ', 'ERRORSCHEMA', 'ERRORNAME'); Value of output parameters -------------------------- Parameter Name : ERRORTABSCHEMA Parameter Value : - Parameter Name : ERRORTABNAME Parameter Value : - Return Status = 0 -- List of tables in schema DEMO LIST TABLES FOR SCHEMA DEMO; Table/View Schema Type Creation time ------------------------------- ...

Get IBM Db2 11.1 Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.