/ Published in: SQL
Extract logins default db settings from one server to export to another
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT 'exec sp_defaultdb '''+ name + ''',''' + dbname + '''' FROM syslogins WHERE dbname IS NOT NULL