Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends,

I want to generate the scripts for all logins, users and roles in a database in sql server 2005, i have checked in google also but i could not get exact information please suggest me on this ..

Purpose:--
== === ===

Have to create the same logins, users and roles in other server.





Thanks & best Regard's,
Thrilok,
DBA.
Posted
Comments
Maciej Los 29-Dec-14 8:02am    
What have you done? WHere are you stuck?
Sergey Alexandrovich Kryukov 29-Dec-14 13:32pm    
Users and roles is just data structure, not "scripts". Please explain your problem properly.
Anyway, What have you tried so far?
—SA
Member 11340860 2-Jan-15 2:49am    
Hi People,

Thank you so much for ur responces, now i got solution. Actually i only did the mistake or confused.


Regard's
Thrilok.

1 solution

Hi,
As per my understanding according to your explaination, you want to migrate data from one database to other databse.
There are several ways to do this, below are some options:

Option 1 - Right click on the database you want to copy
Choose 'Tasks' > 'Generate scripts'
'Select specific database objects'
Check 'Tables'
Mark 'Save to new query window'
Click 'Advanced'
Set 'Types of data to script' to 'Schema and data'
Next, Next
You can now run the generated query on the new database.

Option 2
Right click on the database you want to copy
'Tasks' > 'Export Data'
Next, Next
Choose the database to copy the tables to
Mark 'Copy data from one or more tables or views'
Choose the tables you want to copy
Finish

Option 3 :
You can use the Linked Server. For more detail please visit
http://msdn.microsoft.com/en-IN/library/ms188279.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900