I want to copy a database from one server to another so that they are
identical and I have a few questions. Also I am running the 'Simple
Recovery Model' and therefore my transaction log is minimal.
BACKUP AND RESTORE: If I perform a backup and restore will user access
rights be backed up? What if the user doesn't exist on the new server?
Should I create it manually? Lastly, in the simple recovery model do
I need to backup the transaction log?
MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
implications of stopping SQL server and manually copying the data and
log file? I could then attach it to the new server' Would this work?
DATACHING AND REATTACHING: I could detach the database, copy it to the
new server and then attach it to the original and new servers? Would
this work?
EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
tables, but this procedure would take the longest.All your questions are answered in the following Knowledge Base article:
314546 - HOW TO Move Databases Between Computers That Are Running SQL
Server:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
--
Jacco Schalkwijk
SQL Server MVP
<war_wheelan@.yahoo.com> wrote in message
news:1114097392.448483.201600@.f14g2000cwb.googlegroups.com...
>I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||Hi,
Using all the below approches you can copy the database to second server.
But the 3rd approch may fail ( MANUALLY COPY THE *.MDF AND *.LDF FILES) if
you have not detached the files. So it is always recomended to detach the
file and copy to destination.
If the first server is production you could use BACK DATABASE, Copy the
Backup file to second server and Restore it (RESTORE DATABASE). All the Login
user chains can be created/established using the the system stored proc
sp_change_users_login
(See books online for usage and various parameters).
If the system is not production then you can detach the database , copy the
MDF and LDF to second server , Attach the database and use system stored proc
sp_change_users_login to syncronize the logins and users.
Third approach (Export and import) may not be a solution if you have miore
tables and data. This is really time consuming.
Thanks
Hari
SQL Server MVP
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>
Sunday, March 11, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment