corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Copying SQL database


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Copying SQL database
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
29th Oct 08 at 13:48   View User's Profile U2U Member Reply With Quote

I have one on my server I want to put it locally on my workstation for quicker testing.

How do i get a copy of the sql so I can build it on my local workstation.

I tried copying the file but it will not let me as it is use by another program.
Leighton
Member

Avatar

Registered: 21st Feb 01
Location: Liverpool
User status: Offline
29th Oct 08 at 14:38   View Garage View User's Profile U2U Member Reply With Quote

Try this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
Dan Lewis
Member

Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
29th Oct 08 at 14:38   View User's Profile U2U Member Reply With Quote

you have to take the database offline first.
Brett
Premium Member

Avatar

Registered: 16th Dec 02
Location: Manchester
User status: Offline
29th Oct 08 at 14:43   View Garage View User's Profile U2U Member Reply With Quote

You soooo started doing this SQL without knowing wtf you're talking about.
Sam
Moderator
Premium Member


Registered: 24th Dec 99
Location: West Midlands
User status: Offline
29th Oct 08 at 14:51   View User's Profile U2U Member Reply With Quote

Brett

I don't know what the deal is with MSSQL but with MySQL all I ever do is export all the tables to a .SQL file and import into <wherever>, is this not the case with MSSQL then?
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
29th Oct 08 at 19:15   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Sam
Brett

I don't know what the deal is with MSSQL but with MySQL all I ever do is export all the tables to a .SQL file and import into <wherever>, is this not the case with MSSQL then?


I not worked with it in ages, and could not find the function to do this and was in a bit of a rush.
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
29th Oct 08 at 19:37   View User's Profile U2U Member Reply With Quote

SQL Server 2000 or 2005?

Is it a big DB?
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
29th Oct 08 at 20:25   View Garage View User's Profile U2U Member Reply With Quote

mysqldump if it's a proper database.

Not sure about the Microsoft way. Probably takes longer and is harder.
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
29th Oct 08 at 23:07   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by James
SQL Server 2000 or 2005?

Is it a big DB?


2005 only worked with 2000 before an a while ago so its just a case of finding everything.
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
30th Oct 08 at 09:20   View User's Profile U2U Member Reply With Quote

Open up SQL Server Management Studio.

Expand databases, right click on DB name, Tasks > Generate Scripts.

Follow the wizard to generate the scripts for all the DB objects.

Obviously this won't include data. If you need data you will need to backup the data and then restore it locally.

This can be done by right clicking the DB and selecting Tasks > Backup
Jodi_the_g
Member

Registered: 7th Aug 01
Location: Washington D.C
User status: Offline
30th Oct 08 at 12:19   View User's Profile U2U Member Reply With Quote

Thanks James

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
website help :( Drew Geek Day 18 1079
30th Nov 04 at 21:26
by Drew
 
Webspace A1EX Geek Day 7 1020
25th Mar 06 at 16:03
by MikeLamb
 
SQL Server MarkW Geek Day 18 877
2nd Feb 07 at 20:38
by MarkW
 
FAO: Programmers barteh Geek Day 6 777
6th Nov 07 at 14:02
by barteh
 
SQL Connection String Jodi_the_g Geek Day 1 186
11th Sep 08 at 13:23
by James
 

Corsa Sport » Message Board » Off Day » Geek Day » Copying SQL database 29 database queries in 0.0148571 seconds