473,287 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Help restore a database!

Hi SQL gurus!
My PC crashed but was able to recover some of my data including the
directory and folder with SQL Server 2000. I bought a new PC and want
to restore some of my databases. I tried to create a new database with
the same name and then copy and paste data and log files to a Data
folder but the system wouldn't allow me to do that. Is there any other
way to use my data and log files to restore datbases on the new PC?

Many thanks!

Stan

su******@mail.ru
Jul 20 '05 #1
1 1588
Try using sp_attach_db to attach the database files. For example:

EXEC sp_attach_db
'MyDatabase',
'C:\DataFiles\MyDatabase.mdf',
'C:\LogFiles\MyDatabase_Log.ldf'

Note that this may not work since your databases were not cleanly detached
using sp_detach_db. You may get lucky, though.

--
Hope this helps.

Dan Guzman
SQL Server MVP
"Suslishe" <su******@netscape.net> wrote in message
news:d4**************************@posting.google.c om...
Hi SQL gurus!
My PC crashed but was able to recover some of my data including the
directory and folder with SQL Server 2000. I bought a new PC and want
to restore some of my databases. I tried to create a new database with
the same name and then copy and paste data and log files to a Data
folder but the system wouldn't allow me to do that. Is there any other
way to use my data and log files to restore datbases on the new PC?

Many thanks!

Stan

su******@mail.ru

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rajesh Garg | last post by:
I have actually extended my request I have a scenario like this....... update esan set tes_address_city = 'TEST1' --at some time update esan set tes_address_city = 'TEST12' --at some time...
0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
5
by: Pagus | last post by:
I have full backup of database at 13:00 and another full backup at 17:00. I've made backup of transaction log at 17:05 When I try to restore database to state at 15:10 (point in time) , the...
1
by: csomberg | last post by:
SQL 2000 SP3 My database is still showing Loading .... after doing a restore and the restore showing it to be successfull. I have restarted the service as well. Help !
13
by: EggsAckley | last post by:
Hi: I have a file that I have been told is a SQL Server backup from a server somewhere. The file is about 200MB in size I am trying to create the database on my local server using RESTORE. I...
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
11
by: Chris | last post by:
I have searched this group for answers and tried the responses. I am trying to Use an full online backup from our production server and apply it to our test server. The Tablespaces in the...
1
by: RSH | last post by:
Im trying to create a stored procedure of the following code. I want to set it so that I have to send the first 4 variables (@DB, @BackUpFile,@TestDB,@RestoreFile). I am having trouble when i try...
5
by: smoi | last post by:
Hi all, My manager ask me to do backup for 3 database and restore them in a new server. I did the backup for the 3 database into BAK file. Then in the new server, when I did the restore in SQL...
0
by: shorti | last post by:
We are running DB2 UDB 8.1 fp 14 on AIX using archival logging and online backups. I was running some disaster tests and found my database restore was not restoring to the latest active log. ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.