[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to move SQL Express server

Posted on 2007-03-22
17
Medium Priority
?
699 Views
Last Modified: 2013-11-16
I'm running an SQL express server as the backend of my database but need to move it to a new server. I cannot find steps on the internet to do so. Any help would be much appeciated.
0
Comment
Question by:prlit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 4
17 Comments
 
LVL 19

Expert Comment

by:aissim
ID: 18773161
I haven't personally had to do this with SQL Express....but my best guess would be to install SQL Express on the new machine and then replicate the DB from old to new.
0
 
LVL 1

Author Comment

by:prlit
ID: 18773496
Is there somewhere I can find steps to to do the replication?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18773838
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:aissim
ID: 18773858
As you probably know there's no SQL agent with express...so there's only two alternate options.

Here's an article that lists your various options, as well as links to 'How-To's' for each option: http://msdn2.microsoft.com/en-us/library/ms165686.aspx


0
 
LVL 1

Author Comment

by:prlit
ID: 18773925
If my origional server died and I had to pull it off a backup tape, how would I do so?
0
 
LVL 19

Expert Comment

by:aissim
ID: 18774042
You could put it on disk from tape, and then the following from the sql command window:

RESTORE DATABASE dbname
FROM DISK = c:\foldername\backupname.bak
GO
0
 
LVL 1

Author Comment

by:prlit
ID: 18774108
That easy?? I just want to copy the olf c:\program files\sql express\ to an external hard drive and then hook that drive to the new server. There's a very little data on the server. What files should I copy?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18774311
any mdf, ldf or ndf files. Assuming the new server has the same name and IP address. It is a matter of installing the SQL Express as the same name and all. Then shut down the SQL Services, replace the ?df files and restarting the services.
0
 
LVL 19

Expert Comment

by:aissim
ID: 18774392
You'll probably have to install SQL Express on the new server...then copy the .bak file over (or put it on your external drive), then use the Restore command. It won't work to just copy the program files folder over to the new server - it needs to actually be installed (for registry entries, etc.).
0
 
LVL 1

Author Comment

by:prlit
ID: 18774520
The server doesn't have the same/ip name. I did a search of the SQL server express directory and there were no .bak files. I just want to copy all of the "data files" to a external hard drive and move them to the new server. I know I can't copy the program. If I go through and copy the .mdf, .ndf, and .ldf files, what command would I use below?

These commands:
RESTORE DATABASE dbname
FROM DISK = c:\foldername\backupname.bak  "what would go here since there's no .bak"
GO

Thanks for all the help!!!
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 2000 total points
ID: 18774638
There should be a master.mdf. This is what holds the list of the rest of the databases. If you copy the other ?df files you can put them in the same direstory and then bring them in by executing an attach. The syntax would look something like:
sp_attach_db 'MyDBName', 'C:\MyPath\MyDBName.mdf', 'C:\MyPath\MyDBName.ldf'
0
 
LVL 1

Author Comment

by:prlit
ID: 18774788
MY command: sqlcmd sp_attach_db 'MyDBName', 'C:\Data\PRL.mdf', 'C:\Data\PRL_log.ldf'

Gives me: Sqlcmd: 'sqlcmd sp_attach_db' : Unkown Option. Enter -? for help
0
 
LVL 1

Author Comment

by:prlit
ID: 18774798
Or am I actually copying the master.mdf or the dbname.mdf
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18774996
If you copy the master.mdf from the Oldserver and replace it the newserver, and have the same paths to on your newserver for all the other ?df files they will be there.

If you are using the the new master from the new install then you can attach the pre-existing ?df files using the sp_attach_db command. The syntax I have is for SQL2K/MSDE. It may have changed. And wouldn't it be:

sqlcmd sp_attach_db 'PRL', 'C:\Data\PRL.mdf', 'C:\Data\PRL_log.ldf'

Note that you will have orphaned user ids between the master database and the PRL DB.
0
 
LVL 1

Author Comment

by:prlit
ID: 18775781
Gives me: Sqlcmd: 'sqlcmd sp_attach_db' : Unkown Option. Enter -? for help

I used: sqlcmd sp_attach_db 'PRL', 'C:\Data\PRL.mdf', 'C:\Data\PRL_log.ldf' Everything in that line is right for my details. Is there a typo in the command?
0
 
LVL 1

Author Comment

by:prlit
ID: 18776241
I was able to attach the server using the GUI of SQL Express. Very easy, did not require any commands.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18778923
I'm used to MSDE which did not really have any native GUI. Glad it worked out for you.

Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
What we learned in Webroot's webinar on multi-vector protection.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question