Saturday, February 25, 2012

copy a database from server to development

Dear all,
i want to copy a database from the sql enterprise server into my developer e
dition for development, what is the most suitable methods for this?Hi,
There are 2 options:-
1. Detach and Attach database
2. Backup and Restore the database
1. Detach and Attach
a. Use SP_DETACH_DB to detach the MDF and LDF files
b. Copy the files to Destination server
c. Use SP_ATTACH_DB to attach the databases
(Refer books online for information)
2. Backup and Restore
a. Backup the source databases using BACKUP DATABASE command
b. Copy the .BAK files to destination
c. Restore the database using RESTORE DATABASE command
If you have only 1 or 2 users to syncronize then use the procedure
sp_change_users_login (Refer books online)
Thanks
Hari
MCDBA
"ken" <anonymous@.discussions.microsoft.com> wrote in message
news:4D480E63-1DB3-43B0-814D-A1E4CF4DCD21@.microsoft.com...
> Dear all,
> i want to copy a database from the sql enterprise server into my developer
edition for development, what is the most suitable methods for this?
>|||Another one options : in EM, there is "Copy database wizard".
Bye
"Hari" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
news:OnzpUDJTEHA.504@.TK2MSFTNGP11.phx.gbl...
> Hi,
> There are 2 options:-
> 1. Detach and Attach database
> 2. Backup and Restore the database
> 1. Detach and Attach
> a. Use SP_DETACH_DB to detach the MDF and LDF files
> b. Copy the files to Destination server
> c. Use SP_ATTACH_DB to attach the databases
> (Refer books online for information)
> 2. Backup and Restore
> a. Backup the source databases using BACKUP DATABASE command
> b. Copy the .BAK files to destination
> c. Restore the database using RESTORE DATABASE command
>
> If you have only 1 or 2 users to syncronize then use the procedure
> sp_change_users_login (Refer books online)
> Thanks
> Hari
> MCDBA
>
>
> "ken" <anonymous@.discussions.microsoft.com> wrote in message
> news:4D480E63-1DB3-43B0-814D-A1E4CF4DCD21@.microsoft.com...
developer[vbcol=seagreen]
> edition for development, what is the most suitable methods for this?
>|||http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.databasejournal.com/feat...cle.php/2228611
Transferring Logins
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
Andrew J. Kelly
SQL Server MVP
"ken" <anonymous@.discussions.microsoft.com> wrote in message
news:4D480E63-1DB3-43B0-814D-A1E4CF4DCD21@.microsoft.com...
> Dear all,
> i want to copy a database from the sql enterprise server into my developer
edition for development, what is the most suitable methods for this?
>|||This is really a subset of detach/attach, but with the
benefit of a graphical interface. Actually this is useful
to know because it means it is also an out-of-hours
procedure, unlike backup/restore.
Regards,
Paul Ibison

copy a database from one SQL server to another.

Hello:
I'm new in the SQL server world. But I need to copy one SQL database
on machineA to machineB. By looking at the tool bar, I think export
will do the job for me, is anybody can provide the detail info? DO I
need to create an empty database on MachineB first, any documentation
repository I can read and learn?
Thank you so much!
Sincerely,
QGThree different approaches can be found in the following links:

http://support.microsoft.com/defaul...b;en-us;Q304692
http://support.microsoft.com/defaul...B;en-us;q224071
http://support.microsoft.com/defaul...b;en-us;Q274463

--
- Anith
( Please reply to newsgroups only )|||Hi

To add my favourite link!

http://support.microsoft.com/defaul...b;en-us;Q314546

John

"Grace Gu" <qing.gu@.engelhard.com> wrote in message
news:147725ae.0307071218.7b361934@.posting.google.c om...
> Hello:
> I'm new in the SQL server world. But I need to copy one SQL database
> on machineA to machineB. By looking at the tool bar, I think export
> will do the job for me, is anybody can provide the detail info? DO I
> need to create an empty database on MachineB first, any documentation
> repository I can read and learn?
> Thank you so much!
> Sincerely,
> QG

Copy a Database from a remote server and using it on my local machine

Hi and thanks in advance for your help.

I have a dilemma and I need some expert help with this. I am trying to make a copy of a remote Database and then replicated the DB and it's contents on my local machine so I can build a test site to run data with. I tried to remot into the server machine but I guess that feature is not allowed by the honest of the remote machine. Since I build on my local machine and would like to be able to test data on my local machine... I would like to copy the remote DB to my local computer and then I can run my test app on my local server. The version of SQL on the remote machine is SQL Express 2005 and I have SQL 2005 on my machine. Please give me how to accomplish this please.

Dollarjunkie

Check out Red Gate software... Specifically the SQL Compare and Data Compare products. They are fantastic and do exactly what you want... http://redgate.com/ I've used them for years; they save SO much time when developing locally and keeping data/structure in sync.

-Damien

Copy a database

