Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 9th, 2004, 08:44 PM
[ABA] moto [ABA] moto is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 9 [ABA] moto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy how do I import SQL data files to a new built SQL Server

Dear all:
My web server recently crashed on me. I have all the data file backed up (master file, Portal, etc)

Now my web server is rebuilt... but I can't seem to find a way to restore the old files from my crashed server... Any help? I tried to use the Data Transformation Service but it only has something Server <--> Server... Is there anyway to restore my old files on a new built SQL Server??

Thanks.


MOTO

Reply With Quote
  #2  
Old January 16th, 2005, 10:54 PM
UmarFarooq UmarFarooq is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Atlanta
Posts: 2 UmarFarooq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to UmarFarooq Send a message via Yahoo to UmarFarooq
Quote:
Originally Posted by [ABA] moto
Dear all:
My web server recently crashed on me. I have all the data file backed up (master file, Portal, etc)

Now my web server is rebuilt... but I can't seem to find a way to restore the old files from my crashed server... Any help? I tried to use the Data Transformation Service but it only has something Server <--> Server... Is there anyway to restore my old files on a new built SQL Server??

Thanks.


MOTO


How do you have your previous files "backed up"? Did you back up the Tablespace .MDF .NDF and .LDF or did you do a "Backup Database" under All Tasks?

If you did a complete backup of your database as in the latter case, you have to do a "restore Database" from the "All Tasks" context menu. Pay close attention to the file locations where the files will be restored and make sure those drives, partitions and folders exist before runnin the restore. If not, the process will fail.

If you have "backed" up the files as in the former case by simply copying the physical files to tape or another means, then you have to create a new database with the same name and attach the files. I've never done a restore or an attach so maybe someone more experienced may be able to help you with that.

Good Luck,

-Umar.

Reply With Quote
  #3  
Old February 2nd, 2005, 08:12 AM
david.poole david.poole is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 david.poole User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m
Reputation Power: 0
Using existing MDF/LDF files

Copy your mdf and ldf files across to your new server.

Use sp_attach_db 'YourDatabaseName','fully qualified path and filename for your MDF file' , 'Fully qualified path and filename for your LDF file'

For example

sp_attach_db 'CoolSite','C:\program files\sqlserver\coolsite.mdf','C:\program files\sqlserver\coolsite_log.ldf'

Of course you will have to remap your database users to the appropriate logins.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > how do I import SQL data files to a new built SQL Server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT