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.
↧