Showing posts with label backups. Show all posts
Showing posts with label backups. Show all posts

Wednesday, March 28, 2012

Help Getting Back a Suspect Database

I had a database grow from 15Mb to 15Gb last week while I
was out of town and the standard Backups and Trans Log
Backups and Shrink Maintenance Plans didnt keep its size
down.
Well anyways now the log file is 15gb and the data file
is 15gb and SQL Enterprise Manager now reports the
database as suspect and I cant back it up or shrink it to
try and bring it down to a manageable size. The valid
backups are over a week old is there any way to recover
this database? It says that there is insufficient space
on the disk to work with the database. I have 70 gig free
now but it is still down. Any advice would be
appreciated. Thank you.did you try sp_resetstatus?
"Jerod" <jlindblom@.axonom.com> wrote in message
news:4a3101c3e445$53838370$a401280a@.phx.gbl...
quote:

> I had a database grow from 15Mb to 15Gb last week while I
> was out of town and the standard Backups and Trans Log
> Backups and Shrink Maintenance Plans didnt keep its size
> down.
> Well anyways now the log file is 15gb and the data file
> is 15gb and SQL Enterprise Manager now reports the
> database as suspect and I cant back it up or shrink it to
> try and bring it down to a manageable size. The valid
> backups are over a week old is there any way to recover
> this database? It says that there is insufficient space
> on the disk to work with the database. I have 70 gig free
> now but it is still down. Any advice would be
> appreciated. Thank you.
|||Hi,
The below procedure is listed in on of the articles
published at SQLServerCentral.com by Brian Knight
A database can be marked for many reasons. Generally it
falls into the following conditions :
A database or log file is missing.
In SQL 6.5, a device may not be present or in 7.0/2000 a
file may not exist.
SQL Server may not have been able to restore the database
in ample time.
The database could be corrupt.
The database is being help by the operating system. This
could be a 3rd party backup software or defrag software.
I've had even a virus scanning software cause this once.
SQL Server does not have enough space to recover the
database on startup.
To fix this problem, perform the following functions:
Review the SQL Server and NT error logs to see if you can
find where the problem occured.
Start SQL Server in single user mode.
Go to your control panel and services.
Stop SQL Server
Add the -m switch in the parameters pane below.
Start SQL Server
Run sp_resetstatus with the @.dbname parameter. (ie :
sp_resetstatus @.dbname = "pubs")
Perform detailed DBCC checks (CHECKDB, CHECKALLOC, etc)
Run a few random queries to see if you experience any
problems.
If no problems occur, stop and start SQL Server and open
the database to production.
As an absolute last resort, you can place your database in
emergency mode. By placing it in this mode, you will be
allowed to copy data out of the database, even if the data
is corrupt. To place your database in emergency mode, use
the following command:
SP_CONFIGURE 'allow updates', 1
RECONFIGURE WITH OVERRIDE
GO
UPDATE master..sysdatabases set status = -32768 WHERE name
= 'pubs'
GO
SP_CONFIGURE 'allow updates', 0
RECONFIGURE WITH OVERRIDE
You can then BCP data out and place it into a different
database.
HTH
--
Regards
THIRUMAL REDDY MARAM
SysAdmin/SQLServerDBA
quote:

>--Original Message--
>did you try sp_resetstatus?
>
>"Jerod" <jlindblom@.axonom.com> wrote in message
>news:4a3101c3e445$53838370$a401280a@.phx.gbl...
I[QUOTE]
to[QUOTE]
free[QUOTE]
>
>.
>
sql

Help Getting Back a Suspect Database

I had a database grow from 15Mb to 15Gb last week while I
was out of town and the standard Backups and Trans Log
Backups and Shrink Maintenance Plans didnt keep its size
down.
Well anyways now the log file is 15gb and the data file
is 15gb and SQL Enterprise Manager now reports the
database as suspect and I cant back it up or shrink it to
try and bring it down to a manageable size. The valid
backups are over a week old is there any way to recover
this database? It says that there is insufficient space
on the disk to work with the database. I have 70 gig free
now but it is still down. Any advice would be
appreciated. Thank you.did you try sp_resetstatus?
"Jerod" <jlindblom@.axonom.com> wrote in message
news:4a3101c3e445$53838370$a401280a@.phx.gbl...
> I had a database grow from 15Mb to 15Gb last week while I
> was out of town and the standard Backups and Trans Log
> Backups and Shrink Maintenance Plans didnt keep its size
> down.
> Well anyways now the log file is 15gb and the data file
> is 15gb and SQL Enterprise Manager now reports the
> database as suspect and I cant back it up or shrink it to
> try and bring it down to a manageable size. The valid
> backups are over a week old is there any way to recover
> this database? It says that there is insufficient space
> on the disk to work with the database. I have 70 gig free
> now but it is still down. Any advice would be
> appreciated. Thank you.|||Hi,
The below procedure is listed in on of the articles
published at SQLServerCentral.com by Brian Knight
A database can be marked for many reasons. Generally it
falls into the following conditions :
A database or log file is missing.
In SQL 6.5, a device may not be present or in 7.0/2000 a
file may not exist.
SQL Server may not have been able to restore the database
in ample time.
The database could be corrupt.
The database is being help by the operating system. This
could be a 3rd party backup software or defrag software.
I've had even a virus scanning software cause this once.
SQL Server does not have enough space to recover the
database on startup.
To fix this problem, perform the following functions:
Review the SQL Server and NT error logs to see if you can
find where the problem occured.
Start SQL Server in single user mode.
Go to your control panel and services.
Stop SQL Server
Add the -m switch in the parameters pane below.
Start SQL Server
Run sp_resetstatus with the @.dbname parameter. (ie :
sp_resetstatus @.dbname = "pubs")
Perform detailed DBCC checks (CHECKDB, CHECKALLOC, etc)
Run a few random queries to see if you experience any
problems.
If no problems occur, stop and start SQL Server and open
the database to production.
As an absolute last resort, you can place your database in
emergency mode. By placing it in this mode, you will be
allowed to copy data out of the database, even if the data
is corrupt. To place your database in emergency mode, use
the following command:
SP_CONFIGURE 'allow updates', 1
RECONFIGURE WITH OVERRIDE
GO
UPDATE master..sysdatabases set status = -32768 WHERE name
= 'pubs'
GO
SP_CONFIGURE 'allow updates', 0
RECONFIGURE WITH OVERRIDE
You can then BCP data out and place it into a different
database.
HTH
--
Regards
THIRUMAL REDDY MARAM
SysAdmin/SQLServerDBA
>--Original Message--
>did you try sp_resetstatus?
>
>"Jerod" <jlindblom@.axonom.com> wrote in message
>news:4a3101c3e445$53838370$a401280a@.phx.gbl...
>> I had a database grow from 15Mb to 15Gb last week while
I
>> was out of town and the standard Backups and Trans Log
>> Backups and Shrink Maintenance Plans didnt keep its size
>> down.
>> Well anyways now the log file is 15gb and the data file
>> is 15gb and SQL Enterprise Manager now reports the
>> database as suspect and I cant back it up or shrink it
to
>> try and bring it down to a manageable size. The valid
>> backups are over a week old is there any way to recover
>> this database? It says that there is insufficient space
>> on the disk to work with the database. I have 70 gig
free
>> now but it is still down. Any advice would be
>> appreciated. Thank you.
>
>.
>

Friday, March 23, 2012

Help Crash!

Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
directory with all of the MDF and LDF files in it for the databases. Backups
directory was completely lost and as I understand it there are no outside
copies of backups. How if it is at all possible does one get these mounted
in such a way that they can be recovered in a new machine?Hi,
If you have all the Physical DAT files , including Master database . Then
all you have to do is..
1. Take a copy of all DAT files to a safe location
2. Install SQL 7 in the same folder as old installation
3. apply the same service pack as old
4. stop sql server and SQL Server Agent service
5. Copy all the DAT files to the same folder
6. Start SQl server and SQL Server Agent service.
Now your SQl server will be back as old.
Note:
Now onwards please prepare and backup strategy to backup your databases.
Thanks
Hari
MCDBA
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Read about sp_attach_db and sp_attach_single_file_db in Books Online. These are only guaranteed to work if you
properly detached the databases first. But if you are lucky...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases. Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||You can try using sp_attach_db, but if the database wasn't closed properly,
there is no guarantee.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Copy the LDF and MDF files onto another computer with SQ Lon it and then run
sp_attach_db to attach each DB.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> directory with all of the MDF and LDF files in it for the databases.
Backups
> directory was completely lost and as I understand it there are no outside
> copies of backups. How if it is at all possible does one get these mounted
> in such a way that they can be recovered in a new machine?
>|||Will it have to be a SQL 7 installation since these came from SQL 7? Or will
it work with SQL 2000 as there are several machines with this installation,
but this may have been the last one remaining with SQL 7 on it :)
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Copy the LDF and MDF files onto another computer with SQ Lon it and then
run
> sp_attach_db to attach each DB.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Johannesburg, South Africa
> Mobile: +27-82-552-0268
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
> news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> > Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> > directory with all of the MDF and LDF files in it for the databases.
> Backups
> > directory was completely lost and as I understand it there are no
outside
> > copies of backups. How if it is at all possible does one get these
mounted
> > in such a way that they can be recovered in a new machine?
> >
> >
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Hi,
You can also attach a sql 7 db to an sql 2000 server without data loss.
Bradley M. Small wrote:
> Will it have to be a SQL 7 installation since these came from SQL 7? Or will
> it work with SQL 2000 as there are several machines with this installation,
> but this may have been the last one remaining with SQL 7 on it :)
>
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
>>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> run
>>sp_attach_db to attach each DB.
>>--
>>--
>>Mike Epprecht, Microsoft SQL Server MVP
>>Johannesburg, South Africa
>>Mobile: +27-82-552-0268
>>IM: mike@.epprecht.net
>>MVP Program: http://www.microsoft.com/mvp
>>Blog: http://www.msmvps.com/epprecht/
>>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
>>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
>>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
>>directory with all of the MDF and LDF files in it for the databases.
>>Backups
>>directory was completely lost and as I understand it there are no
> outside
>>copies of backups. How if it is at all possible does one get these
> mounted
>>in such a way that they can be recovered in a new machine?
>>
>>
>|||Worked without a hitch! Thanks everyone.
"Martin Ha" <martin.ha@.gmx.net> wrote in message
news:410FB18D.10706@.gmx.net...
> Hi,
> You can also attach a sql 7 db to an sql 2000 server without data loss.
> Bradley M. Small wrote:
> > Will it have to be a SQL 7 installation since these came from SQL 7? Or
will
> > it work with SQL 2000 as there are several machines with this
installation,
> > but this may have been the last one remaining with SQL 7 on it :)
> >
> >
> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> > news:%23IPG20WeEHA.3428@.TK2MSFTNGP11.phx.gbl...
> >
> >>Copy the LDF and MDF files onto another computer with SQ Lon it and then
> >
> > run
> >
> >>sp_attach_db to attach each DB.
> >>
> >>--
> >>--
> >>Mike Epprecht, Microsoft SQL Server MVP
> >>Johannesburg, South Africa
> >>Mobile: +27-82-552-0268
> >>IM: mike@.epprecht.net
> >>
> >>MVP Program: http://www.microsoft.com/mvp
> >>
> >>Blog: http://www.msmvps.com/epprecht/
> >>
> >>"Bradley M. Small" <BSmall@.XNOSPAMXmjsi.com> wrote in message
> >>news:OcvkKvWeEHA.732@.tk2msftngp13.phx.gbl...
> >>
> >>Computer crashed quite severely, was able to recover the C:\MSSQL7\Data
> >>directory with all of the MDF and LDF files in it for the databases.
> >>
> >>Backups
> >>
> >>directory was completely lost and as I understand it there are no
> >
> > outside
> >
> >>copies of backups. How if it is at all possible does one get these
> >
> > mounted
> >
> >>in such a way that they can be recovered in a new machine?
> >>
> >>
> >>
> >>
> >
> >

Monday, March 12, 2012

HELP ! Production down and backups not restoring properly!

I was mistakenly logged into the wrong server this morning and deleted all
of our product related information!!
I've been doing weekly full backups with hourly log file backups.
I have 2 questions...
1. The most pressing first. My weekly backup happens every Saturday
morning at 2am. My hourly log backups stop between midnight and begin again
at 6:15am Saturday. When I restore the full backup from last saturday it
restores fine. When I go to restore the first log it tells me the log is
too recent and there is an earlier one with LSN###....
I'm really stuck here...there is absolutely no way that there could be an
earlier log. I even tried a RESTORE LOG using the full backup to get the
log from there and it gives the same message.
2. When doing a restore through the SMS after selecting a file off disk you
get the backup sets in that file with checkboxes to select the backupset to
restore. My full backups do not show this. The list is empty so I cannot
go on. The restore seems successful by script. My script statements
originated from the "Generate Script" button when doing backups through the
interface. Am I missing something here? Below is a sample backup
statement:
BACKUP DATABASE [Products]
FILEGROUP = N'PRIMARY'
TO DISK = @.strBackupFile
WITH NOFORMAT, NOINIT,
NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
ANY HELP IS ***GREATLY*** APPRECIATED!!!Actually now I'm seeing after restoring the full backup WITH RECOVERY it
still shows the database in a recovering state and it cannot be accessed!!
How can this happen? What have I done wrong here?
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||And while on the topic of backups, I setup this process based on input from
this group. It just seems that it ends up having an inordinate amount of
files to have to restore to get back online. Wouldn't it be better to just
do differentials hourly instead of log backups? Then in a failure you'd
never have more than 2 files to restore.
Just wondering.
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||> Wouldn't it be better to just do differentials hourly instead of log backu
ps?
You could do that, but log backups has lot of advantages to diff backups. Th
ese includes
Point in time restore.
Ability to backup log if database becomes toast (zero data loss)
Ability to backup log, and restore the most recent db backup and all subsequ
ent log backup sin case
you get a corruption of the database.
Etc.
In short, log backups has so many advantages so you don't want to trade it f
or diff backups just for
convenience. But sometimes you want to do both db, diff *and* log backups.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OnZRT6xEHHA.4740@.TK2MSFTNGP03.phx.gbl...
> And while on the topic of backups, I setup this process based on input fro
m this group. It just
> seems that it ends up having an inordinate amount of files to have to rest
ore to get back online.
> Wouldn't it be better to just do differentials hourly instead of log backu
ps? Then in a failure
> you'd never have more than 2 files to restore.
> Just wondering.
>
> "Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
> news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>|||> Actually now I'm seeing after restoring the full backup WITH RECOVERY it still shows the d
atabase
> in a recovering state and it cannot be accessed!!
Perhaps just a refresh problem in your GUI?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OppZhXxEHHA.3224@.TK2MSFTNGP04.phx.gbl...
> Actually now I'm seeing after restoring the full backup WITH RECOVERY it s
till shows the database
> in a recovering state and it cannot be accessed!! How can this happen? Wh
at have I done wrong
> here?
>
> "Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
> news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>|||> 1. The most pressing first. My weekly backup happens every Saturday morning at 2am. My
hourly
> log backups stop between midnight and begin again at 6:15am Saturday. Whe
n I restore the full
> backup from last saturday it restores fine. When I go to restore the firs
t log it tells me the
> log is too recent and there is an earlier one with LSN###....
You need to hunt down that log backup. You can check the backup history tabl
es in the msdb database,
which can give you a clue where it is.

> 2. When doing a restore through the SMS after selecting a file off disk y
ou get the backup sets
> in that file with checkboxes to select the backupset to restore. My full
backups do not show
> this. The list is empty so I cannot go on.
I suggest you read up on the RESTORE command and use RESTORE HEADERONLY and
RESTORE FILELISTONLY so
you can manage a restore when the GUI is acting up on you.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
of our product related
>information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday mor
ning at 2am. My hourly
> log backups stop between midnight and begin again at 6:15am Saturday. Whe
n I restore the full
> backup from last saturday it restores fine. When I go to restore the firs
t log it tells me the
> log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
earlier log. I even
> tried a RESTORE LOG using the full backup to get the log from there and it
gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk y
ou get the backup sets
> in that file with checkboxes to select the backupset to restore. My full
backups do not show
> this. The list is empty so I cannot go on. The restore seems successful
by script. My script
> statements originated from the "Generate Script" button when doing backups
through the interface.
> Am I missing something here? Below is a sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>

HELP ! Production down and backups not restoring properly!

I was mistakenly logged into the wrong server this morning and deleted all
of our product related information!!
I've been doing weekly full backups with hourly log file backups.
I have 2 questions...
1. The most pressing first. My weekly backup happens every Saturday
morning at 2am. My hourly log backups stop between midnight and begin again
at 6:15am Saturday. When I restore the full backup from last saturday it
restores fine. When I go to restore the first log it tells me the log is
too recent and there is an earlier one with LSN###....
I'm really stuck here...there is absolutely no way that there could be an
earlier log. I even tried a RESTORE LOG using the full backup to get the
log from there and it gives the same message.
2. When doing a restore through the SMS after selecting a file off disk you
get the backup sets in that file with checkboxes to select the backupset to
restore. My full backups do not show this. The list is empty so I cannot
go on. The restore seems successful by script. My script statements
originated from the "Generate Script" button when doing backups through the
interface. Am I missing something here? Below is a sample backup
statement:
BACKUP DATABASE [Products]
FILEGROUP = N'PRIMARY'
TO DISK = @.strBackupFile
WITH NOFORMAT, NOINIT,
NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
ANY HELP IS ***GREATLY*** APPRECIATED!!!
Actually now I'm seeing after restoring the full backup WITH RECOVERY it
still shows the database in a recovering state and it cannot be accessed!!
How can this happen? What have I done wrong here?
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>
|||And while on the topic of backups, I setup this process based on input from
this group. It just seems that it ends up having an inordinate amount of
files to have to restore to get back online. Wouldn't it be better to just
do differentials hourly instead of log backups? Then in a failure you'd
never have more than 2 files to restore.
Just wondering.
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>

HELP ! Production down and backups not restoring properly!

I was mistakenly logged into the wrong server this morning and deleted all
of our product related information!!
I've been doing weekly full backups with hourly log file backups.
I have 2 questions...
1. The most pressing first. My weekly backup happens every Saturday
morning at 2am. My hourly log backups stop between midnight and begin again
at 6:15am Saturday. When I restore the full backup from last saturday it
restores fine. When I go to restore the first log it tells me the log is
too recent and there is an earlier one with LSN###....
I'm really stuck here...there is absolutely no way that there could be an
earlier log. I even tried a RESTORE LOG using the full backup to get the
log from there and it gives the same message.
2. When doing a restore through the SMS after selecting a file off disk you
get the backup sets in that file with checkboxes to select the backupset to
restore. My full backups do not show this. The list is empty so I cannot
go on. The restore seems successful by script. My script statements
originated from the "Generate Script" button when doing backups through the
interface. Am I missing something here? Below is a sample backup
statement:
BACKUP DATABASE [Products]
FILEGROUP = N'PRIMARY'
TO DISK = @.strBackupFile
WITH NOFORMAT, NOINIT,
NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
ANY HELP IS ***GREATLY*** APPRECIATED!!!Actually now I'm seeing after restoring the full backup WITH RECOVERY it
still shows the database in a recovering state and it cannot be accessed!!
How can this happen? What have I done wrong here?
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||And while on the topic of backups, I setup this process based on input from
this group. It just seems that it ends up having an inordinate amount of
files to have to restore to get back online. Wouldn't it be better to just
do differentials hourly instead of log backups? Then in a failure you'd
never have more than 2 files to restore.
Just wondering.
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all
>of our product related information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday
> morning at 2am. My hourly log backups stop between midnight and begin
> again at 6:15am Saturday. When I restore the full backup from last
> saturday it restores fine. When I go to restore the first log it tells me
> the log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an
> earlier log. I even tried a RESTORE LOG using the full backup to get the
> log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk
> you get the backup sets in that file with checkboxes to select the
> backupset to restore. My full backups do not show this. The list is
> empty so I cannot go on. The restore seems successful by script. My
> script statements originated from the "Generate Script" button when doing
> backups through the interface. Am I missing something here? Below is a
> sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||> Wouldn't it be better to just do differentials hourly instead of log backups?
You could do that, but log backups has lot of advantages to diff backups. These includes
Point in time restore.
Ability to backup log if database becomes toast (zero data loss)
Ability to backup log, and restore the most recent db backup and all subsequent log backup sin case
you get a corruption of the database.
Etc.
In short, log backups has so many advantages so you don't want to trade it for diff backups just for
convenience. But sometimes you want to do both db, diff *and* log backups.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OnZRT6xEHHA.4740@.TK2MSFTNGP03.phx.gbl...
> And while on the topic of backups, I setup this process based on input from this group. It just
> seems that it ends up having an inordinate amount of files to have to restore to get back online.
> Wouldn't it be better to just do differentials hourly instead of log backups? Then in a failure
> you'd never have more than 2 files to restore.
> Just wondering.
>
> "Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
> news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>>I was mistakenly logged into the wrong server this morning and deleted all of our product related
>>information!!
>> I've been doing weekly full backups with hourly log file backups.
>> I have 2 questions...
>> 1. The most pressing first. My weekly backup happens every Saturday morning at 2am. My hourly
>> log backups stop between midnight and begin again at 6:15am Saturday. When I restore the full
>> backup from last saturday it restores fine. When I go to restore the first log it tells me the
>> log is too recent and there is an earlier one with LSN###....
>> I'm really stuck here...there is absolutely no way that there could be an earlier log. I even
>> tried a RESTORE LOG using the full backup to get the log from there and it gives the same
>> message.
>> 2. When doing a restore through the SMS after selecting a file off disk you get the backup sets
>> in that file with checkboxes to select the backupset to restore. My full backups do not show
>> this. The list is empty so I cannot go on. The restore seems successful by script. My script
>> statements originated from the "Generate Script" button when doing backups through the interface.
>> Am I missing something here? Below is a sample backup statement:
>> BACKUP DATABASE [Products]
>> FILEGROUP = N'PRIMARY'
>> TO DISK = @.strBackupFile
>> WITH NOFORMAT, NOINIT,
>> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>>
>> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||> Actually now I'm seeing after restoring the full backup WITH RECOVERY it still shows the database
> in a recovering state and it cannot be accessed!!
Perhaps just a refresh problem in your GUI?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OppZhXxEHHA.3224@.TK2MSFTNGP04.phx.gbl...
> Actually now I'm seeing after restoring the full backup WITH RECOVERY it still shows the database
> in a recovering state and it cannot be accessed!! How can this happen? What have I done wrong
> here?
>
> "Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
> news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>>I was mistakenly logged into the wrong server this morning and deleted all of our product related
>>information!!
>> I've been doing weekly full backups with hourly log file backups.
>> I have 2 questions...
>> 1. The most pressing first. My weekly backup happens every Saturday morning at 2am. My hourly
>> log backups stop between midnight and begin again at 6:15am Saturday. When I restore the full
>> backup from last saturday it restores fine. When I go to restore the first log it tells me the
>> log is too recent and there is an earlier one with LSN###....
>> I'm really stuck here...there is absolutely no way that there could be an earlier log. I even
>> tried a RESTORE LOG using the full backup to get the log from there and it gives the same
>> message.
>> 2. When doing a restore through the SMS after selecting a file off disk you get the backup sets
>> in that file with checkboxes to select the backupset to restore. My full backups do not show
>> this. The list is empty so I cannot go on. The restore seems successful by script. My script
>> statements originated from the "Generate Script" button when doing backups through the interface.
>> Am I missing something here? Below is a sample backup statement:
>> BACKUP DATABASE [Products]
>> FILEGROUP = N'PRIMARY'
>> TO DISK = @.strBackupFile
>> WITH NOFORMAT, NOINIT,
>> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>>
>> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>|||> 1. The most pressing first. My weekly backup happens every Saturday morning at 2am. My hourly
> log backups stop between midnight and begin again at 6:15am Saturday. When I restore the full
> backup from last saturday it restores fine. When I go to restore the first log it tells me the
> log is too recent and there is an earlier one with LSN###....
You need to hunt down that log backup. You can check the backup history tables in the msdb database,
which can give you a clue where it is.
> 2. When doing a restore through the SMS after selecting a file off disk you get the backup sets
> in that file with checkboxes to select the backupset to restore. My full backups do not show
> this. The list is empty so I cannot go on.
I suggest you read up on the RESTORE command and use RESTORE HEADERONLY and RESTORE FILELISTONLY so
you can manage a restore when the GUI is acting up on you.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tim Greenwood" <tim_greenwood AT yahoo DOT com> wrote in message
news:OaKy0QxEHHA.4404@.TK2MSFTNGP06.phx.gbl...
>I was mistakenly logged into the wrong server this morning and deleted all of our product related
>information!!
> I've been doing weekly full backups with hourly log file backups.
> I have 2 questions...
> 1. The most pressing first. My weekly backup happens every Saturday morning at 2am. My hourly
> log backups stop between midnight and begin again at 6:15am Saturday. When I restore the full
> backup from last saturday it restores fine. When I go to restore the first log it tells me the
> log is too recent and there is an earlier one with LSN###....
> I'm really stuck here...there is absolutely no way that there could be an earlier log. I even
> tried a RESTORE LOG using the full backup to get the log from there and it gives the same message.
> 2. When doing a restore through the SMS after selecting a file off disk you get the backup sets
> in that file with checkboxes to select the backupset to restore. My full backups do not show
> this. The list is empty so I cannot go on. The restore seems successful by script. My script
> statements originated from the "Generate Script" button when doing backups through the interface.
> Am I missing something here? Below is a sample backup statement:
> BACKUP DATABASE [Products]
> FILEGROUP = N'PRIMARY'
> TO DISK = @.strBackupFile
> WITH NOFORMAT, NOINIT,
> NAME = @.strBackupFile, SKIP, REWIND, NOUNLOAD, STATS = 10
>
> ANY HELP IS ***GREATLY*** APPRECIATED!!!
>

HELP ! Disappearing objects

We are supposed to be deploying to SQL2K5 this friday night. I've been
taking backups from our SQL 2K server and restoring them directly on our 2K5
box. Everything seems to work ok except for one of our databases. When I
expand the "views" in Sql Management Studio object browser I get an error
that says "Parameter cannot be null" and none of the objects are there!!!
All other object types seem fine and only this database exhibits this
behavior. I'm not sure how to track this down.And what if you query sys.objects? Are the object listed in
the catalog view? Or in the information_schema.views view?
I've hit a few flaky things like that with SSMS. Usually
when I hit the bug with the index error in SSMS, I start
seeing other object display issues until I close SSMS and
reopen. I think some, most of those are fixed in SP1 for SQL
2005.
-Sue
On Tue, 25 Apr 2006 16:51:57 -0700, "Tim Greenwood"
<tim_greenwood A-T yahoo D-O-T com> wrote:

>We are supposed to be deploying to SQL2K5 this friday night. I've been
>taking backups from our SQL 2K server and restoring them directly on our 2K
5
>box. Everything seems to work ok except for one of our databases. When I
>expand the "views" in Sql Management Studio object browser I get an error
>that says "Parameter cannot be null" and none of the objects are there!!!
>All other object types seem fine and only this database exhibits this
>behavior. I'm not sure how to track this down.
>