Showing posts with label recovery. Show all posts
Showing posts with label recovery. Show all posts

Wednesday, March 21, 2012

Database setup for backup and recovery

I am new to SQLServer but a DB2 DBA.

I want to be able to backup a specific table and restore it. Actually, i may want to backup/restore several tables - a sub-set of tables on the database.

I understand that backup-recovery is at a database level, not a table-file-filrgroup level. Therefore i have to backup-restore a database, but i only want a table.

How do sites handle this. Are many databases created based on backup recovery requirements.

If so, then how do developers know what database tables reside in - given that there are now many databases created to handle recovery requirements. A synonymns/alias/views added ?

tia

glenn

If you put the table on its own filegroup, you can restore just that filegroup/table. Else, you will need to restore the database to a staging db and copy/transfer the table from the staging db to the real db.|||

Can i restore a single filegroup to a previous point in time (say 8am), but keep the rest of the database unchanged (say 10am).

Or, does the whole database have to be at the same point in time after a restore?

tia

Database setup for backup and recovery

I am new to SQLServer but a DB2 DBA.

I want to be able to backup a specific table and restore it. Actually, i may want to backup/restore several tables - a sub-set of tables on the database.

I understand that backup-recovery is at a database level, not a table-file-filrgroup level. Therefore i have to backup-restore a database, but i only want a table.

How do sites handle this. Are many databases created based on backup recovery requirements.

If so, then how do developers know what database tables reside in - given that there are now many databases created to handle recovery requirements. A synonymns/alias/views added ?

tia

glenn

If you put the table on its own filegroup, you can restore just that filegroup/table. Else, you will need to restore the database to a staging db and copy/transfer the table from the staging db to the real db.|||

Can i restore a single filegroup to a previous point in time (say 8am), but keep the rest of the database unchanged (say 10am).

Or, does the whole database have to be at the same point in time after a restore?

tia

Database set to simple recovery

Hello I want to perform a transaction log backup for disaster recovery every
30min. Because the recovery mode is set to simple it is not allowing me to
to do this.
My questions are;
1. What are the beneifits of a simple recovery? My transaction log still gro
ws very large.
2. What are the benefits of performing a transaction log backup?
3. Do I have to detach the database to change from simple to full recovery?
ThanksPlease read the page titled "Selecting a Recovery Model" in SQL Server 2000
Books Online. This answers most of your questions.
Transaction log backups help you recover to a point-in-time, and no, you
don't have to detach the database, to change the recovery mode. See ALTER
DATABASE command in SQL Server Books Online for more information on changing
recovery models of databases.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"robert salazar" <rsalazar@.cbbank.com> wrote in message
news:E055BCF9-34BE-45DE-BE89-62C56AF61E11@.microsoft.com...
Hello I want to perform a transaction log backup for disaster recovery every
30min. Because the recovery mode is set to simple it is not allowing me to
to do this.
My questions are;
1. What are the beneifits of a simple recovery? My transaction log still
grows very large.
2. What are the benefits of performing a transaction log backup?
3. Do I have to detach the database to change from simple to full recovery?
Thanks

Database set to simple recovery

Hello I want to perform a transaction log backup for disaster recovery every 30min. Because the recovery mode is set to simple it is not allowing me to to do this.
My questions are;
1. What are the beneifits of a simple recovery? My transaction log still grows very large.
2. What are the benefits of performing a transaction log backup?
3. Do I have to detach the database to change from simple to full recovery?
Thanks
Please read the page titled "Selecting a Recovery Model" in SQL Server 2000
Books Online. This answers most of your questions.
Transaction log backups help you recover to a point-in-time, and no, you
don't have to detach the database, to change the recovery mode. See ALTER
DATABASE command in SQL Server Books Online for more information on changing
recovery models of databases.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"robert salazar" <rsalazar@.cbbank.com> wrote in message
news:E055BCF9-34BE-45DE-BE89-62C56AF61E11@.microsoft.com...
Hello I want to perform a transaction log backup for disaster recovery every
30min. Because the recovery mode is set to simple it is not allowing me to
to do this.
My questions are;
1. What are the beneifits of a simple recovery? My transaction log still
grows very large.
2. What are the benefits of performing a transaction log backup?
3. Do I have to detach the database to change from simple to full recovery?
Thanks

Saturday, February 25, 2012

Database recovery with data file only

