April 2, 2012 at 3:26 am
Dear All,
I wanted to know if there are any was of scripting Synonyms and also recreating users after Restoring Databases instead of recreating them individually please?
Thanks in advance!
April 2, 2012 at 8:59 am
I'm not exactly sure what you are looking for in terms of logins, but this article may help: http://support.microsoft.com/kb/246133
For scripting synonyms... You mean scripting them out of the current database so that you can create them on another?
Jared
CE - Microsoft
April 2, 2012 at 9:02 am
sp_help_revlogin maybe what your looking for see this for more details:
April 2, 2012 at 9:03 am
opps sorry for re-posting the same thing :-p
April 2, 2012 at 9:05 am
If you are looking to generate scripts for your existing synonyms, try working with this:
SELECT 'CREATE SYNONYM ' + name + ' FOR ' + base_object_name
FROM sys.synonyms
Jared
CE - Microsoft
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply