General discussion

Locked

How Copy sqlserver DataBase in client pc

By jiten04 ·
I WANTS TO COPY DATABASE EITHER TABLE WHICH IS IN SQLSERVER2000.BUT I AM WORKING IN CLIENT
MACHINE ,IN CLIENT MACHINE IT IS SHOWING ,BUT
WHEN I GENERATING SQLSCRIPT FOR THAT DB IT WON'T BE HAPPENING OR NOT SAVED ? ANY TOOL ?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by cmiller5400 In reply to How Copy sqlserver DataBa ...

If you want to copy the database there are a few options. One is to detach the database from sql server and then copy the .mdf and .ldf files that comprise it, then reattach it. Or to run a backup of the database which generates a .bak file and then you can restore the database to where ever you like.

Collapse -

by gsquared In reply to How Copy sqlserver DataBa ...

Are you copying the database structure only or do you need the data also?

Generating an SQL create script for a database (or any object [table, query, etc.] in the database) only gives you the structure, without any data.

If that's what you want, you can either use the Create Script option in Enterprise Manager, select "Show All Objects" and select either all of them or the ones you want, then save the scripts and use them in Query Analyzer to create the database objects on another machine; or you can select the table you want in Query Analyzer, right click it and select "Script Object to File as Create".

If you want to have the data as well as the structure, you can run a backup of the database and then restore the backup on the other computer.

If you have any trouble with either of these, or aren't sure which you want (just structure or structure and data), please feel free to contact me.

Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums