SYSTEM$ZEROCOPY_SWAP_IMPORTED_DB_WITH_CLD

functionnot supportedCore SQL functions

docs.snowflake.com ↗

System functions

Exchanges the names of a database that was created from a legacy Salesforce data share and a catalog-linked database that was created from a Salesforce Zero-Copy connector. Use this function to move queries and references from the legacy database to the catalog-linked database without changing the names that they use.

Syntax

SYSTEM$ZEROCOPY_SWAP_IMPORTED_DB_WITH_CLD('<imported_db>', '<cld_db>')

Parameters

NameRequiredDescription
imported_dbrequiredThe name of the database that was created from a share. Specify it as a string literal. A fully qualified name isn’t needed, because database names are unique.
cld_dbrequiredThe name of the catalog-linked database that was created from a Salesforce Zero-Copy connector, as a string literal.

Returns

Returns a string that confirms the swap.

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object OWNERSHIP | The database that was created from a share (imported_db). OWNERSHIP | The catalog-linked database (cld_db). For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.