Monday, March 26, 2012
Recovering using the log file
drive, and the log files on the F: drive.
The C: drive crashed, total loss. But I still have full backups for the
databases and also their log files.
Is there a way of recovering my DBs to the point of failure using the
backups and log files?
Everything I see in the BOL refer to use a log backup. I don't have log
backups, just the log files themselves.
ThanksIf the database is in full recovery mode, and no-one has truncated the log,
you can do:
BACKUP LOG dbname TO ... WITH NO_TRUNCATE
If the database is in simple recovery mode, then SQL Server will truncate
the log at each checkpoint. This means that the information you need is no
longer available in the transaction log files.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Dallara" <someone@.microsoft.com> wrote in message
news:OPpd5co%23DHA.3232@.TK2MSFTNGP10.phx.gbl...
> I have a situation where the server and data files were located on the C:
> drive, and the log files on the F: drive.
> The C: drive crashed, total loss. But I still have full backups for the
> databases and also their log files.
> Is there a way of recovering my DBs to the point of failure using the
> backups and log files?
> Everything I see in the BOL refer to use a log backup. I don't have log
> backups, just the log files themselves.
> Thanks
>|||They were in full recovery.
Thanks for yr help, but the point you missed here is that the DBs are gone,
the server is gone as well.
So "BACKUP LOG dbname TO ... WITH NO_TRUNCATE" doesn't work as "dbname"
doesn't exist.
I've set up a new server, and I want to recreate the databases using the
full backups and log files that I have.
I know how to recover the DBs to the point of their full backup. I'm
wondering if there's a way of recover them to the point of failure using
their log files.
>"Tibor Karaszi" wrote in message
>If the database is in full recovery mode, and no-one has truncated the log,
>you can do:
>BACKUP LOG dbname TO ... WITH NO_TRUNCATE
>If the database is in simple recovery mode, then SQL Server will truncate
>the log at each checkpoint. This means that the information you need is no
>longer available in the transaction log files.
> Tibor Karaszi, SQL Server MVP
>
C:|||OK, so the SQL Server install in itself is toast...
The concept to save this is to have your new installation with a working SQL
Server, create a database with the same name and same file layout as the old
one. Stop that SQL Server, delete the mdf, ndf and ldf files. Then copy over
the ldf file from the broken install. Start SQL Server. Database is now
suspect (the mdf and ndf files are missing). You now do
BACKUP LOG dbname TO DISK = 'C:\...' WITH NO_TRUNCATE
Then restore the db backup and that log backups.
Above assumes that you indeed have all log records available in the ldf
file, since the db backup was taken.
There's a KB on the subject, I don't have the number, but it shouldn't be
hard to find with a little bit of searching...
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Dallara" <someone@.microsoft.com> wrote in message
news:OcVlVay%23DHA.1212@.TK2MSFTNGP12.phx.gbl...
> They were in full recovery.
> Thanks for yr help, but the point you missed here is that the DBs are
gone,
> the server is gone as well.
> So "BACKUP LOG dbname TO ... WITH NO_TRUNCATE" doesn't work as "dbname"
> doesn't exist.
> I've set up a new server, and I want to recreate the databases using the
> full backups and log files that I have.
> I know how to recover the DBs to the point of their full backup. I'm
> wondering if there's a way of recover them to the point of failure using
> their log files.
>
>
log,
no
> C:
the
log
>
Recovering using the log file
drive, and the log files on the F: drive.
The C: drive crashed, total loss. But I still have full backups for the
databases and also their log files.
Is there a way of recovering my DBs to the point of failure using the
backups and log files?
Everything I see in the BOL refer to use a log backup. I don't have log
backups, just the log files themselves.
ThanksIf the database is in full recovery mode, and no-one has truncated the log,
you can do:
BACKUP LOG dbname TO ... WITH NO_TRUNCATE
If the database is in simple recovery mode, then SQL Server will truncate
the log at each checkpoint. This means that the information you need is no
longer available in the transaction log files.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Dallara" <someone@.microsoft.com> wrote in message
news:OPpd5co%23DHA.3232@.TK2MSFTNGP10.phx.gbl...
> I have a situation where the server and data files were located on the C:
> drive, and the log files on the F: drive.
> The C: drive crashed, total loss. But I still have full backups for the
> databases and also their log files.
> Is there a way of recovering my DBs to the point of failure using the
> backups and log files?
> Everything I see in the BOL refer to use a log backup. I don't have log
> backups, just the log files themselves.
> Thanks
>|||They were in full recovery.
Thanks for yr help, but the point you missed here is that the DBs are gone,
the server is gone as well.
So "BACKUP LOG dbname TO ... WITH NO_TRUNCATE" doesn't work as "dbname"
doesn't exist.
I've set up a new server, and I want to recreate the databases using the
full backups and log files that I have.
I know how to recover the DBs to the point of their full backup. I'm
wondering if there's a way of recover them to the point of failure using
their log files.
>"Tibor Karaszi" wrote in message
>If the database is in full recovery mode, and no-one has truncated the log,
>you can do:
>BACKUP LOG dbname TO ... WITH NO_TRUNCATE
>If the database is in simple recovery mode, then SQL Server will truncate
>the log at each checkpoint. This means that the information you need is no
>longer available in the transaction log files.
> Tibor Karaszi, SQL Server MVP
>
>> "Dallara" wrote in message
> > I have a situation where the server and data files were located on the
C:
> > drive, and the log files on the F: drive.
> > The C: drive crashed, total loss. But I still have full backups for the
> > databases and also their log files.
> >
> > Is there a way of recovering my DBs to the point of failure using the
> > backups and log files?
> > Everything I see in the BOL refer to use a log backup. I don't have log
> > backups, just the log files themselves.
> >
> > Thanks|||OK, so the SQL Server install in itself is toast...
The concept to save this is to have your new installation with a working SQL
Server, create a database with the same name and same file layout as the old
one. Stop that SQL Server, delete the mdf, ndf and ldf files. Then copy over
the ldf file from the broken install. Start SQL Server. Database is now
suspect (the mdf and ndf files are missing). You now do
BACKUP LOG dbname TO DISK = 'C:\...' WITH NO_TRUNCATE
Then restore the db backup and that log backups.
Above assumes that you indeed have all log records available in the ldf
file, since the db backup was taken.
There's a KB on the subject, I don't have the number, but it shouldn't be
hard to find with a little bit of searching...
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Dallara" <someone@.microsoft.com> wrote in message
news:OcVlVay%23DHA.1212@.TK2MSFTNGP12.phx.gbl...
> They were in full recovery.
> Thanks for yr help, but the point you missed here is that the DBs are
gone,
> the server is gone as well.
> So "BACKUP LOG dbname TO ... WITH NO_TRUNCATE" doesn't work as "dbname"
> doesn't exist.
> I've set up a new server, and I want to recreate the databases using the
> full backups and log files that I have.
> I know how to recover the DBs to the point of their full backup. I'm
> wondering if there's a way of recover them to the point of failure using
> their log files.
>
> >"Tibor Karaszi" wrote in message
> >
> >If the database is in full recovery mode, and no-one has truncated the
log,
> >you can do:
> >BACKUP LOG dbname TO ... WITH NO_TRUNCATE
> >
> >If the database is in simple recovery mode, then SQL Server will truncate
> >the log at each checkpoint. This means that the information you need is
no
> >longer available in the transaction log files.
> >
> > Tibor Karaszi, SQL Server MVP
> >
> >
> >> "Dallara" wrote in message
> >>
> > > I have a situation where the server and data files were located on the
> C:
> > > drive, and the log files on the F: drive.
> > > The C: drive crashed, total loss. But I still have full backups for
the
> > > databases and also their log files.
> > >
> > > Is there a way of recovering my DBs to the point of failure using the
> > > backups and log files?
> > > Everything I see in the BOL refer to use a log backup. I don't have
log
> > > backups, just the log files themselves.
> > >
> > > Thanks
>
Friday, March 23, 2012
Recovering from hard disk crash
The C drive has crashed. The MDF and LDF files are on
Drive D.
Is there any path to recovery?
Thanks,
Don
Hi, Don! As long as the db files are not corrupt, you can try using the sp_attach_db after you reinstall. See BOL for details. HTH. =)
|||Prerequisite:
Copy all the MDF and LDF files (User databases and System databases) to a safe directory,
Installation:
Since the C drive is crashed, you have to Install the Windows NT 4.0 with the same service pack.
After that install SQL 7.0 with same directory structure and the same service pack as before.
Now follow the below steps:-
1. Stop the SQL Server
2. Move the current MDF and LDF files for system databases (Created on the new installation) to a new folder
3. Copy back all the MDF and LDF files to the same old folders ( Files copied in prerequisite step)
4. Start the SQL server and check all the databases are accessible.
The above step will work fine if you have the system files safe.
If the above steps fail then you will have to restore from good backup files.
-- Don wrote: --
SQL 7.0/NT 4.0
The C drive has crashed. The MDF and LDF files are on
Drive D.
Is there any path to recovery?
Thanks,
Don
Recovering from hard disk crash
The C drive has crashed. The MDF and LDF files are on
Drive D.
Is there any path to recovery?
Thanks,
DonHi, Don! As long as the db files are not corrupt, you can try using the sp_a
ttach_db after you reinstall. See BOL for details. HTH. =)|||Prerequisite:
Copy all the MDF and LDF files (User databases and System databases) to a sa
fe directory,
Installation:
Since the C drive is crashed, you have to Install the Windows NT 4.0 with th
e same service pack.
After that install SQL 7.0 with same directory structure and the same servic
e pack as before.
Now follow the below steps:-
1. Stop the SQL Server
2. Move the current MDF and LDF files for system databases (Created on the n
ew installation) to a new folder
3. Copy back all the MDF and LDF files to the same old folders ( Files copie
d in prerequisite step)
4. Start the SQL server and check all the databases are accessible.
The above step will work fine if you have the system files safe.
If the above steps fail then you will have to restore from good backup files
.
-- Don wrote: --
SQL 7.0/NT 4.0
The C drive has crashed. The MDF and LDF files are on
Drive D.
Is there any path to recovery?
Thanks,
Don
Recovering from hard disk crash
The C drive has crashed. The MDF and LDF files are on
Drive D.
Is there any path to recovery?
Thanks,
DonHi, Don! As long as the db files are not corrupt, you can try using the sp_attach_db after you reinstall. See BOL for details. HTH. =)|||Prerequisite
Copy all the MDF and LDF files (User databases and System databases) to a safe directory
Installation
Since the C drive is crashed, you have to Install the Windows NT 4.0 with the same service pack.
After that install SQL 7.0 with same directory structure and the same service pack as before
Now follow the below steps:
1. Stop the SQL Server
2. Move the current MDF and LDF files for system databases (Created on the new installation) to a new folde
3. Copy back all the MDF and LDF files to the same old folders ( Files copied in prerequisite step
4. Start the SQL server and check all the databases are accessible
The above step will work fine if you have the system files safe
If the above steps fail then you will have to restore from good backup files
-- Don wrote: --
SQL 7.0/NT 4.
The C drive has crashed. The MDF and LDF files are on
Drive D
Is there any path to recovery
Thanks
Do
Recovering DB from deleted files
Using sql 2000 on windows 200 server
I am trying to recover a SQL 2000 DB from crashed.
Now I only have the .LDF file of the DB
is there any way i can use to recover the db from the >LDF file
Thanx,
mateHi,
No, you cant recover a database with just the LDF file. If you have the MDF
file then you can try attaching the database using
SP_ATTACH_DB procedure.
In this scenario, the only way to recover the database is to RESTORE the
database from last successful full datbase backup
and apply the subsequent transaction logs.
Thanks
Hari
MCDBA
"zoro24" <zoro24@.hotmail.com> wrote in message
news:OZiWis2DEHA.240@.tk2msftngp13.phx.gbl...
>
> Hi All,
> Using sql 2000 on windows 200 server
> I am trying to recover a SQL 2000 DB from crashed.
> Now I only have the .LDF file of the DB
> is there any way i can use to recover the db from the >LDF file
>
> Thanx,
> mate|||If you only have the LDF file, you have a problem. Are you certain you don't
have the mdf file as well? Or a backup?
The ldf file only contains the modifications performed in the database, and
if you never did a database backup, the file is emptied automatically
regularly. There exists log readers (see the link page on my web site), but
there's a high risk that the information is no longer there.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"zoro24" <zoro24@.hotmail.com> wrote in message
news:OZiWis2DEHA.240@.tk2msftngp13.phx.gbl...
>
> Hi All,
> Using sql 2000 on windows 200 server
> I am trying to recover a SQL 2000 DB from crashed.
> Now I only have the .LDF file of the DB
> is there any way i can use to recover the db from the >LDF file
>
> Thanx,
> mate
Wednesday, March 21, 2012
recovering database plz help
BOL for SQLSERVR command line:
-m
Indicates to start an instance of SQL Server in single-user mode. Only a single user can connect when SQL Server is started in single-user mode. The CHECKPOINT mechanism, which guarantees that completed transactions are regularly written from the disk cache to the database device, is not started. (Typically, this option is used if you experience problems with system databases that require repair.)sql
Recover SQL Server Data/Agent Tasks from old Data folder
I have got a sql server installation folder.. (data and log files
folder). The server crashed so installed a new OS and sql server
instance. I have recovered the old drive with the data and other
folders.
I tried copying all the files to the new data folder while the server
is not running and tried to start the server hoping that all my
databases and sql agent task will be there. But needless to say the sql
server wouldn't start like that. So i replaced the files back with the
newly installed files.
Now I have got these data folders with all my databases. I have copied
the mdf and ldf files and attached it to the newly installed server and
I have got back my databases. Is there a way to recover all the sql
agent tasks I used to have? How can I restore my msdb or master
databases..
Any tips would be appreciated..
Thanks
Sazzad
> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
Did you back up them?
"Sumon" <sumon.net@.gmail.com> wrote in message
news:1160981526.080016.173980@.h48g2000cwc.googlegr oups.com...
> Hi,
> I have got a sql server installation folder.. (data and log files
> folder). The server crashed so installed a new OS and sql server
> instance. I have recovered the old drive with the data and other
> folders.
> I tried copying all the files to the new data folder while the server
> is not running and tried to start the server hoping that all my
> databases and sql agent task will be there. But needless to say the sql
> server wouldn't start like that. So i replaced the files back with the
> newly installed files.
> Now I have got these data folders with all my databases. I have copied
> the mdf and ldf files and attached it to the newly installed server and
> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
> Any tips would be appreciated..
> Thanks
> Sazzad
>
|||Uri Dimant wrote:
[vbcol=seagreen]
> Did you back up them?
>
> "Sumon" <sumon.net@.gmail.com> wrote in message
> news:1160981526.080016.173980@.h48g2000cwc.googlegr oups.com...
If you have backup of MSDB you can restore its backup or if you have
mdf/ldf files you can attach files.
Which version of SQL Server you are using? 2000 or 2005?
Regards
Amish shah
Recover SQL Server Data/Agent Tasks from old Data folder
I have got a sql server installation folder.. (data and log files
folder). The server crashed so installed a new OS and sql server
instance. I have recovered the old drive with the data and other
folders.
I tried copying all the files to the new data folder while the server
is not running and tried to start the server hoping that all my
databases and sql agent task will be there. But needless to say the sql
server wouldn't start like that. So i replaced the files back with the
newly installed files.
Now I have got these data folders with all my databases. I have copied
the mdf and ldf files and attached it to the newly installed server and
I have got back my databases. Is there a way to recover all the sql
agent tasks I used to have? How can I restore my msdb or master
databases..
Any tips would be appreciated..
Thanks
Sazzad> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
Did you back up them?
"Sumon" <sumon.net@.gmail.com> wrote in message
news:1160981526.080016.173980@.h48g2000cwc.googlegroups.com...
> Hi,
> I have got a sql server installation folder.. (data and log files
> folder). The server crashed so installed a new OS and sql server
> instance. I have recovered the old drive with the data and other
> folders.
> I tried copying all the files to the new data folder while the server
> is not running and tried to start the server hoping that all my
> databases and sql agent task will be there. But needless to say the sql
> server wouldn't start like that. So i replaced the files back with the
> newly installed files.
> Now I have got these data folders with all my databases. I have copied
> the mdf and ldf files and attached it to the newly installed server and
> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
> Any tips would be appreciated..
> Thanks
> Sazzad
>|||Uri Dimant wrote:
> > I have got back my databases. Is there a way to recover all the sql
> > agent tasks I used to have? How can I restore my msdb or master
> > databases..
> Did you back up them?
>
> "Sumon" <sumon.net@.gmail.com> wrote in message
> news:1160981526.080016.173980@.h48g2000cwc.googlegroups.com...
> > Hi,
> >
> > I have got a sql server installation folder.. (data and log files
> > folder). The server crashed so installed a new OS and sql server
> > instance. I have recovered the old drive with the data and other
> > folders.
> >
> > I tried copying all the files to the new data folder while the server
> > is not running and tried to start the server hoping that all my
> > databases and sql agent task will be there. But needless to say the sql
> > server wouldn't start like that. So i replaced the files back with the
> > newly installed files.
> >
> > Now I have got these data folders with all my databases. I have copied
> > the mdf and ldf files and attached it to the newly installed server and
> > I have got back my databases. Is there a way to recover all the sql
> > agent tasks I used to have? How can I restore my msdb or master
> > databases..
> >
> > Any tips would be appreciated..
> >
> > Thanks
> >
> > Sazzad
> >
If you have backup of MSDB you can restore its backup or if you have
mdf/ldf files you can attach files.
Which version of SQL Server you are using? 2000 or 2005?
Regards
Amish shah
Recover SQL Server Data/Agent Tasks from old Data folder
I have got a sql server installation folder.. (data and log files
folder). The server crashed so installed a new OS and sql server
instance. I have recovered the old drive with the data and other
folders.
I tried copying all the files to the new data folder while the server
is not running and tried to start the server hoping that all my
databases and sql agent task will be there. But needless to say the sql
server wouldn't start like that. So i replaced the files back with the
newly installed files.
Now I have got these data folders with all my databases. I have copied
the mdf and ldf files and attached it to the newly installed server and
I have got back my databases. Is there a way to recover all the sql
agent tasks I used to have? How can I restore my msdb or master
databases..
Any tips would be appreciated..
Thanks
Sazzad> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
Did you back up them?
"Sumon" <sumon.net@.gmail.com> wrote in message
news:1160981526.080016.173980@.h48g2000cwc.googlegroups.com...
> Hi,
> I have got a sql server installation folder.. (data and log files
> folder). The server crashed so installed a new OS and sql server
> instance. I have recovered the old drive with the data and other
> folders.
> I tried copying all the files to the new data folder while the server
> is not running and tried to start the server hoping that all my
> databases and sql agent task will be there. But needless to say the sql
> server wouldn't start like that. So i replaced the files back with the
> newly installed files.
> Now I have got these data folders with all my databases. I have copied
> the mdf and ldf files and attached it to the newly installed server and
> I have got back my databases. Is there a way to recover all the sql
> agent tasks I used to have? How can I restore my msdb or master
> databases..
> Any tips would be appreciated..
> Thanks
> Sazzad
>|||Uri Dimant wrote:
[vbcol=seagreen]
> Did you back up them?
>
> "Sumon" <sumon.net@.gmail.com> wrote in message
> news:1160981526.080016.173980@.h48g2000cwc.googlegroups.com...
If you have backup of MSDB you can restore its backup or if you have
mdf/ldf files you can attach files.
Which version of SQL Server you are using? 2000 or 2005?
Regards
Amish shah
Tuesday, March 20, 2012
Recover Master database fron only MDF file
found out that the Master database is corrupt. I never backup my
server using inline sql backup nor any third party backup program that
aware to SQL server. But I have full system backup of volume c on tape
(using NTBackup), which includes old version of Master database. My
questions are:
1. How can I recover this file into SQL server?
2. If so, it is not risky to recover Master database from two weeks
ago?
Thanks in advance!"Moti" <Moti.Ba@.gmail.com> wrote in message
news:67f10867.0410101311.1317a99e@.posting.google.c om...
>I have SQL server 2000 which recently crashed. I try to recover it and
> found out that the Master database is corrupt. I never backup my
> server using inline sql backup nor any third party backup program that
> aware to SQL server. But I have full system backup of volume c on tape
> (using NTBackup), which includes old version of Master database. My
> questions are:
> 1. How can I recover this file into SQL server?
> 2. If so, it is not risky to recover Master database from two weeks
> ago?
> Thanks in advance!
It's not clear what you mean by "corrupt" - can you actually start MSSQL?
Have you used DBCC CHECKDB? Assuming that MSSQL is running (or that you have
another installation/instance you can use), you could try this:
1. Use sp_attach_single_file_db to attach the database with a different
name, eg. master2
2. Backup the master2 database
3. Restore master2 backup over master - see "Restoring the master Database
from a Current Backup" in Books Online
4. Use sp_attach_db to attach any databases which you created in the last
two weeks
If it works (which is not at all guaranteed), then you would lose anything
that changed in master over the past 2 weeks, such as logins, linked server
definitions, database locations etc.
If it doesn't work, you can try rebuilding the master database, then
reattach your user databases - see "Rebuilding the master Database" in Books
Online.
If you want a quick way to get started with a backup/restore plan, you
could create a maintenance plan to backup all your databases for you. But
you should still read up on backup/restore in Books Online, because your
requirements might be more complicated than a simple maintenance plan.
Simon
Friday, March 9, 2012
recover crashed database
open this database in read only\suspect\offline\emergency mode.when we
execute "select" query we take
"torn page error".
and i also execute
"DBCC CheckDB
( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
and i take
"Could not run BEGIN TRANSACTION in database 'dbname' because the database
is in bypass recovery mode."
when execute
DBCC ALLOCDB ( 'dbname' )
i take 16 allocation errors on this database
i must take all data from this database how can i recover this database or
take complete datas
Hi
Did not have a last good full backup?
Also take a look at sp_resetstatus system stored procedure in the BOL
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql
> server
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>
|||no i havent.
i execute
sp_resetstatus 'dbname'
and take this message
"Prior to updating sysdatabases entry for database 'ott', mode = 0 and
status = -280 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made."
but i take same error when execute
DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )
|||Try this.
http://www.faqs.org/qa/qa-3213.html
AND IN FUTURE TAKE BACKUPS.
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:FBDF1BC8-7451-45A1-B02A-ADD289FDD21B@.microsoft.com...
> no i havent.
> i execute
> sp_resetstatus 'dbname'
> and take this message
> "Prior to updating sysdatabases entry for database 'ott', mode = 0 and
> status = -280 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made."
> but i take same error when execute
> DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )
|||i done all your writes but dont work yet.database status change to suspect
mode and dont permit to recover database
|||Or this
http://support.microsoft.com/default...b;en-us;165918
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>i done all your writes but dont work yet.database status change to suspect
> mode and dont permit to recover database
|||Sorry that's 6.5
Nik Marshall-Blank MCSD/MCDBA
"Nik Marshall-Blank (delete fcom for my email address)"
<NikMB@.fcomiNodefcom.afcomt> wrote in message
news:zLUZe.131890$in2.119840@.fe04.news.easynews.co m...
> Or this
> http://support.microsoft.com/default...b;en-us;165918
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
> news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>
|||Open a case with Microsoft Support and see if they have any means of salvaging any data. Of,
assuming that you can access the database at all, export all data to a new healthy database (lot of
work, yes). Some thoughts also here: http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql server
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>
recover crashed database
open this database in read only\suspect\offline\emergency mode.when we
execute "select" query we take
"torn page error".
and i also execute
"DBCC CheckDB
( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
and i take
"Could not run BEGIN TRANSACTION in database 'dbname' because the database
is in bypass recovery mode."
when execute
DBCC ALLOCDB ( 'dbname' )
i take 16 allocation errors on this database
i must take all data from this database how can i recover this database or
take complete datasHi
Did not have a last good full backup?
Also take a look at sp_resetstatus system stored procedure in the BOL
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql
> server
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>|||no i havent.
i execute
sp_resetstatus 'dbname'
and take this message
"Prior to updating sysdatabases entry for database 'ott', mode = 0 and
status = -280 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made."
but i take same error when execute
DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )|||Try this.
http://www.faqs.org/qa/qa-3213.html
AND IN FUTURE TAKE BACKUPS.
--
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:FBDF1BC8-7451-45A1-B02A-ADD289FDD21B@.microsoft.com...
> no i havent.
> i execute
> sp_resetstatus 'dbname'
> and take this message
> "Prior to updating sysdatabases entry for database 'ott', mode = 0 and
> status = -280 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made."
> but i take same error when execute
> DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )|||i done all your writes but dont work yet.database status change to suspect
mode and dont permit to recover database|||Or this
http://support.microsoft.com/default.aspx?scid=kb;en-us;165918
--
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>i done all your writes but dont work yet.database status change to suspect
> mode and dont permit to recover database|||Sorry that's 6.5
--
Nik Marshall-Blank MCSD/MCDBA
"Nik Marshall-Blank (delete fcom for my email address)"
<NikMB@.fcomiNodefcom.afcomt> wrote in message
news:zLUZe.131890$in2.119840@.fe04.news.easynews.com...
> Or this
> http://support.microsoft.com/default.aspx?scid=kb;en-us;165918
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
> news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>>i done all your writes but dont work yet.database status change to suspect
>> mode and dont permit to recover database
>|||Open a case with Microsoft Support and see if they have any means of salvaging any data. Of,
assuming that you can access the database at all, export all data to a new healthy database (lot of
work, yes). Some thoughts also here: http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql server
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>
recover crashed database
r
open this database in read only\suspect\offline\emergency mode.when we
execute "select" query we take
"torn page error".
and i also execute
"DBCC CheckDB
( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
and i take
"Could not run BEGIN TRANSACTION in database 'dbname' because the database
is in bypass recovery mode."
when execute
DBCC ALLOCDB ( 'dbname' )
i take 16 allocation errors on this database
i must take all data from this database how can i recover this database or
take complete datasHi
Did not have a last good full backup?
Also take a look at sp_resetstatus system stored procedure in the BOL
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql
> server
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>|||no i havent.
i execute
sp_resetstatus 'dbname'
and take this message
"Prior to updating sysdatabases entry for database 'ott', mode = 0 and
status = -280 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made."
but i take same error when execute
DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )|||Try this.
http://www.faqs.org/qa/qa-3213.html
AND IN FUTURE TAKE BACKUPS.
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:FBDF1BC8-7451-45A1-B02A-ADD289FDD21B@.microsoft.com...
> no i havent.
> i execute
> sp_resetstatus 'dbname'
> and take this message
> "Prior to updating sysdatabases entry for database 'ott', mode = 0 and
> status = -280 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made."
> but i take same error when execute
> DBCC CheckDB ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )|||i done all your writes but dont work yet.database status change to suspect
mode and dont permit to recover database|||Or this
http://support.microsoft.com/defaul...kb;en-us;165918
--
Nik Marshall-Blank MCSD/MCDBA
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>i done all your writes but dont work yet.database status change to suspect
> mode and dont permit to recover database|||Sorry that's 6.5
Nik Marshall-Blank MCSD/MCDBA
"Nik Marshall-Blank (delete fcom for my email address)"
<NikMB@.fcomiNodefcom.afcomt> wrote in message
news:zLUZe.131890$in2.119840@.fe04.news.easynews.com...
> Or this
> http://support.microsoft.com/defaul...kb;en-us;165918
> --
> Nik Marshall-Blank MCSD/MCDBA
> "Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
> news:B8E724A2-122E-40B0-84FB-18393E25F9EB@.microsoft.com...
>|||Open a case with Microsoft Support and see if they have any means of salvagi
ng any data. Of,
assuming that you can access the database at all, export all data to a new h
ealthy database (lot of
work, yes). Some thoughts also here: http://www.karaszi.com/SQLServer/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sabri AKIN" <SabriAKIN@.discussions.microsoft.com> wrote in message
news:9A4C6270-8982-4718-B5E6-D81183DEC6DA@.microsoft.com...
> our sqlserver has crashed and try to attach mdf file to server but sql ser
ver
> open this database in read only\suspect\offline\emergency mode.when we
> execute "select" query we take
> "torn page error".
> and i also execute
> "DBCC CheckDB
> ( 'dbname' ,REPAIR_ALLOW_DATA_LOSS )"
> and i take
> "Could not run BEGIN TRANSACTION in database 'dbname' because the database
> is in bypass recovery mode."
> when execute
> DBCC ALLOCDB ( 'dbname' )
> i take 16 allocation errors on this database
> i must take all data from this database how can i recover this database or
> take complete datas
>
Recover Bad Logs
We have a database that crashed and the log file is bad and the last good
backup was october, so the transaction log is bigger than the data file.
Since the transaction log is corrupt,and we have no backups because the last
good backup was october, can I do something with that corrupt transaction log
to get those transactions out of it and bring forward the database to be
current with all transactions?
Need some help. This is a production DB.
Chris Davoli
"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:044D39A3-23A9-424A-93AC-A8D063962B5C@.microsoft.com...
> SQL Server 2000
> We have a database that crashed and the log file is bad and the last good
> backup was october, so the transaction log is bigger than the data file.
> Since the transaction log is corrupt,and we have no backups because the
> last
> good backup was october, can I do something with that corrupt transaction
> log
> to get those transactions out of it and bring forward the database to be
> current with all transactions?
Call Microsoft. Most likely your DB is hosed. But sometimes they can work
miracles.
> Need some help. This is a production DB.
> --
> Chris Davoli
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Recover Bad Logs
We have a database that crashed and the log file is bad and the last good
backup was october, so the transaction log is bigger than the data file.
Since the transaction log is corrupt,and we have no backups because the last
good backup was october, can I do something with that corrupt transaction log
to get those transactions out of it and bring forward the database to be
current with all transactions?
Need some help. This is a production DB.
--
Chris Davoli"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:044D39A3-23A9-424A-93AC-A8D063962B5C@.microsoft.com...
> SQL Server 2000
> We have a database that crashed and the log file is bad and the last good
> backup was october, so the transaction log is bigger than the data file.
> Since the transaction log is corrupt,and we have no backups because the
> last
> good backup was october, can I do something with that corrupt transaction
> log
> to get those transactions out of it and bring forward the database to be
> current with all transactions?
Call Microsoft. Most likely your DB is hosed. But sometimes they can work
miracles.
> Need some help. This is a production DB.
> --
> Chris Davoli
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||"Chris Davoli" <ChrisDavoli@.discussions.microsoft.com> wrote in message
news:044D39A3-23A9-424A-93AC-A8D063962B5C@.microsoft.com...
> SQL Server 2000
> We have a database that crashed and the log file is bad and the last good
> backup was october, so the transaction log is bigger than the data file.
> Since the transaction log is corrupt,and we have no backups because the
> last
> good backup was october, can I do something with that corrupt transaction
> log
> to get those transactions out of it and bring forward the database to be
> current with all transactions?
> Need some help. This is a production DB.
> --
> Chris Davoli
>
Recover a standby db
I have a standby server with standby db sync-ed with prod through log
shipping.
I have all log files crashed(backup server). No log files. I need to recover
the db in standby server without any log files.
How do I do it?
ThanksOn the standby server:
RESTORE DATABASE dbname WITH RECOVERY
Above will put the database out of the restoring phase. You will of course l
ose all work done since
last log backup applies on the standby server.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mecn" <mecn2002@.yahoo.com> wrote in message news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...[v
bcol=seagreen]
> Hi,
> I have a standby server with standby db sync-ed with prod through log ship
ping.
> I have all log files crashed(backup server). No log files. I need to recov
er the db in standby
> server without any log files.
> How do I do it?
>
> Thanks
>[/vbcol]|||Thanks,
The problem that I have is that I don't have the db and log backups.
The only thing left is standby db in standby server.
I need to recover the db in standby server.
Thanks again
"mecn" <mecn2002@.yahoo.com> wrote in message
news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I have a standby server with standby db sync-ed with prod through log
> shipping.
> I have all log files crashed(backup server). No log files. I need to
> recover the db in standby server without any log files.
> How do I do it?
>
> Thanks
>|||I understand. The RESTORE command I suggested don't need any backup files. R
ead the restore command
closely and you will see that no backup files are specified. The only thing
it does is to take the
database out of the restoring phase (it will perform the UNDO phase).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mecn" <mecn2002@.yahoo.com> wrote in message news:e2D4ijWFHHA.4652@.TK2MSFTNGP04.phx.gbl...[v
bcol=seagreen]
> Thanks,
> The problem that I have is that I don't have the db and log backups.
> The only thing left is standby db in standby server.
> I need to recover the db in standby server.
> Thanks again
> "mecn" <mecn2002@.yahoo.com> wrote in message news:ObEXrEWFHHA.1188@.TK2MSFT
NGP06.phx.gbl...
>[/vbcol]|||Got it . Thanks a lot.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:em4LrmWFHHA.3368@.TK2MSFTNGP03.phx.gbl...
>I understand. The RESTORE command I suggested don't need any backup files.
>Read the restore command closely and you will see that no backup files are
>specified. The only thing it does is to take the database out of the
>restoring phase (it will perform the UNDO phase).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:e2D4ijWFHHA.4652@.TK2MSFTNGP04.phx.gbl...
>
Recover a standby db
I have a standby server with standby db sync-ed with prod through log
shipping.
I have all log files crashed(backup server). No log files. I need to recover
the db in standby server without any log files.
How do I do it?
Thanks
Thanks,
The problem that I have is that I don't have the db and log backups.
The only thing left is standby db in standby server.
I need to recover the db in standby server.
Thanks again
"mecn" <mecn2002@.yahoo.com> wrote in message
news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I have a standby server with standby db sync-ed with prod through log
> shipping.
> I have all log files crashed(backup server). No log files. I need to
> recover the db in standby server without any log files.
> How do I do it?
>
> Thanks
>
|||Got it . Thanks a lot.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:em4LrmWFHHA.3368@.TK2MSFTNGP03.phx.gbl...
>I understand. The RESTORE command I suggested don't need any backup files.
>Read the restore command closely and you will see that no backup files are
>specified. The only thing it does is to take the database out of the
>restoring phase (it will perform the UNDO phase).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:e2D4ijWFHHA.4652@.TK2MSFTNGP04.phx.gbl...
>
Recover a standby db
I have a standby server with standby db sync-ed with prod through log
shipping.
I have all log files crashed(backup server). No log files. I need to recover
the db in standby server without any log files.
How do I do it?
ThanksOn the standby server:
RESTORE DATABASE dbname WITH RECOVERY
Above will put the database out of the restoring phase. You will of course lose all work done since
last log backup applies on the standby server.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mecn" <mecn2002@.yahoo.com> wrote in message news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I have a standby server with standby db sync-ed with prod through log shipping.
> I have all log files crashed(backup server). No log files. I need to recover the db in standby
> server without any log files.
> How do I do it?
>
> Thanks
>|||Thanks,
The problem that I have is that I don't have the db and log backups.
The only thing left is standby db in standby server.
I need to recover the db in standby server.
Thanks again
"mecn" <mecn2002@.yahoo.com> wrote in message
news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I have a standby server with standby db sync-ed with prod through log
> shipping.
> I have all log files crashed(backup server). No log files. I need to
> recover the db in standby server without any log files.
> How do I do it?
>
> Thanks
>|||I understand. The RESTORE command I suggested don't need any backup files. Read the restore command
closely and you will see that no backup files are specified. The only thing it does is to take the
database out of the restoring phase (it will perform the UNDO phase).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mecn" <mecn2002@.yahoo.com> wrote in message news:e2D4ijWFHHA.4652@.TK2MSFTNGP04.phx.gbl...
> Thanks,
> The problem that I have is that I don't have the db and log backups.
> The only thing left is standby db in standby server.
> I need to recover the db in standby server.
> Thanks again
> "mecn" <mecn2002@.yahoo.com> wrote in message news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
>> Hi,
>> I have a standby server with standby db sync-ed with prod through log shipping.
>> I have all log files crashed(backup server). No log files. I need to recover the db in standby
>> server without any log files.
>> How do I do it?
>>
>> Thanks
>>
>|||Got it . Thanks a lot.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:em4LrmWFHHA.3368@.TK2MSFTNGP03.phx.gbl...
>I understand. The RESTORE command I suggested don't need any backup files.
>Read the restore command closely and you will see that no backup files are
>specified. The only thing it does is to take the database out of the
>restoring phase (it will perform the UNDO phase).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:e2D4ijWFHHA.4652@.TK2MSFTNGP04.phx.gbl...
>> Thanks,
>> The problem that I have is that I don't have the db and log backups.
>> The only thing left is standby db in standby server.
>> I need to recover the db in standby server.
>> Thanks again
>> "mecn" <mecn2002@.yahoo.com> wrote in message
>> news:ObEXrEWFHHA.1188@.TK2MSFTNGP06.phx.gbl...
>> Hi,
>> I have a standby server with standby db sync-ed with prod through log
>> shipping.
>> I have all log files crashed(backup server). No log files. I need to
>> recover the db in standby server without any log files.
>> How do I do it?
>>
>> Thanks
>>
>>
>