This is a utility procedure that permits you retarget all synonyms in a file to point to a different server/database. The procedure finds the synonyms in abasysobjects, and then looks up the defintions in sys.synonyms. It removes any current server/database part and drops and recreates the synonyms with the new definition. The procedure is careful to preserve permissions granted on the synonyms. The procedure produces a result set with the new synonym definitions.
Synonym definitions that start with a number sign (#) are not affected.
Parameters: @subsystem ap_subsystem -- The subsystem for the synonym file. @filename ap_filename -- The name of the file that defines the synonyms. @dbname sysname -- The name of the new target database. Specify '' or NULL for the current database. @server sysname -- Name of linked server where the target object exists, if any. There is a default of NULL. |
|
|
|