I want to make a copy of a production database on the same server, so I can
test things on the copy before I deploy them. So, after I run the copying
SQL, i will have "Northwind" and "Northwind_COPY".
Does anyone have any SQL script for this ?
Thanks,
CraigEasiest way is to backup the database and then restore into and new database
name and of course a
new set of database files. See the BACKUP and RESTORE commands in Books Onli
ne.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:C727FC27-A191-4505-B0F6-6B963B96473D@.microsoft.com...
>I want to make a copy of a production database on the same server, so I can
> test things on the copy before I deploy them. So, after I run the copying
> SQL, i will have "Northwind" and "Northwind_COPY".
> Does anyone have any SQL script for this ?
> Thanks,
> Craig|||Hi
Backup and Restore commands (please see for more details in the BOL)
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:C727FC27-A191-4505-B0F6-6B963B96473D@.microsoft.com...
> I want to make a copy of a production database on the same server, so I
can
> test things on the copy before I deploy them. So, after I run the copying
> SQL, i will have "Northwind" and "Northwind_COPY".
> Does anyone have any SQL script for this ?
> Thanks,
> Craig|||Assuming you want the data as well, use the Import / Export Wizard (DTS)
and when given the prompt to tell it what to do, select copy data and
objects.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.learncsharp.net/home/listings.aspx
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:C727FC27-A191-4505-B0F6-6B963B96473D@.microsoft.com...
>I want to make a copy of a production database on the same server, so I can
> test things on the copy before I deploy them. So, after I run the copying
> SQL, i will have "Northwind" and "Northwind_COPY".
> Does anyone have any SQL script for this ?
> Thanks,
> Craig

Copy a database

Hi,
I need to copy a database from sqlserver 2005 to another server sqlserver
2005 too.
I am administrador of the server source, and dbowner of a empty database
into the server destination.
Can someone help with this?
Thanks in advanceI prefer to use BACKUP DATABASE and RESTORE DATABASE for this.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Vipper" <Vipper@.discussions.microsoft.com> wrote in message
news:0166FB25-A835-4901-A0D7-8CB509847B22@.microsoft.com...
> Hi,
> I need to copy a database from sqlserver 2005 to another server sqlserver
> 2005 too.
> I am administrador of the server source, and dbowner of a empty database
> into the server destination.
> Can someone help with this?
> Thanks in advance|||Hi,
If you use SQL Server logins, remember about this:
http://support.microsoft.com/kb/274188
Do you know how deal with domain users when restore database from DomainA
(logins from DomainA) to server in DomainB?
--
Regards,
anxcomp|||I like back-up restore also but you can also dettach the database, copy the
files using your operating system and then attach the copied database to
your destination instance
--
Sincerely,
John K
Knowledgy Consulting
http://knowledgy.org/
Atlanta's Business Intelligence and Data Warehouse Experts
"Vipper" <Vipper@.discussions.microsoft.com> wrote in message
news:0166FB25-A835-4901-A0D7-8CB509847B22@.microsoft.com...
> Hi,
> I need to copy a database from sqlserver 2005 to another server sqlserver
> 2005 too.
> I am administrador of the server source, and dbowner of a empty database
> into the server destination.
> Can someone help with this?
> Thanks in advance

Copy a database

Hi,
I need to copy a database from sqlserver 2005 to another server sqlserver
2005 too.
I am administrador of the server source, and dbowner of a empty database
into the server destination.
Can someone help with this?
Thanks in advance
Hi,
If you use SQL Server logins, remember about this:
http://support.microsoft.com/kb/274188
Do you know how deal with domain users when restore database from DomainA
(logins from DomainA) to server in DomainB?
Regards,
anxcomp
|||I like back-up restore also but you can also dettach the database, copy the
files using your operating system and then attach the copied database to
your destination instance
Sincerely,
John K
Knowledgy Consulting
http://knowledgy.org/
Atlanta's Business Intelligence and Data Warehouse Experts
"Vipper" <Vipper@.discussions.microsoft.com> wrote in message
news:0166FB25-A835-4901-A0D7-8CB509847B22@.microsoft.com...
> Hi,
> I need to copy a database from sqlserver 2005 to another server sqlserver
> 2005 too.
> I am administrador of the server source, and dbowner of a empty database
> into the server destination.
> Can someone help with this?
> Thanks in advance

Copy a database

Hi,

I need to copy a database for example I have ABC I want to create ABC_Test

How to do that?

regards,

PorcupineBackup and restore is often the easiest way. See "Copying Databases",
"BACKUP" and "RESTORE" in Books Online, and also this KB article:

http://support.microsoft.com/kb/314546/EN-US/

Simon|||Here's what you do:

1. Do a backup of your database to a file (or tape). For example -
Production.BAK
2. Do a Restore and select the radio button "FROM DEVICE".
3. Find the Production.BAK file and select it.
4. In the "Restore the Database As" text field, type in the name of
your new database.
5. Click on the Options tab and verify that the "Restore as" directory
actually exits in your machine.

6...good luck.

*Notes: ***IMPORTANT***
Make sure that
1. the "Restore as" text field is not a name of a database that already
exists on that server.
2. the "Restore as" file name is not the same as another .mdf or .ldf
file in the directory. Normally when you fill out the first text box,
the file names get changed automatically.
3. the step number 5 is very important...double check that.