I had database whose log file and backup files are unavailable due to a media failure. I had the data file which is up to date.
Is it possible to recover the database?
I had tried using attach database utility but failed with an error message â'Device Activation error. Physical file name â'C:\...\xxx.ldfâ' may be incorrect.
Please advice me if anything can be done.
Thanking You"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
exec sp_attach_single_file_db creates the ldf file for you
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004|||Hi,
If you have mutiple LDF files as well as if the database is not detached you
may not be able to use sp_attach_single_file_db command.
In this case you can follow the below procedure to bring the database up.
But few of the steps are purely undocuemnted.
A solution for this is:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. STart SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files
update sysdatabases set status=32768 where name ='dbname'
6. Restart sql server. now the database will be in emergency mode
7. Now execute the undocumented DBCC to create a log file
DBCC REBUILD_LOG(dbname,'c:\dbname.ldf')
8. Execute sp_resetstatus <dbname>
9. Restart SQL server and see the database is online.
Thanks
Hari
MCDBA
"Bob Simms" <bob_simms@.somewhere.com> wrote in message
news:1vbDc.45061$ly2.28055@.doctor.cableinet.net...
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> > I had database whose log file and backup files are unavailable due to a
> media failure. I had the data file which is up to date.
> >
> > Is it possible to recover the database?
> >
> > I had tried using attach database utility but failed with an error
message
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
> >
> > Please advice me if anything can be done.
> >
> > Thanking You
> exec sp_attach_single_file_db creates the ldf file for you
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
>|||A word of warning regarding the technique proposed by Hari. Forcibly
rebuilding the transaction log results in a database with questionable
integrity. Data may be physically corrupt or logically inconsistent because
normal database recovery did not take place.
A preferable method is to restore from backup. If the log must be rebuilt
because no backup is available, I suggest data be exported and then imported
into a clean database.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
>|||Hi Dan,
I accept what you say regarding data integrity.
I suggested /recommended this method only because ken do not have the
database Backup as well as
no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
approach. After bringing
up the database ken can execute a DBCC CHECKDB and confirm that database is
fine or not.
--
Thanks
Hari
MCDBA
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> A word of warning regarding the technique proposed by Hari. Forcibly
> rebuilding the transaction log results in a database with questionable
> integrity. Data may be physically corrupt or logically inconsistent
because
> normal database recovery did not take place.
> A preferable method is to restore from backup. If the log must be rebuilt
> because no backup is available, I suggest data be exported and then
imported
> into a clean database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> > I had database whose log file and backup files are unavailable due to a
> media failure. I had the data file which is up to date.
> >
> > Is it possible to recover the database?
> >
> > I had tried using attach database utility but failed with an error
message
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
> >
> > Please advice me if anything can be done.
> >
> > Thanking You
> >
>|||Although DBCC CHECKDB can detect physical corruption, there could be logical
errors as well, such as orphaned data and uncommitted data. I wanted Ken to
fully understand the implications of rebuilding the log.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
> Hi Dan,
> I accept what you say regarding data integrity.
> I suggested /recommended this method only because ken do not have the
> database Backup as well as
> no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database
is
> fine or not.
> --
> Thanks
> Hari
> MCDBA
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > A word of warning regarding the technique proposed by Hari. Forcibly
> > rebuilding the transaction log results in a database with questionable
> > integrity. Data may be physically corrupt or logically inconsistent
> because
> > normal database recovery did not take place.
> >
> > A preferable method is to restore from backup. If the log must be
rebuilt
> > because no backup is available, I suggest data be exported and then
> imported
> > into a clean database.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> > news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> > > I had database whose log file and backup files are unavailable due to
a
> > media failure. I had the data file which is up to date.
> > >
> > > Is it possible to recover the database?
> > >
> > > I had tried using attach database utility but failed with an error
> message
> > "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> > incorrect.
> > >
> > > Please advice me if anything can be done.
> > >
> > > Thanking You
> > >
> >
> >
>|||Basically using that command breaks your business logic as there's no
guarantee of any constraints (implied or explicit) being true any more.
Also, the use of the command is unsupported and its use is tracked by the
server.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:O5DUi6dXEHA.2844@.TK2MSFTNGP11.phx.gbl...
> Although DBCC CHECKDB can detect physical corruption, there could be
logical
> errors as well, such as orphaned data and uncommitted data. I wanted Ken
to
> fully understand the implications of rebuilding the log.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
> > Hi Dan,
> >
> > I accept what you say regarding data integrity.
> > I suggested /recommended this method only because ken do not have the
> > database Backup as well as
> > no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> > approach. After bringing
> > up the database ken can execute a DBCC CHECKDB and confirm that
database
> is
> > fine or not.
> >
> > --
> > Thanks
> > Hari
> > MCDBA
> > "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> > news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > > A word of warning regarding the technique proposed by Hari. Forcibly
> > > rebuilding the transaction log results in a database with questionable
> > > integrity. Data may be physically corrupt or logically inconsistent
> > because
> > > normal database recovery did not take place.
> > >
> > > A preferable method is to restore from backup. If the log must be
> rebuilt
> > > because no backup is available, I suggest data be exported and then
> > imported
> > > into a clean database.
> > >
> > > --
> > > Hope this helps.
> > >
> > > Dan Guzman
> > > SQL Server MVP
> > >
> > > --
> > > Hope this helps.
> > >
> > > Dan Guzman
> > > SQL Server MVP
> > >
> > > "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> > > news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> > > > I had database whose log file and backup files are unavailable due
to
> a
> > > media failure. I had the data file which is up to date.
> > > >
> > > > Is it possible to recover the database?
> > > >
> > > > I had tried using attach database utility but failed with an error
> > message
> > > "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> > > incorrect.
> > > >
> > > > Please advice me if anything can be done.
> > > >
> > > > Thanking You
> > > >
> > >
> > >
> >
> >
>|||There are many approaches that seem "easier and faster" but
they aren't necessarily good ideas and can actually not
really be "easier and faster" in the long run.
Note Paul's response. I remembered that Sybase used to (or
still does, I don't know) have the command and if it failed
once or twice, you essentially ended up with a useless data
file and couldn't execute the command anymore. There are
even easier sql commands posted up here that users have
problems getting right the first or second time - and all of
us have had those days where typing a simple select doesn't
work. For those reasons, it's probably better for a user to
call support and have someone from PSS walk them through the
process carefully. Ever since it's been posted on
newsgroups, I've seen it abused and misused by companies.
If they end up with nothing but a useless data file, it may
have actually have been "easier and faster" for them to get
the backups read off the failed media from a company that
specializes in that and restore the database from those
files.
-Sue
On Tue, 29 Jun 2004 18:46:10 +0530, "Hari"
<hari_prasad_k@.hotmail.com> wrote:
>Hi Dan,
>I accept what you say regarding data integrity.
>I suggested /recommended this method only because ken do not have the
>database Backup as well as
>no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
>approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database is
>fine or not.|||One more note - the command (not the functionality) has been removed in SQL
Server 2005. Also, in SQL Server 2005, the fact that the functionality was
used is persisted permanently in the database so PSS can tell whether any
problems a user is seeing is because of misuse of the functionality.
In SQL Server 2005, emergency mode is documented and there's a new
documented way of recovering from this situation using DBCC CHECKDB.
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:8j54e0175e35lc2v53m8j771hq1lm8rn32@.4ax.com...
> There are many approaches that seem "easier and faster" but
> they aren't necessarily good ideas and can actually not
> really be "easier and faster" in the long run.
> Note Paul's response. I remembered that Sybase used to (or
> still does, I don't know) have the command and if it failed
> once or twice, you essentially ended up with a useless data
> file and couldn't execute the command anymore. There are
> even easier sql commands posted up here that users have
> problems getting right the first or second time - and all of
> us have had those days where typing a simple select doesn't
> work. For those reasons, it's probably better for a user to
> call support and have someone from PSS walk them through the
> process carefully. Ever since it's been posted on
> newsgroups, I've seen it abused and misused by companies.
> If they end up with nothing but a useless data file, it may
> have actually have been "easier and faster" for them to get
> the backups read off the failed media from a company that
> specializes in that and restore the database from those
> files.
> -Sue
> On Tue, 29 Jun 2004 18:46:10 +0530, "Hari"
> <hari_prasad_k@.hotmail.com> wrote:
> >Hi Dan,
> >
> >I accept what you say regarding data integrity.
> >I suggested /recommended this method only because ken do not have the
> >database Backup as well as
> >no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> >approach. After bringing
> > up the database ken can execute a DBCC CHECKDB and confirm that database
is
> >fine or not.
>

Database recovery with data file only

I had database whose log file and backup files are unavailable due to a media failure. I had the data file which is up to date.
Is it possible to recover the database?
I had tried using attach database utility but failed with an error message “Device Activation error. Physical file name “C:\...\xxx.ldf” may be incorrect.
Please advice me if anything can be done.
Thanking You
"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
exec sp_attach_single_file_db creates the ldf file for you
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
|||Hi,
If you have mutiple LDF files as well as if the database is not detached you
may not be able to use sp_attach_single_file_db command.
In this case you can follow the below procedure to bring the database up.
But few of the steps are purely undocuemnted.
A solution for this is:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. STart SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files
update sysdatabases set status=32768 where name ='dbname'
6. Restart sql server. now the database will be in emergency mode
7. Now execute the undocumented DBCC to create a log file
DBCC REBUILD_LOG(dbname,'c:\dbname.ldf')
8. Execute sp_resetstatus <dbname>
9. Restart SQL server and see the database is online.
Thanks
Hari
MCDBA
"Bob Simms" <bob_simms@.somewhere.com> wrote in message
news:1vbDc.45061$ly2.28055@.doctor.cableinet.net... [vbcol=seagreen]
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> media failure. I had the data file which is up to date.
message
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
> exec sp_attach_single_file_db creates the ldf file for you
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
>
|||A word of warning regarding the technique proposed by Hari. Forcibly
rebuilding the transaction log results in a database with questionable
integrity. Data may be physically corrupt or logically inconsistent because
normal database recovery did not take place.
A preferable method is to restore from backup. If the log must be rebuilt
because no backup is available, I suggest data be exported and then imported
into a clean database.
Hope this helps.
Dan Guzman
SQL Server MVP
Hope this helps.
Dan Guzman
SQL Server MVP
"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
>
|||A word of warning regarding the technique proposed by Hari. Forcibly
rebuilding the transaction log results in a database with questionable
integrity. Data may be physically corrupt or logically inconsistent because
normal database recovery did not take place.
A preferable method is to restore from backup. If the log must be rebuilt
because no backup is available, I suggest data be exported and then imported
into a clean database.
Hope this helps.
Dan Guzman
SQL Server MVP
Hope this helps.
Dan Guzman
SQL Server MVP
"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
>
|||Hi Dan,
I accept what you say regarding data integrity.
I suggested /recommended this method only because ken do not have the
database Backup as well as
no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
approach. After bringing
up the database ken can execute a DBCC CHECKDB and confirm that database is
fine or not.
Thanks
Hari
MCDBA
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> A word of warning regarding the technique proposed by Hari. Forcibly
> rebuilding the transaction log results in a database with questionable
> integrity. Data may be physically corrupt or logically inconsistent
because
> normal database recovery did not take place.
> A preferable method is to restore from backup. If the log must be rebuilt
> because no backup is available, I suggest data be exported and then
imported[vbcol=seagreen]
> into a clean database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> media failure. I had the data file which is up to date.
message
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
>
|||Hi Dan,
I accept what you say regarding data integrity.
I suggested /recommended this method only because ken do not have the
database Backup as well as
no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
approach. After bringing
up the database ken can execute a DBCC CHECKDB and confirm that database is
fine or not.
Thanks
Hari
MCDBA
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> A word of warning regarding the technique proposed by Hari. Forcibly
> rebuilding the transaction log results in a database with questionable
> integrity. Data may be physically corrupt or logically inconsistent
because
> normal database recovery did not take place.
> A preferable method is to restore from backup. If the log must be rebuilt
> because no backup is available, I suggest data be exported and then
imported[vbcol=seagreen]
> into a clean database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> media failure. I had the data file which is up to date.
message
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
>
|||Although DBCC CHECKDB can detect physical corruption, there could be logical
errors as well, such as orphaned data and uncommitted data. I wanted Ken to
fully understand the implications of rebuilding the log.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
> Hi Dan,
> I accept what you say regarding data integrity.
> I suggested /recommended this method only because ken do not have the
> database Backup as well as
> no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database
is[vbcol=seagreen]
> fine or not.
> --
> Thanks
> Hari
> MCDBA
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> because
rebuilt[vbcol=seagreen]
> imported
a
> message
>
|||Although DBCC CHECKDB can detect physical corruption, there could be logical
errors as well, such as orphaned data and uncommitted data. I wanted Ken to
fully understand the implications of rebuilding the log.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
> Hi Dan,
> I accept what you say regarding data integrity.
> I suggested /recommended this method only because ken do not have the
> database Backup as well as
> no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database
is[vbcol=seagreen]
> fine or not.
> --
> Thanks
> Hari
> MCDBA
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> because
rebuilt[vbcol=seagreen]
> imported
a
> message
>
|||Basically using that command breaks your business logic as there's no
guarantee of any constraints (implied or explicit) being true any more.
Also, the use of the command is unsupported and its use is tracked by the
server.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:O5DUi6dXEHA.2844@.TK2MSFTNGP11.phx.gbl...
> Although DBCC CHECKDB can detect physical corruption, there could be
logical
> errors as well, such as orphaned data and uncommitted data. I wanted Ken
to[vbcol=seagreen]
> fully understand the implications of rebuilding the log.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
database[vbcol=seagreen]
> is
> rebuilt
to
> a
>

Database recovery with data file only

I had database whose log file and backup files are unavailable due to a medi
a failure. I had the data file which is up to date.
Is it possible to recover the database?
I had tried using attach database utility but failed with an error message
Device Activation error. Physical file name “C:\...\xxx.ldf” may be i
ncorrect.
Please advice me if anything can be done.
Thanking You"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
exec sp_attach_single_file_db creates the ldf file for you
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004|||Hi,
If you have mutiple LDF files as well as if the database is not detached you
may not be able to use sp_attach_single_file_db command.
In this case you can follow the below procedure to bring the database up.
But few of the steps are purely undocuemnted.
A solution for this is:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. STart SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files
update sysdatabases set status=32768 where name ='dbname'
6. Restart sql server. now the database will be in emergency mode
7. Now execute the undocumented DBCC to create a log file
DBCC REBUILD_LOG(dbname,'c:\dbname.ldf')
8. Execute sp_resetstatus <dbname>
9. Restart SQL server and see the database is online.
Thanks
Hari
MCDBA
"Bob Simms" <bob_simms@.somewhere.com> wrote in message
news:1vbDc.45061$ly2.28055@.doctor.cableinet.net...
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> media failure. I had the data file which is up to date.
message[vbcol=seagreen]
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
> exec sp_attach_single_file_db creates the ldf file for you
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
>|||A word of warning regarding the technique proposed by Hari. Forcibly
rebuilding the transaction log results in a database with questionable
integrity. Data may be physically corrupt or logically inconsistent because
normal database recovery did not take place.
A preferable method is to restore from backup. If the log must be rebuilt
because no backup is available, I suggest data be exported and then imported
into a clean database.
Hope this helps.
Dan Guzman
SQL Server MVP
Hope this helps.
Dan Guzman
SQL Server MVP
"Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> I had database whose log file and backup files are unavailable due to a
media failure. I had the data file which is up to date.
> Is it possible to recover the database?
> I had tried using attach database utility but failed with an error message
"Device Activation error. Physical file name "C:\...\xxx.ldf" may be
incorrect.
> Please advice me if anything can be done.
> Thanking You
>|||Hi Dan,
I accept what you say regarding data integrity.
I suggested /recommended this method only because ken do not have the
database Backup as well as
no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
approach. After bringing
up the database ken can execute a DBCC CHECKDB and confirm that database is
fine or not.
Thanks
Hari
MCDBA
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> A word of warning regarding the technique proposed by Hari. Forcibly
> rebuilding the transaction log results in a database with questionable
> integrity. Data may be physically corrupt or logically inconsistent
because
> normal database recovery did not take place.
> A preferable method is to restore from backup. If the log must be rebuilt
> because no backup is available, I suggest data be exported and then
imported
> into a clean database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ken.net" <Ken.net@.discussions.microsoft.com> wrote in message
> news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@.microsoft.com...
> media failure. I had the data file which is up to date.
message[vbcol=seagreen]
> "Device Activation error. Physical file name "C:\...\xxx.ldf" may be
> incorrect.
>|||Although DBCC CHECKDB can detect physical corruption, there could be logical
errors as well, such as orphaned data and uncommitted data. I wanted Ken to
fully understand the implications of rebuilding the log.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
> Hi Dan,
> I accept what you say regarding data integrity.
> I suggested /recommended this method only because ken do not have the
> database Backup as well as
> no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database
is
> fine or not.
> --
> Thanks
> Hari
> MCDBA
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:ev$$EMZXEHA.1652@.TK2MSFTNGP09.phx.gbl...
> because
rebuilt[vbcol=seagreen]
> imported
a[vbcol=seagreen]
> message
>|||Basically using that command breaks your business logic as there's no
guarantee of any constraints (implied or explicit) being true any more.
Also, the use of the command is unsupported and its use is tracked by the
server.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:O5DUi6dXEHA.2844@.TK2MSFTNGP11.phx.gbl...
> Although DBCC CHECKDB can detect physical corruption, there could be
logical
> errors as well, such as orphaned data and uncommitted data. I wanted Ken
to
> fully understand the implications of rebuilding the log.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:u$KcfydXEHA.556@.tk2msftngp13.phx.gbl...
database[vbcol=seagreen]
> is
> rebuilt
to[vbcol=seagreen]
> a
>|||There are many approaches that seem "easier and faster" but
they aren't necessarily good ideas and can actually not
really be "easier and faster" in the long run.
Note Paul's response. I remembered that Sybase used to (or
still does, I don't know) have the command and if it failed
once or twice, you essentially ended up with a useless data
file and couldn't execute the command anymore. There are
even easier sql commands posted up here that users have
problems getting right the first or second time - and all of
us have had those days where typing a simple select doesn't
work. For those reasons, it's probably better for a user to
call support and have someone from PSS walk them through the
process carefully. Ever since it's been posted on
newsgroups, I've seen it abused and misused by companies.
If they end up with nothing but a useless data file, it may
have actually have been "easier and faster" for them to get
the backups read off the failed media from a company that
specializes in that and restore the database from those
files.
-Sue
On Tue, 29 Jun 2004 18:46:10 +0530, "Hari"
<hari_prasad_k@.hotmail.com> wrote:

>Hi Dan,
>I accept what you say regarding data integrity.
>I suggested /recommended this method only because ken do not have the
>database Backup as well as
>no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
>approach. After bringing
> up the database ken can execute a DBCC CHECKDB and confirm that database i
s
>fine or not.|||One more note - the command (not the functionality) has been removed in SQL
Server 2005. Also, in SQL Server 2005, the fact that the functionality was
used is persisted permanently in the database so PSS can tell whether any
problems a user is seeing is because of misuse of the functionality.
In SQL Server 2005, emergency mode is documented and there's a new
documented way of recovering from this situation using DBCC CHECKDB.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:8j54e0175e35lc2v53m8j771hq1lm8rn32@.
4ax.com...
> There are many approaches that seem "easier and faster" but
> they aren't necessarily good ideas and can actually not
> really be "easier and faster" in the long run.
> Note Paul's response. I remembered that Sybase used to (or
> still does, I don't know) have the command and if it failed
> once or twice, you essentially ended up with a useless data
> file and couldn't execute the command anymore. There are
> even easier sql commands posted up here that users have
> problems getting right the first or second time - and all of
> us have had those days where typing a simple select doesn't
> work. For those reasons, it's probably better for a user to
> call support and have someone from PSS walk them through the
> process carefully. Ever since it's been posted on
> newsgroups, I've seen it abused and misused by companies.
> If they end up with nothing but a useless data file, it may
> have actually have been "easier and faster" for them to get
> the backups read off the failed media from a company that
> specializes in that and restore the database from those
> files.
> -Sue
> On Tue, 29 Jun 2004 18:46:10 +0530, "Hari"
> <hari_prasad_k@.hotmail.com> wrote:
>
is[vbcol=seagreen]
>

database recovery testing - procedure

how frequent you guy verify database backup from tape ?
What is the procedure? do you restore from tape and attach to database
Cheers,
Hi
Have not played long time with tapes, but you can simple restore the
database to verify a file, very good practice.
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
> how frequent you guy verify database backup from tape ?
> What is the procedure? do you restore from tape and attach to database
> Cheers,
|||soonyu,
As Uri says, restore is the best (really the only) way to test if a backup
is good. You can restore the backup to another database name, so the
restore will not overwrite your working database.
RESTORE DATABASE TestRestoreDB FROM TAPE ...
RLF
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
> how frequent you guy verify database backup from tape ?
> What is the procedure? do you restore from tape and attach to database
> Cheers,
|||how frequent you do restoration testing per year
and what do you document in your document ?
Cheers,
soonyu
"Russell Fields" wrote:

> soonyu,
> As Uri says, restore is the best (really the only) way to test if a backup
> is good. You can restore the backup to another database name, so the
> restore will not overwrite your working database.
> RESTORE DATABASE TestRestoreDB FROM TAPE ...
> RLF
> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
> news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
>
>
|||soonyu,
I do restores all the time as a part of the regular work, to make test
copies of the database, etc. so my backups are tested frequently because of
that. Of course, you should monitor the backup jobs daily to ensure that
they are running successfully.
I have heard it recommended (and think it is a good idea) to restore some
databases every week. Rotate through your databases and servers from week
to week.
As far as documentation, a spreadsheet is fine to tick off the last test and
success or failure. (It only gets interesting when there is a failure, of
course.) I use a workflow system to track problems and resolutions.
RLF
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:46C15702-8FEA-4221-9778-48634D3F1769@.microsoft.com...[vbcol=seagreen]
> how frequent you do restoration testing per year
> and what do you document in your document ?
> Cheers,
> soonyu
> "Russell Fields" wrote:

Friday, February 24, 2012

database recovery testing - procedure

how frequent you guy verify database backup from tape ?
What is the procedure? do you restore from tape and attach to database
Cheers,Hi
Have not played long time with tapes, but you can simple restore the
database to verify a file, very good practice.
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
> how frequent you guy verify database backup from tape ?
> What is the procedure? do you restore from tape and attach to database
> Cheers,|||soonyu,
As Uri says, restore is the best (really the only) way to test if a backup
is good. You can restore the backup to another database name, so the
restore will not overwrite your working database.
RESTORE DATABASE TestRestoreDB FROM TAPE ...
RLF
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
> how frequent you guy verify database backup from tape ?
> What is the procedure? do you restore from tape and attach to database
> Cheers,|||how frequent you do restoration testing per year
and what do you document in your document ?
Cheers,
soonyu
"Russell Fields" wrote:
> soonyu,
> As Uri says, restore is the best (really the only) way to test if a backup
> is good. You can restore the backup to another database name, so the
> restore will not overwrite your working database.
> RESTORE DATABASE TestRestoreDB FROM TAPE ...
> RLF
> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
> news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
> > how frequent you guy verify database backup from tape ?
> > What is the procedure? do you restore from tape and attach to database
> >
> > Cheers,
>
>|||soonyu,
I do restores all the time as a part of the regular work, to make test
copies of the database, etc. so my backups are tested frequently because of
that. Of course, you should monitor the backup jobs daily to ensure that
they are running successfully.
I have heard it recommended (and think it is a good idea) to restore some
databases every week. Rotate through your databases and servers from week
to week.
As far as documentation, a spreadsheet is fine to tick off the last test and
success or failure. (It only gets interesting when there is a failure, of
course.) I use a workflow system to track problems and resolutions.
RLF
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:46C15702-8FEA-4221-9778-48634D3F1769@.microsoft.com...
> how frequent you do restoration testing per year
> and what do you document in your document ?
> Cheers,
> soonyu
> "Russell Fields" wrote:
>> soonyu,
>> As Uri says, restore is the best (really the only) way to test if a
>> backup
>> is good. You can restore the backup to another database name, so the
>> restore will not overwrite your working database.
>> RESTORE DATABASE TestRestoreDB FROM TAPE ...
>> RLF
>> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
>> news:78EAC7A2-D57F-4894-AE12-E1951E27CE76@.microsoft.com...
>> > how frequent you guy verify database backup from tape ?
>> > What is the procedure? do you restore from tape and attach to database
>> >
>> > Cheers,
>>

Database Recovery Problem

Greetings,
I am attempting to restore some databases to a SQL Server
2000 Installation that fell apart after loading SP4 for
Windows 2000. The backups were made using Veritas Backup
Exec 8.6. on a remote backup server. When I do a restore
on my databases Veritas restores all of them to the the
SQL Server and they appear in Enterprise Manager. However
the databases are in a state of loading and I cannot seem
to find a way to take them out of this loading state to
complete the restore to normal operation.
I am new to SQL Server so I am at a loss as to what to do
to rectify this situation.
Thanks in advance for the help.
Joe.If you have restored the databases with norecovery you can
restore database mydb with recovery
to bring it on-line.
If in fact veritas hasn't completed the restore then you
will have to go back to that product.
>"Joe Toth" <jtoth@.cmefcu.org> wrote in message
>news:029d01c34727$da60cee0$a401280a@.phx.gbl...
>> Greetings,
>> I am attempting to restore some databases to a SQL
Server
>> 2000 Installation that fell apart after loading SP4 for
>> Windows 2000. The backups were made using Veritas Backup
>> Exec 8.6. on a remote backup server. When I do a restore
>> on my databases Veritas restores all of them to the the
>> SQL Server and they appear in Enterprise Manager.
However
>> the databases are in a state of loading and I cannot
seem
>> to find a way to take them out of this loading state to
>> complete the restore to normal operation.
>> I am new to SQL Server so I am at a loss as to what to
do
>> to rectify this situation.
>> Thanks in advance for the help.
>> Joe.
>
>.
>|||It's been a few months since I restored from BE, but I
think it's an option when configuring the restore on the
SQL tab. The db is left in this state so you can apply
logs if you need to.
--Scott
>--Original Message--
>Greetings,
>I am attempting to restore some databases to a SQL Server
>2000 Installation that fell apart after loading SP4 for
>Windows 2000. The backups were made using Veritas Backup
>Exec 8.6. on a remote backup server. When I do a restore
>on my databases Veritas restores all of them to the the
>SQL Server and they appear in Enterprise Manager. However
>the databases are in a state of loading and I cannot seem
>to find a way to take them out of this loading state to
>complete the restore to normal operation.
>I am new to SQL Server so I am at a loss as to what to do
>to rectify this situation.
>Thanks in advance for the help.
>Joe.
>.
>

Database recovery option

On right click of database in ER, goto properties and Options tab, there is
Recovery model selection, what would happen if I select one of them ?Alan,
From Books Online:
You can select one of three recovery models for each database in
Microsoft® SQL Server? 2000 to determine how your data is backed up and
what your exposure to data loss is. The following recovery models are
available:
Simple Recovery
Simple Recovery allows the database to be recovered to the most recent
backup.
Full Recovery
Full Recovery allows the database to be recovered to the point of failure.
Bulk-Logged Recovery
Bulk-Logged Recovery allows bulk-logged operations.
The recovery model of a new database is inherited from the model
database when the new database is created.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> On right click of database in ER, goto properties and Options tab, there is
> Recovery model selection, what would happen if I select one of them ?
>|||The more recommeded model is Full Recovery. And switching between the
model could impact/break the continuity of your log and your overall
backup and recovery strategy. You might want to fully understand it
before you start thinking what you want to do with it.
Mark Allison wrote:
> Alan,
> From Books Online:
> You can select one of three recovery models for each database in
> Microsoft® SQL Server? 2000 to determine how your data is backed up and
> what your exposure to data loss is. The following recovery models are
> available:
> Simple Recovery
> Simple Recovery allows the database to be recovered to the most recent
> backup.
> Full Recovery
> Full Recovery allows the database to be recovered to the point of failure.
> Bulk-Logged Recovery
> Bulk-Logged Recovery allows bulk-logged operations.
> The recovery model of a new database is inherited from the model
> database when the new database is created.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Alan wrote:
>> On right click of database in ER, goto properties and Options tab,
>> there is
>> Recovery model selection, what would happen if I select one of them ?
>>|||I just wonder what would happen if:
1) choose full recovery mode, then create a maintenance plan, just backup
the database without transaction log backup ?
2)choose simple recovery mode, then create a maintenance plan, backup both
database and transaction log ?
Do I still get the data back from the point of failure ?
"Jonathan Yong" <dataerror@.someplace.com> wrote in message
news:OtyB47IpEHA.1992@.TK2MSFTNGP09.phx.gbl...
> The more recommeded model is Full Recovery. And switching between the
> model could impact/break the continuity of your log and your overall
> backup and recovery strategy. You might want to fully understand it
> before you start thinking what you want to do with it.
>
> Mark Allison wrote:
> > Alan,
> >
> > From Books Online:
> >
> > You can select one of three recovery models for each database in
> > Microsoft?SQL Server?2000 to determine how your data is backed up and
> > what your exposure to data loss is. The following recovery models are
> > available:
> >
> > Simple Recovery
> > Simple Recovery allows the database to be recovered to the most recent
> > backup.
> >
> > Full Recovery
> > Full Recovery allows the database to be recovered to the point of
failure.
> >
> > Bulk-Logged Recovery
> > Bulk-Logged Recovery allows bulk-logged operations.
> >
> > The recovery model of a new database is inherited from the model
> > database when the new database is created.
> >
> > --
> > Mark Allison, SQL Server MVP
> > http://www.markallison.co.uk
> >
> > Looking for a SQL Server replication book?
> > http://www.nwsu.com/0974973602m.html
> >
> >
> > Alan wrote:
> >
> >> On right click of database in ER, goto properties and Options tab,
> >> there is
> >> Recovery model selection, what would happen if I select one of them ?
> >>
> >>|||In simple recovery mode, you do not get data back to the point of
failure because it does not support log backup.
If that is your requirement, choose full recovery model instead. You can
combine Full, Differential and Log backup in this model.
However, to really recover up to the point of failure, it is not as
straightforward as just restoring from the log. You need to be able to
get hold of the tail of the log of the database that fail.
Alan wrote:
> I just wonder what would happen if:
> 1) choose full recovery mode, then create a maintenance plan, just backup
> the database without transaction log backup ?
> 2)choose simple recovery mode, then create a maintenance plan, backup both
> database and transaction log ?
> Do I still get the data back from the point of failure ?
>
> "Jonathan Yong" <dataerror@.someplace.com> wrote in message
> news:OtyB47IpEHA.1992@.TK2MSFTNGP09.phx.gbl...
>>The more recommeded model is Full Recovery. And switching between the
>>model could impact/break the continuity of your log and your overall
>>backup and recovery strategy. You might want to fully understand it
>>before you start thinking what you want to do with it.
>>
>>Mark Allison wrote:
>>Alan,
>> From Books Online:
>>You can select one of three recovery models for each database in
>>Microsoft?SQL Server?2000 to determine how your data is backed up and
>>what your exposure to data loss is. The following recovery models are
>>available:
>>Simple Recovery
>>Simple Recovery allows the database to be recovered to the most recent
>>backup.
>>Full Recovery
>>Full Recovery allows the database to be recovered to the point of
> failure.
>>Bulk-Logged Recovery
>>Bulk-Logged Recovery allows bulk-logged operations.
>>The recovery model of a new database is inherited from the model
>>database when the new database is created.
>>--
>>Mark Allison, SQL Server MVP
>>http://www.markallison.co.uk
>>Looking for a SQL Server replication book?
>>http://www.nwsu.com/0974973602m.html
>>
>>Alan wrote:
>>
>>On right click of database in ER, goto properties and Options tab,
>>there is
>>Recovery model selection, what would happen if I select one of them ?
>>
>
>|||Is that mean if I choose simple recovery mode from the property page of a
database, eg. Northwind, I cannot create a maintenance plan that consists of
transaction log backup ?
"Jonathan Yong" <jyong@.someplace.net> wrote in message
news:%23DdP1iNrEHA.452@.TK2MSFTNGP09.phx.gbl...
> In simple recovery mode, you do not get data back to the point of
> failure because it does not support log backup.
> If that is your requirement, choose full recovery model instead. You can
> combine Full, Differential and Log backup in this model.
> However, to really recover up to the point of failure, it is not as
> straightforward as just restoring from the log. You need to be able to
> get hold of the tail of the log of the database that fail.
>
> Alan wrote:
> > I just wonder what would happen if:
> > 1) choose full recovery mode, then create a maintenance plan, just
backup
> > the database without transaction log backup ?
> >
> > 2)choose simple recovery mode, then create a maintenance plan, backup
both
> > database and transaction log ?
> >
> > Do I still get the data back from the point of failure ?
> >
> >
> >
> > "Jonathan Yong" <dataerror@.someplace.com> wrote in message
> > news:OtyB47IpEHA.1992@.TK2MSFTNGP09.phx.gbl...
> >
> >>The more recommeded model is Full Recovery. And switching between the
> >>model could impact/break the continuity of your log and your overall
> >>backup and recovery strategy. You might want to fully understand it
> >>before you start thinking what you want to do with it.
> >>
> >>
> >>Mark Allison wrote:
> >>
> >>Alan,
> >>
> >> From Books Online:
> >>
> >>You can select one of three recovery models for each database in
> >>Microsoft?SQL Server?2000 to determine how your data is backed up and
> >>what your exposure to data loss is. The following recovery models are
> >>available:
> >>
> >>Simple Recovery
> >>Simple Recovery allows the database to be recovered to the most recent
> >>backup.
> >>
> >>Full Recovery
> >>Full Recovery allows the database to be recovered to the point of
> >
> > failure.
> >
> >>Bulk-Logged Recovery
> >>Bulk-Logged Recovery allows bulk-logged operations.
> >>
> >>The recovery model of a new database is inherited from the model
> >>database when the new database is created.
> >>
> >>--
> >>Mark Allison, SQL Server MVP
> >>http://www.markallison.co.uk
> >>
> >>Looking for a SQL Server replication book?
> >>http://www.nwsu.com/0974973602m.html
> >>
> >>
> >>Alan wrote:
> >>
> >>
> >>On right click of database in ER, goto properties and Options tab,
> >>there is
> >>Recovery model selection, what would happen if I select one of them ?
> >>
> >>
> >
> >
> >

Database recovery option

On right click of database in ER, goto properties and Options tab, there is
Recovery model selection, what would happen if I select one of them ?
Alan,
From Books Online:
You can select one of three recovery models for each database in
Microsoft SQL Server 2000 to determine how your data is backed up and
what your exposure to data loss is. The following recovery models are
available:
Simple Recovery
Simple Recovery allows the database to be recovered to the most recent
backup.
Full Recovery
Full Recovery allows the database to be recovered to the point of failure.
Bulk-Logged Recovery
Bulk-Logged Recovery allows bulk-logged operations.
The recovery model of a new database is inherited from the model
database when the new database is created.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> On right click of database in ER, goto properties and Options tab, there is
> Recovery model selection, what would happen if I select one of them ?
>
|||The more recommeded model is Full Recovery. And switching between the
model could impact/break the continuity of your log and your overall
backup and recovery strategy. You might want to fully understand it
before you start thinking what you want to do with it.
Mark Allison wrote:[vbcol=seagreen]
> Alan,
> From Books Online:
> You can select one of three recovery models for each database in
> Microsoft SQL Server 2000 to determine how your data is backed up and
> what your exposure to data loss is. The following recovery models are
> available:
> Simple Recovery
> Simple Recovery allows the database to be recovered to the most recent
> backup.
> Full Recovery
> Full Recovery allows the database to be recovered to the point of failure.
> Bulk-Logged Recovery
> Bulk-Logged Recovery allows bulk-logged operations.
> The recovery model of a new database is inherited from the model
> database when the new database is created.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Alan wrote:
|||I just wonder what would happen if:
1) choose full recovery mode, then create a maintenance plan, just backup
the database without transaction log backup ?
2)choose simple recovery mode, then create a maintenance plan, backup both
database and transaction log ?
Do I still get the data back from the point of failure ?
"Jonathan Yong" <dataerror@.someplace.com> wrote in message
news:OtyB47IpEHA.1992@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> The more recommeded model is Full Recovery. And switching between the
> model could impact/break the continuity of your log and your overall
> backup and recovery strategy. You might want to fully understand it
> before you start thinking what you want to do with it.
>
> Mark Allison wrote:
failure.[vbcol=seagreen]
|||In simple recovery mode, you do not get data back to the point of
failure because it does not support log backup.
If that is your requirement, choose full recovery model instead. You can
combine Full, Differential and Log backup in this model.
However, to really recover up to the point of failure, it is not as
straightforward as just restoring from the log. You need to be able to
get hold of the tail of the log of the database that fail.
Alan wrote:
> I just wonder what would happen if:
> 1) choose full recovery mode, then create a maintenance plan, just backup
> the database without transaction log backup ?
> 2)choose simple recovery mode, then create a maintenance plan, backup both
> database and transaction log ?
> Do I still get the data back from the point of failure ?
>
> "Jonathan Yong" <dataerror@.someplace.com> wrote in message
> news:OtyB47IpEHA.1992@.TK2MSFTNGP09.phx.gbl...
>
> failure.
>
>
|||Is that mean if I choose simple recovery mode from the property page of a
database, eg. Northwind, I cannot create a maintenance plan that consists of
transaction log backup ?
"Jonathan Yong" <jyong@.someplace.net> wrote in message
news:%23DdP1iNrEHA.452@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> In simple recovery mode, you do not get data back to the point of
> failure because it does not support log backup.
> If that is your requirement, choose full recovery model instead. You can
> combine Full, Differential and Log backup in this model.
> However, to really recover up to the point of failure, it is not as
> straightforward as just restoring from the log. You need to be able to
> get hold of the tail of the log of the database that fail.
>
> Alan wrote:
backup[vbcol=seagreen]
both[vbcol=seagreen]

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
Usman
It is inherited from the recovery mode of you "model" database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
UsmanIt is inherited from the recovery mode of you "model" database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...[v
bcol=seagreen]
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>[/vbcol]

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
UsmanIt is inherited from the recovery mode of you "model" database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>

Database recovery issue

Hi guys
I am trying to open a database which is on a shared drive. The database is
stored in the 'my network places'. Now when I try to copy the database into
my hard disk, it says "sharing violation, file in use' whereas nobody else is
using it except me.
SQL does not recognise the shared path as it is installed locally on my hard
disk.
Im using sql server 2005
PLease help guys
I'm not clear on what you mean by the last part of "SQL does
not recognise the shared path as it is installed locally on
my hard disk". You don't want to use network shares for SQL
Server data, log files.
In terms of not being able to access the files to copy to
your hard drive, you can use FileMon from sysinternals to
see what process or what user has the files in use:
http://www.sysinternals.com/Utilities/Filemon.html
-Sue
On Sun, 5 Nov 2006 11:39:02 -0800, mita
<mita@.discussions.microsoft.com> wrote:

>Hi guys
>I am trying to open a database which is on a shared drive. The database is
>stored in the 'my network places'. Now when I try to copy the database into
>my hard disk, it says "sharing violation, file in use' whereas nobody else is
>using it except me.
>SQL does not recognise the shared path as it is installed locally on my hard
>disk.
>Im using sql server 2005
>PLease help guys

Database Recovery Issue

We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.

Database Recovery Issue

We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.
There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.

Database Recovery Issue

We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). An
y
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.

database recovery if no backup available

Hi,

If we delete a Database accidentally (no backup exists), Is it possible to recover. How?

Thanks

ven--

If you have dropped the database and with no backup it is not possible to recover, thats why BACKUP is an important arm on the basis availability.|||

Hi Venp,

As Satya said it very crucial to take backup daily basis other wise you will lose your important data, but some third party tolls like Stellar can recovery the files , how ever i only tried with demo version but not for the SQL Database Files, this is FYI only.

Hemantgiri S. Goswami

|||

You can try some third-party file recovery tools to attempt to un-delete the files, and then attach them to the instance.

You might get lucky. Otherwise, there's not much to be done. We can't fix a file that isn't there without a backup.