Sunday, March 11, 2012
Blocking seen when two filegroups are backed up in parallel
blocking the other.
eg two filegroups consisting of one data file each. Both
data files live on the f drive. One filegroup backup
writes to the h drive, the other to the i drive. Running
the backups in parallel results in one backup blocking the
other.
I suspect this is because both my data files live on the f
drive. Can anyone confirm this as the problem ?
Thanks.It's probably more to do with the fact they share the same log file and
backups need access to the logs and will put certain locks on them that
prevents some things from happening in parallel like that.
--
Andrew J. Kelly
SQL Server MVP
"anon" <anonymous@.discussions.microsoft.com> wrote in message
news:0db801c39f02$40fa1cb0$a401280a@.phx.gbl...
> When I backup two filegroups in parallel I see one backup
> blocking the other.
> eg two filegroups consisting of one data file each. Both
> data files live on the f drive. One filegroup backup
> writes to the h drive, the other to the i drive. Running
> the backups in parallel results in one backup blocking the
> other.
> I suspect this is because both my data files live on the f
> drive. Can anyone confirm this as the problem ?
> Thanks.
>|||Andrew - thanks for the reply. I think you're right.
Despite what SQL 2000 Books Online says under the
section 'Optimizing Database, Differential Database, and
File Backup Performance', I never see parallel backups.
I've now placed my two data files on different logical
drives and create the backups on two other logical drives
and still I get one backup blocked by the other.
Seems like this particular performance benefit of using
file groups doesn't really exist :( Again, nice if someone
could confirm this.
>--Original Message--
>It's probably more to do with the fact they share the
same log file and
>backups need access to the logs and will put certain
locks on them that
>prevents some things from happening in parallel like that.
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"anon" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0db801c39f02$40fa1cb0$a401280a@.phx.gbl...
>> When I backup two filegroups in parallel I see one
backup
>> blocking the other.
>> eg two filegroups consisting of one data file each. Both
>> data files live on the f drive. One filegroup backup
>> writes to the h drive, the other to the i drive. Running
>> the backups in parallel results in one backup blocking
the
>> other.
>> I suspect this is because both my data files live on
the f
>> drive. Can anyone confirm this as the problem ?
>> Thanks.
>
>.
>|||It can do "Parallel" backups as long as they aren't to the same database.
They are referring to backing up multiple db's at the same time.
--
Andrew J. Kelly
SQL Server MVP
"anon" <anonymous@.discussions.microsoft.com> wrote in message
news:08e001c39fa9$ea087ca0$a501280a@.phx.gbl...
> Andrew - thanks for the reply. I think you're right.
> Despite what SQL 2000 Books Online says under the
> section 'Optimizing Database, Differential Database, and
> File Backup Performance', I never see parallel backups.
> I've now placed my two data files on different logical
> drives and create the backups on two other logical drives
> and still I get one backup blocked by the other.
> Seems like this particular performance benefit of using
> file groups doesn't really exist :( Again, nice if someone
> could confirm this.
> >--Original Message--
> >It's probably more to do with the fact they share the
> same log file and
> >backups need access to the logs and will put certain
> locks on them that
> >prevents some things from happening in parallel like that.
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"anon" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:0db801c39f02$40fa1cb0$a401280a@.phx.gbl...
> >> When I backup two filegroups in parallel I see one
> backup
> >> blocking the other.
> >>
> >> eg two filegroups consisting of one data file each. Both
> >> data files live on the f drive. One filegroup backup
> >> writes to the h drive, the other to the i drive. Running
> >> the backups in parallel results in one backup blocking
> the
> >> other.
> >>
> >> I suspect this is because both my data files live on
> the f
> >> drive. Can anyone confirm this as the problem ?
> >>
> >> Thanks.
> >>
> >
> >
> >.
> >
Friday, February 24, 2012
Bloated database wont shrink after backup/restore SQL 2000
I have a database that has a data file of 2GB and a log file of 31GB.
In enterprise manager, when I choose shrink it says there is 30GB of
unused space. When I shrink the database, it does not shrink,
(however it says it has completed).
I've done a complete backup, tried shrink again, no dice. I then
backed up the database (which the backup was 1.9GB), deleted the
database and made a new database with 2,048MB for the data and same
for the log file.
When I restore, the log file jumps up to 31GB again. When I check the
space when I use the shrink, it again says I have 30GB of unused
space.
How on earth do I get this file to shrink?
I've been able to shrink other databases, but not this one.
TIA
RobHopefully one of these articles may help you out
317375 INF: Transaction Log Grows Unexpectedly or Becomes Full on SQL Server
http://support.microsoft.com/?id=317375
272318 INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC
http://support.microsoft.com/?id=272318
256650 INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/?id=256650
315512 INF: Considerations for Autogrow and Autoshrink Configuration
http://support.microsoft.com/?id=315512
272093 INF: Effects of Nonlogged and Minimally Logged Operations on
Transaction http://support.microsoft.com/?id=272093
230785 INF: SQL Server 7.0 and SQL Server 2000 Logging and Data Storage
http://support.microsoft.com/?id=230785
295108 INF: Incomplete Transaction May Hold Large Number of Locks and Cause
http://support.microsoft.com/?id=295108
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know
"R Camarda" <rcamarda@.cablespeed.com> wrote in message
news:d7938492.0407280405.62108ba2@.posting.google.c om...
> Help,
> I have a database that has a data file of 2GB and a log file of 31GB.
> In enterprise manager, when I choose shrink it says there is 30GB of
> unused space. When I shrink the database, it does not shrink,
> (however it says it has completed).
> I've done a complete backup, tried shrink again, no dice. I then
> backed up the database (which the backup was 1.9GB), deleted the
> database and made a new database with 2,048MB for the data and same
> for the log file.
> When I restore, the log file jumps up to 31GB again. When I check the
> space when I use the shrink, it again says I have 30GB of unused
> space.
> How on earth do I get this file to shrink?
> I've been able to shrink other databases, but not this one.
> TIA
> Rob
Thursday, February 16, 2012
Blank Listbox output from SPROC
exec sp_change_users_login 'report'
if the output returns anything, check what user ids became orphan. You may find users that have empty listbox there.|||We tried that and the report was empty. Any idea what I should try next? Thanks
Tuesday, February 14, 2012
Bkp Restore Failed
I am trying to restore backup and the system gives me error for LSN. No error no. is displayed but it seems that the system doesnot accept trn log restore.
My bkp strategy is:
Full Backup: weekly
Diff bkp: daily
T Log Bkp : every 2 hours.
But sometime I need to shrink Log file due to heavy growth. Hope that is not creating problem. The following is what i do for shrinking TLog file.
BACKUP LOG ABC TO ABC_BackUp
DBCC SHRINKFILE(ABC_Log, 500)
pL. guide why my restore fails.
you are right on the track... THe shrinking is creating the problem. shrinking log file step will invalidate the transaction log backup chain. So what you should have done after shrinking was take fullbackup of your database. If the transaction log size is the problem, then increase the frequency of the TL Backup. Now you have every 2 hourse, keep it every 15 min or so... it will control the size of the log and then there will be no need to shrink. If you are shrinking then the first step after the shrinking of log should be Full backup remember that.
Read follwing links
FileSize -How to stop the log file from growing
http://www.support.microsoft.com/?id=873235
FileSize -Log file filling up
http://www.support.microsoft.com/?id=110139
FileSize -Log File Grows too big
http://www.support.microsoft.com/?id=317375
FileSize -Log File issues
http://www.nigelrivett.net/TransactionLogFileGrows_1.html
FileSize -Shrinking Log in SQL Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=272318
Madhu|||
Thanks. I tried restoring full bkp, diff bkp and trn bkp which is without any shrinkage and i get the same error.
ERROR:
The log in this backup set begins at LNS .....502600001, which is too recent to apply to the database. An earlier log backup
that includes LSN .....478700001 can be restored.
what is this error and why my restore fails.
|||I would recommend that you do a RESTORE HEADERONLY on all you backups and check the FirstLSN and LastLSN fields of your backup series. The values should not have any gaps. If there are, the backup would be invalid...more of like a "do 5 first after 4 and not 6" kind of thing is how I would explain LSNs|||Thanks. When i try to exclude filed with gaps, i get the error:
System.Data.sqlclient.sqlerror: Invalid column name 'lightweight'
Following is the bkp procedure i follow;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pl. guide
|||Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.
This gave me error:
Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242
Invalid column name 'lightweight'.
Msg 3165, Level 16, State 1, Line 1
Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.
Msg 3167, Level 16, State 1, Line 1
RESTORE could not start database 'ABC'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Que1 why my LSN of TLogbkps are not matching?
Que2 why i got the error as above?
Following steps i follow to take bkps;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pls. guide. Thanks in advance
|||Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.
This gave me error:
Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242
Invalid column name 'lightweight'.
Msg 3165, Level 16, State 1, Line 1
Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.
Msg 3167, Level 16, State 1, Line 1
RESTORE could not start database 'ABC'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Que1 why my LSN of TLogbkps are not matching?
Que2 why i got the error as above?
Following steps i follow to take bkps;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pls. guide. Thanks in advance
Bkp Restore Failed
I am trying to restore backup and the system gives me error for LSN. No error no. is displayed but it seems that the system doesnot accept trn log restore.
My bkp strategy is:
Full Backup: weekly
Diff bkp: daily
T Log Bkp : every 2 hours.
But sometime I need to shrink Log file due to heavy growth. Hope that is not creating problem. The following is what i do for shrinking TLog file.
BACKUP LOG ABC TO ABC_BackUp
DBCC SHRINKFILE(ABC_Log, 500)
pL. guide why my restore fails.
you are right on the track... THe shrinking is creating the problem. shrinking log file step will invalidate the transaction log backup chain. So what you should have done after shrinking was take fullbackup of your database. If the transaction log size is the problem, then increase the frequency of the TL Backup. Now you have every 2 hourse, keep it every 15 min or so... it will control the size of the log and then there will be no need to shrink. If you are shrinking then the first step after the shrinking of log should be Full backup remember that.
Read follwing links
FileSize -How to stop the log file from growing
http://www.support.microsoft.com/?id=873235
FileSize -Log file filling up
http://www.support.microsoft.com/?id=110139
FileSize -Log File Grows too big
http://www.support.microsoft.com/?id=317375
FileSize -Log File issues
http://www.nigelrivett.net/TransactionLogFileGrows_1.html
FileSize -Shrinking Log in SQL Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=272318
Madhu|||
Thanks. I tried restoring full bkp, diff bkp and trn bkp which is without any shrinkage and i get the same error.
ERROR:
The log in this backup set begins at LNS .....502600001, which is too recent to apply to the database. An earlier log backup
that includes LSN .....478700001 can be restored.
what is this error and why my restore fails.
|||I would recommend that you do a RESTORE HEADERONLY on all you backups and check the FirstLSN and LastLSN fields of your backup series. The values should not have any gaps. If there are, the backup would be invalid...more of like a "do 5 first after 4 and not 6" kind of thing is how I would explain LSNs|||Thanks. When i try to exclude filed with gaps, i get the error:
System.Data.sqlclient.sqlerror: Invalid column name 'lightweight'
Following is the bkp procedure i follow;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pl. guide
|||Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.
This gave me error:
Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242
Invalid column name 'lightweight'.
Msg 3165, Level 16, State 1, Line 1
Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.
Msg 3167, Level 16, State 1, Line 1
RESTORE could not start database 'ABC'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Que1 why my LSN of TLogbkps are not matching?
Que2 why i got the error as above?
Following steps i follow to take bkps;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pls. guide. Thanks in advance
|||Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.
This gave me error:
Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242
Invalid column name 'lightweight'.
Msg 3165, Level 16, State 1, Line 1
Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.
Msg 3167, Level 16, State 1, Line 1
RESTORE could not start database 'ABC'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Que1 why my LSN of TLogbkps are not matching?
Que2 why i got the error as above?
Following steps i follow to take bkps;
Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'
Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;
Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];
Pls. guide. Thanks in advance
BizTalk and SQL Server 2000
http://msdn2.microsoft.com/en-us/library/ms187014.aspx|||Thank you for the article. What I really need is a very detailed explanation of how a transaction log mark works. Does the system try and open the transaction log like a text file (for example) in order to put a mark in? I've got a couple of databases in BizTalk that have transaction logs that grow rather large and once they get to the 1.5 Gig to 2 Gig size SQL Server starts to throw memory errors (SQL Server Standard Edition) when the TRANSACTION WITH MARK runs. I can get rid of the memory errors by running a backup then issuing a DBCC Shrinkfile but this isn't a viable option for my production system. Since this is BizTalk I was expecting that Microsoft would have a solution to my problem. Have you seen this before?|||
When a 'with mark' is set, the system will start keeping track of every operation between the database(s) involved in the dml session. This can get rather large if there are lots of changes.
So, unless you really need 'with mark' set, don't. Especially, if you are not creating a transaction across multiple databases.
|||Aaaa, but the 'with mark' is part of the custom backup solution that is supplied with BizTalk in order to handle the fact that BizTalk uses Distributed Queries all over the system. So my ultimate question is - how do I take a consistent backup of all of the BizTalk databases so that a restore would leave them in sync.? When I asked this question of some of the folks we had help us install and configure BizTalk they gave me the stored procedure that we run as our backup which uses the "with mark". Is there an alternative?
Sunday, February 12, 2012
Bizarre maintenance plan failure (db backup)
plans. It is coming back with the generic error message of,
"sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step
failed."
I then checked the Database Maintenance Plan History page, but this
shows all the steps having run successfully. If I check the drives for
the actual backup files, they exist and look healthy too!
There is plenty of space on the drives, so it is not that.
I've checked the NT logs and all they say is,
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'DB
Maintenance Plan for All User Databases''
(0xC06E15E2A9E1414087BE19541D167861) - Status: Failed - Invoked on:
2005-06-29 21:00:04 - Message: The job failed. The Job was invoked by
Schedule 35 (Schedule 1). The last step to run was step 1 (Step 1). "
Which doesn't give me any clues.
Since the backups have actually run to success, I am going to take off
the option on the maintenance plan to "Verfiy the integrity of the
backup upon completion". Maybe it is this that is causing problems,
rather than the backup?
Anyone had anything similar?(nielsonj1976@.yahoo.co.uk) writes:
> I am getting a failure on the db backup job of one of my maintenance
> plans. It is coming back with the generic error message of,
> "sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step
> failed."
> I then checked the Database Maintenance Plan History page, but this
> shows all the steps having run successfully. If I check the drives for
> the actual backup files, they exist and look healthy too!
> There is plenty of space on the drives, so it is not that.
> I've checked the NT logs and all they say is,
> "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'DB
> Maintenance Plan for All User Databases''
> (0xC06E15E2A9E1414087BE19541D167861) - Status: Failed - Invoked on:
> 2005-06-29 21:00:04 - Message: The job failed. The Job was invoked by
> Schedule 35 (Schedule 1). The last step to run was step 1 (Step 1). "
> Which doesn't give me any clues.
So did you look at the Job History? Find the backup job, right-click
and select Show History. In this dialog check "Show step details". The
step details usually have some more meat for information.
> Since the backups have actually run to success, I am going to take off
> the option on the maintenance plan to "Verfiy the integrity of the
> backup upon completion". Maybe it is this that is causing problems,
> rather than the backup?
Ehum, if the problem is that the backups don't verify, that I would
not like to know that and not sweep it under the carpet.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> So did you look at the Job History? Find the backup job, right-click
> and select Show History. In this dialog check "Show step details". The
> step details usually have some more meat for information.
This doesn't really give me any clues either. If I click show step
details, I get it displaying 2 steps,
Step 1: Executed as user: OMNIA\SVC_SQL_Exec. sqlmaint.exe failed.
[SQLSTATE 42000] (Error 22029). The step failed.
Step 0: (Job Outcome) The job failed. The Job was invoked by Schedule
35 (Schedule 1). The last step to run was step 1 (Step 1).
> > Since the backups have actually run to success, I am going to take off
> > the option on the maintenance plan to "Verfiy the integrity of the
> > backup upon completion". Maybe it is this that is causing problems,
> > rather than the backup?
> Ehum, if the problem is that the backups don't verify, that I would
> not like to know that and not sweep it under the carpet.
Having checked this morning the backup status is still showing Failed
even with the verify option off. The only reason I thought it *could*
be this is that the backups are fairly large (25gb+) so SQL server
could be having problems verifying with the disk space available?|||nielsonj1976@.yahoo.co.uk (nielsonj1976@.yahoo.co.uk) writes:
> This doesn't really give me any clues either. If I click show step
> details, I get it displaying 2 steps,
> Step 1: Executed as user: OMNIA\SVC_SQL_Exec. sqlmaint.exe failed.
> [SQLSTATE 42000] (Error 22029). The step failed.
> Step 0: (Job Outcome) The job failed. The Job was invoked by Schedule
> 35 (Schedule 1). The last step to run was step 1 (Step 1).
I rarely set into maintenance job, so I don't really know where sqlmaint
might write its errors. But looking at the properties of a plan that I've
actually set up, I see that there is a Reporting tab. Have you checked
what's yours, and if that leads to a useful file?
>> > Since the backups have actually run to success, I am going to take off
>> > the option on the maintenance plan to "Verfiy the integrity of the
>> > backup upon completion". Maybe it is this that is causing problems,
>> > rather than the backup?
>> Ehum, if the problem is that the backups don't verify, that I would
>> not like to know that and not sweep it under the carpet.
> Having checked this morning the backup status is still showing Failed
> even with the verify option off. The only reason I thought it *could*
> be this is that the backups are fairly large (25gb+) so SQL server
> could be having problems verifying with the disk space available?
I will have to retract what I said above. I recalled a discussion among
my MVP colleagues who are into server administration. The consensus was
that verification of backups as offered by RESTORE VERIFYOLNLY is useless.
The only way to really verify a backup is to restore it. And run DBCC checks
on the restored copy.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Do your maint plans cover more than 1 database? If so check the recovery modes of each - this error seems to pop up if there are mixed modes within 1 plan.