• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

copying databases

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Databases

View previous topic :: View next topic  
Author Message
wickerandvine
New Member
New Member


Joined: 20 Oct 2006
Posts: 25
Location: alang-alang Mandaue

Offline

PostPosted: Wed Aug 22, 2007 4:30 pm    Post subject: copying databases Reply with quote

I had a computer with MS SQL on it. It has a database on it too with it's data intact.. What I want to do is transfer the database to another computer with MS SQL. The first i tried is made a backup of data database, copy the backup and paste the database to the other computer. When I tried to restore it, it doesn't recognize the database. How can I successfully transfer a database from computer A to computer B so that MS SQL in Computer B will recognize the database?. Computer B is not on the netwowrk and both uses MS SQL.
Back to top
View user's profile Send private message
Groovicus
Trusted SF Member
Trusted SF Member


Joined: 19 May 2004
Posts: 9
Location: Centerville, South Dakota

Offline

PostPosted: Wed Aug 22, 2007 5:34 pm    Post subject: Reply with quote

From the command line (not mysql command line), mysqldump my_database > database.sql.

All of your data will be in a .sql script. Copy it over to the other computer. Open mysql, and type in source /path_to/database.sql.

http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
Back to top
View user's profile Send private message Visit poster's website
wickerandvine
New Member
New Member


Joined: 20 Oct 2006
Posts: 25
Location: alang-alang Mandaue

Offline

PostPosted: Thu Aug 23, 2007 3:03 pm    Post subject: Reply with quote

I have Microsoft Sql(MS SQL) not mysql.
Back to top
View user's profile Send private message
Groovicus
Trusted SF Member
Trusted SF Member


Joined: 19 May 2004
Posts: 9
Location: Centerville, South Dakota

Offline

PostPosted: Thu Aug 23, 2007 6:09 pm    Post subject: Reply with quote

Embarassed

My bad... what did you use to make the backup copy?
Back to top
View user's profile Send private message Visit poster's website
wickerandvine
New Member
New Member


Joined: 20 Oct 2006
Posts: 25
Location: alang-alang Mandaue

Offline

PostPosted: Tue Aug 28, 2007 1:07 pm    Post subject: Reply with quote

let me restate it again. I have two computers A and B, both have MS SQL 7.0. I have a database in computer A that I want to transfer at computer B. Both computers are not in a network. I tried to back up the database from computeA and copied it to computerB and then tried to restore it but it doesn't work. Is there a better way for me to copy the database to computer B succesfully??
Back to top
View user's profile Send private message
carlokie
Just Arrived
Just Arrived


Joined: 27 Mar 2007
Posts: 0


Offline

PostPosted: Wed Sep 05, 2007 2:19 pm    Post subject: Reply with quote

Backup - restore is the best way go with this. When you try and restore from the file that you copied you say it does not recognize the database??
The only thing that I can think is that the restore is trying to create the data and log files for the database to the same physical file location as they are on machine A. there should be options in the restore to specify the file names?
If this does not help can you paste the error that you are getting.
Back to top
View user's profile Send private message
Colonel_Panic
Just Arrived
Just Arrived


Joined: 13 May 2004
Posts: 2


Offline

PostPosted: Sat Sep 15, 2007 4:07 am    Post subject: Reply with quote

I'm not exactly an MSSQL expert, but to my best knowledge, the easiest way to move MSSQL databases is detach-attach.
After you detach a database (there should be command for that in administration tools), you can handle it exactly as any os file, for example you can use Explorer to move it around. Once you've copied this file to some place where the other DB server can see it, you can use [attach] command to start using it as a database. And of course, attach it back to the original server as well if you still need it there.

I don't use MSSQL much, but I know that this is the preferred method for moving entire ERP databases in Windows environment. (so it should work with pretty much any database)
Sorry but I've got no idea on which MSSQL version you need for this.
Back to top
View user's profile Send private message
AdamV
SF Mod
SF Mod


Joined: 06 Oct 2004
Posts: 24
Location: Leeds, UK

Offline

PostPosted: Sat Sep 15, 2007 9:46 am    Post subject: Reply with quote

You will also want to make sure all transactions are committed and logs truncated.

You could always do this by doing a dump (SQL backup) of the data and then using this backup file to import from, rather than backing up the file as an OS object.

detach/attach might also work, I hadn't come across that method myself 'cos I'm not really a major SQL guy - I just know enough to find my way around when using something with SQL behind it like a DMS or case/practicemanagement system.

Code:
select skills from experience
    where had_to_do_this_once = "Yes"
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Databases All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Windows Networking info?

Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!
View a sample newsletter.

Become a WindowsNetworking.com member!

Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?

Follow TechGenix on Twitter