Quantcast
Channel: Questions in topic: "synonyms"
Viewing all articles
Browse latest Browse all 14

Create synonyms for all the objects in a database.

$
0
0
Hi, I was looking for a script to create synonyms for all the objects( User defined Views, functions, stored procedures, Tables) in a database. A script which would run a cursor through the sysobjects finding the object name and print me an output... create synonym for Databasename.schemaname.objectname Example: create SYNONYM RiverCities for RiverResearch.River.Cities and the query to select distinct object types being select name from sysobjects where xtype = 'P' returns the name of all the user defined stored procedures Thanks in advance.

Viewing all articles
Browse latest Browse all 14

Trending Articles