Showing posts with label crashed. Show all posts
Showing posts with label crashed. Show all posts

Monday, March 19, 2012

How to recreate/restore the database from the data and log files

My development system hard disk crashed and I have lost the Operating
system and the SQL executables and the system cannot be salvaged.
However at the time of the crash the server was not running and the
log files and the data files of the database were on another hard
disk. I have managed to successfully recover the data and log files of
the database.
I would greatly appreciate if you could kindly show me the
procedure/process to restore the data and log files and bring the
database to life on a new SQL instance.
Please give me the command sequence to resurrect the database.
Thanks
Karen
Karen,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen
|||Karen,
1) Reinstall SQL Server and place the data files in the same directory
2)You can use the option 'Attach Database' In Sql EnterPrise manager to attach your log Files....Without restoring the backup (Backup the system after attaching)
3)Open the enterprise manager - Click on your Sql Server group... Click the server ->Right Click on the Databases folder You can get the Attach Database
4) Browse the your Data Files (.mdf) file... and then click on verify to see everything is fine
5) Then click on OK... Then you must be able to run your system as before
Also... You can delete .ldf file (as the depending up on the transactions this might take whole lot of GB from your harddisk..) and then attach your .mdf file..
Thanks
Ramesh...

Quote:

Originally posted by Mark Allison
Karen,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen

How to recreate/restore the database from the data and log files

My development system hard disk crashed and I have lost the Operating
system and the SQL executables and the system cannot be salvaged.
However at the time of the crash the server was not running and the
log files and the data files of the database were on another hard
disk. I have managed to successfully recover the data and log files of
the database.
I would greatly appreciate if you could kindly show me the
procedure/process to restore the data and log files and bring the
database to life on a new SQL instance.
Please give me the command sequence to resurrect the database.
Thanks
Karen
Karen,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen

How to recreate/restore the database from the data and log files

My development system hard disk crashed and I have lost the Operating
system and the SQL executables and the system cannot be salvaged.
However at the time of the crash the server was not running and the
log files and the data files of the database were on another hard
disk. I have managed to successfully recover the data and log files of
the database.
I would greatly appreciate if you could kindly show me the
procedure/process to restore the data and log files and bring the
database to life on a new SQL instance.
Please give me the command sequence to resurrect the database.
Thanks
KarenKaren,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen

How to recreate/restore the database from the data and log files

My development system hard disk crashed and I have lost the Operating
system and the SQL executables and the system cannot be salvaged.
However at the time of the crash the server was not running and the
log files and the data files of the database were on another hard
disk. I have managed to successfully recover the data and log files of
the database.
I would greatly appreciate if you could kindly show me the
procedure/process to restore the data and log files and bring the
database to life on a new SQL instance.
Please give me the command sequence to resurrect the database.
Thanks
KarenKaren,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen

Monday, March 12, 2012

How to recover a SQL Server database after a crash

Hi,
I had my Windows 2000 crashed and after that I reinstalled windows, sql
server etc. after taking backup of all mdf ( and no ldfs by mistake).
Now when I try to restore it, it says,
--
Could not open new database 'kothari1'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'D:\Program Files\Microsoft
SQL Server\MSSQL\data\Kothari_log.LDF' may be incorrect.
--
Any help please - I do not have ANY backup of this database :(
Thanks
AmitSee if you can use
sp_attach_db OR
sp_attach_single_file_db
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Amit Basu" <amit@.winruler.com> wrote in message
news:OHKSpDSRDHA.3768@.tk2msftngp13.phx.gbl...
> Hi,
> I had my Windows 2000 crashed and after that I reinstalled windows, sql
> server etc. after taking backup of all mdf ( and no ldfs by mistake).
> Now when I try to restore it, it says,
> --
> Could not open new database 'kothari1'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'D:\Program
Files\Microsoft
> SQL Server\MSSQL\data\Kothari_log.LDF' may be incorrect.
> --
> Any help please - I do not have ANY backup of this database :(
> Thanks
> Amit
>