Tuesday, March 20, 2012

Copying SQL Server Database on Clients Machine

Hello all,

I have installed a dummy SQL server in my office and created the database..now i want to copy this database on to clients machine but i dont have a remote access to the clients machine..so all i have to do is copy this database on a disk and restore it on clients machine..I dunoo exactly how this procedure works. I need any help ASAp. Thankyou very much.

RamOriginally posted by sriramkakani
Hello all,

I have installed a dummy SQL server in my office and created the database..now i want to copy this database on to clients machine but i dont have a remote access to the clients machine..so all i have to do is copy this database on a disk and restore it on clients machine..I dunoo exactly how this procedure works. I need any help ASAp. Thankyou very much.

Ram

You want to readup on attaching and detaching a database...also search this forum or read online help.|||If your using MS SQL 2000 , and your client is also using MS SQL 2000, you can do it via "Attach/Detach".

A very simple way. go to enterprise manager, right click on your database, under "All task".select detached database.

Make sure there are not connections to u'r database when u'r doing a detached, or else u can't do it.

Also , be sure that your login id has db owner rights for that table, or u'll have trouble attaching back at the client side.

After detached, you can go to your MS SQL folder and copy your .mdf and .log files into a diskkete. You can even zip it up.

At the client side, just attached it back.

Before u do this, create a test database and play around first.|||You can also just take a backup of the database and copy the .bak file. then restore. It isnt as fast as detatch and reattach, but it IMO less risky, and easier to do. Read up in BOL on backup and restore procedures. very simple.sql

No comments:

Post a Comment