| Author |
Topic  |
|
|
WJHamel
Aged Yak Warrior
USA
614 Posts |
Posted - 02/14/2013 : 12:05:20
|
| so a complaint comes my way that, when we're backing up application databases, that the backups are not capturing additional needed data such as user accounts, permission, DTS information. In most cases, these application database backups are restored to new servers with new SQL 05 or 08R2 instances. What suggestions are there for capturing the additional data needed when we run these backups? I'm guessing a "generate scripts" option on the database and generating those scripts for the needed objects and then packaging those up in an SSIS package to restore before the db's are restored to the new machine? yes/no? |
|
|
srimami
Posting Yak Master
151 Posts |
Posted - 02/14/2013 : 18:37:26
|
You have to run another script to capture this information when you restore your backup's.
SET NOCOUNT ON SELECT 'EXEC sp_addlogin @loginame = ''' + loginname + '''' ,', @defdb = ''' + dbname + '''' ,', @deflanguage = ''' + language + '''' ,', @encryptopt = ''skip_encryption''' ,', @passwd =' , cast(password AS varbinary(256)) ,', @sid =' , sid FROM syslogins WHERE name NOT IN ('sa') AND isntname = 0
Execute each record of the above script in a separate session to retain all users with their existing passwords.
|
 |
|
|
WJHamel
Aged Yak Warrior
USA
614 Posts |
Posted - 03/25/2013 : 12:13:44
|
Excellent, we'll give this a try on the next migration.
thanks |
 |
|
| |
Topic  |
|
|
|