Extract logins default db

/ Published in: SQL
Save to your folder(s)

Extract logins default db settings from one server to export to another

Copy this code and paste it in your HTML
  1. SELECT 'exec sp_defaultdb '''+ name + ''',''' + dbname + '''' FROM syslogins
  2. WHERE dbname IS NOT NULL

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.