Sunday, March 25, 2012
Can't apply transaction logs after restoring a database in enterprise manager
I created Full Backup of database and transaction logs in Enterprise manager
.. Restore of the database worked fine, but when i'm trying to apply transact
ion logs i get the followin error:
code:Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 7000000063500001, which is too
early to apply to the database. A more recent log backup that includes LSN 7
000000063700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
Why is the possible cause of this problem?
Thank you.
Seems like you try to apply an incorrect transaction log backup. If you can reproduce this using
TSQL code (BACKUP and RESTORE commands) against a test database, we could test and see what the
problem might be.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Francelj Smuk" <Francelj.Smuk@.email.si> wrote in message
news:pan.2004.09.08.08.32.08.781516@.email.si...
> Hi!
> I created Full Backup of database and transaction logs in Enterprise manager
> . Restore of the database worked fine, but when i'm trying to apply transact
> ion logs i get the followin error:
>
> code:Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 7000000063500001, which is too
> early to apply to the database. A more recent log backup that includes LSN 7
> 000000063700001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
> Why is the possible cause of this problem?
> Thank you.
Can't apply transaction logs after restoring a database in enterprise manager
I created Full Backup of database and transaction logs in Enterprise manager
. Restore of the database worked fine, but when i'm trying to apply transact
ion logs i get the followin error:
code:Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 7000000063500001, which is too
early to apply to the database. A more recent log backup that includes LSN 7
000000063700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
Why is the possible cause of this problem?
Thank you.Seems like you try to apply an incorrect transaction log backup. If you can reproduce this using
TSQL code (BACKUP and RESTORE commands) against a test database, we could test and see what the
problem might be.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Francelj Smuk" <Francelj.Smuk@.email.si> wrote in message
news:pan.2004.09.08.08.32.08.781516@.email.si...
> Hi!
> I created Full Backup of database and transaction logs in Enterprise manager
> . Restore of the database worked fine, but when i'm trying to apply transact
> ion logs i get the followin error:
>
> code:Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 7000000063500001, which is too
> early to apply to the database. A more recent log backup that includes LSN 7
> 000000063700001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
> Why is the possible cause of this problem?
> Thank you.
Monday, March 19, 2012
Cannot view SQL Server logs
the SQL Server logs from my client machine, but receive the following:
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476[ /url]
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
A severe error occurred on the current command. The results, if any,
should be discarded. (Microsoft SQL Server, Error: 0)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .1399&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476[/url]
BUTTONS:
OK
Everything else in the Management Studio works fine. Can anyone
interpret this?
I can't interpret or solve, but I can confirm that it also happens on our
clusters.
> Everything else in the Management Studio works fine. Can anyone
> interpret this?
>
Cannot view SQL Server logs
the SQL Server logs from my client machine, but receive the following:
TITLE: Microsoft SQL Server Management Studio
--
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
--
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
--
A severe error occurred on the current command. The results, if any,
should be discarded. (Microsoft SQL Server, Error: 0)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
--
BUTTONS:
OK
--
Everything else in the Management Studio works fine. Can anyone
interpret this?I can't interpret or solve, but I can confirm that it also happens on our
clusters.
> Everything else in the Management Studio works fine. Can anyone
> interpret this?
>|||Interesting...I found out that when I was trying to view the logs, for
some reason it was trying to direct me to the virtual servername used
by the Data Group of the cluster. I don't know why it would do that.
I created an alias for the data group name, and pointed it to the ip
address of the sql server instance, and it connects properly now.
Not sure if I explained this right, I'm kinda new to clusters, but
hopefully this will help you.
Aaron Bertrand [SQL Server MVP] wrote:
> I can't interpret or solve, but I can confirm that it also happens on our
> clusters.
>
>
> > Everything else in the Management Studio works fine. Can anyone
> > interpret this?
> >
Cannot view SQL Server logs
the SQL Server logs from my client machine, but receive the following:
TITLE: Microsoft SQL Server Management Studio
--
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?Prod...er&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
A severe error occurred on the current command. The results, if any,
should be discarded. (Microsoft SQL Server, Error: 0)
For help, click:
http://go.microsoft.com/fwlink?Prod...=0&LinkId=20476
BUTTONS:
OK
--
Everything else in the Management Studio works fine. Can anyone
interpret this?I can't interpret or solve, but I can confirm that it also happens on our
clusters.
> Everything else in the Management Studio works fine. Can anyone
> interpret this?
>|||Interesting...I found out that when I was trying to view the logs, for
some reason it was trying to direct me to the virtual servername used
by the Data Group of the cluster. I don't know why it would do that.
I created an alias for the data group name, and pointed it to the ip
address of the sql server instance, and it connects properly now.
Not sure if I explained this right, I'm kinda new to clusters, but
hopefully this will help you.
Aaron Bertrand [SQL Server MVP] wrote:[vbcol=seagreen]
> I can't interpret or solve, but I can confirm that it also happens on our
> clusters.
>
>
Cannot View Server Logs
I have SQL Server 2005 Express on a Windows XP SP2 machine. Everything works fine and I have several dbs running. How ever I was wanting to optimize some programs and needed to watch the server and see what it is processing. I log into SQL Management Studio Express and when I go to Management->Server Logs I see the logs and the Activity Monitor. If I right click on the log all I see is Refresh. If I doule click nothing happens. I can view the Activity Monitor and the processes going.
I am sure it is a permission thing or something along those lines. I can not for the life of me figure it and have spent a couple days on google and these forums. I have tried with the SA, my defined users, and the local windows administrator. Is log viewing not allowed in SQL Server Express?
Thanks!
Michael
hi Michael,
SSMSE does not provide that feature.. if you like to inspect the SQL Server log files, you can navigate to the \Program Files\Microsoft SQL Server\MSSQL.x\MSSQL\LOG folder and open the ERRORLOG file with Notepad, as it's just plain text..
regards
|||Thanks, good to know I am not crazy.So does any of the Express additions support logging? I want to turn on query logging so I can see the queries coming in and nail down the one that is hosing the system.
Thanks!
Michael
|||
hi Michael,
wait a moment ...
SQLExpress logs it's "system" activities to the SQL Server Errolog file(s) as full blown editions do.. just the SSMSE tool does not provide a direct way to view the errorlog file(s)...
>I want to turn on query logging so I can see the queries coming in and nail down the one that is hosing the system.
this is another story... all SQL Server editions use the database's transaction log file(s).. but you can not directly inspect those files as no public API exists... there's a bunch to third party tools like Luminigent's Log Explorer that can perform that task, but you probably looking for another feature as well.. your last sentence implies the use of Profiler, but this tool is not available with the Express edition... you can use SQL Traces, the underlying architecture used by Profiler, but with no graphical tool to examine results/setting options..
regards
|||Wow I did not expect it to be so annoying to just watch incoming queries into the server.There is nothing like mysqls logging where I can log incoming queries to a file?
$1000 to view some logs is alot...
Thanks!
Michael
|||
hi Michael,
not directly... but, again, you can start your own trace to capture server's activity..
regards
Friday, February 24, 2012
Cannot shrink Transaction Log
the transaction logs have filled all available disk space. I would really
appreciate any advice on how to get it running again. My knowledge of SQL
Server 2000 is very limited so I would need so quite detailed instructions! I
am happy with entering statements into Query Analyzer.
I've tried to shrink the transaction log by running a backup on it in
Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
enough disk space to back this up.
So somehow I need to shrink these .LDF transaction log files. Also, if
anyone could advise on how to stop this situation happening again, that'd be
fantastic. If anyone can give advice on how to do this, you really would be
saving my life!
1. Consider the recovery model for the database. If not "simple" then SQL Server will not empty the
log files automatically, and the log will keep growing. When not "simple", only backup of the
transaction log will empty the log files.
2. After either setting to simple or scheduling regular transaction log backups, verify that the log
files are more or less empty. Use:
DBCC SQLPERF(LOGSPACE)
3. Now time for the shrink. Use DBCC SHRINKFILE, (not SHRINKDATABASE), as documented in Books
Online.
Also, there are some links and general info about shrink on
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Fluffy_Ninja" <FluffyNinja@.discussions.microsoft.com> wrote in message
news:C338EACF-9E37-47B3-B307-D9A15A87539C@.microsoft.com...
> Hello. I've got a situation where a live database has stopped working because
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd be
> fantastic. If anyone can give advice on how to do this, you really would be
> saving my life!
|||Hi,
What is your recovery model? Full, Simple ?
If you are using Full recovery model then you need to backup the transaction
log regularly.
If you don't need to set recovery model to Full then use Simple Recovery
Model you can find detailed information about it from Books Online.
Check out BACKUP LOG WITH TRUNCATE_ONLY (if it's acceptable for you..)
FROM BOL:
NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and
truncates the log. This option frees space. Specifying a backup device is
unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY are
synonyms.
After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes
recorded in the log are not recoverable. For recovery purposes, immediately
execute BACKUP DATABASE.
"Fluffy_Ninja" wrote:
> Hello. I've got a situation where a live database has stopped working because
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd be
> fantastic. If anyone can give advice on how to do this, you really would be
> saving my life!
Cannot shrink Transaction Log
e
the transaction logs have filled all available disk space. I would really
appreciate any advice on how to get it running again. My knowledge of SQL
Server 2000 is very limited so I would need so quite detailed instructions!
I
am happy with entering statements into Query Analyzer.
I've tried to shrink the transaction log by running a backup on it in
Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
enough disk space to back this up.
So somehow I need to shrink these .LDF transaction log files. Also, if
anyone could advise on how to stop this situation happening again, that'd be
fantastic. If anyone can give advice on how to do this, you really would be
saving my life!1. Consider the recovery model for the database. If not "simple" then SQL Se
rver will not empty the
log files automatically, and the log will keep growing. When not "simple", o
nly backup of the
transaction log will empty the log files.
2. After either setting to simple or scheduling regular transaction log back
ups, verify that the log
files are more or less empty. Use:
DBCC SQLPERF(LOGSPACE)
3. Now time for the shrink. Use DBCC SHRINKFILE, (not SHRINKDATABASE), as do
cumented in Books
Online.
Also, there are some links and general info about shrink on
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Fluffy_Ninja" <FluffyNinja@.discussions.microsoft.com> wrote in message
news:C338EACF-9E37-47B3-B307-D9A15A87539C@.microsoft.com...
> Hello. I've got a situation where a live database has stopped working beca
use
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions
! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is no
t
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd
be
> fantastic. If anyone can give advice on how to do this, you really would b
e
> saving my life!|||Hi,
What is your recovery model? Full, Simple ?
If you are using Full recovery model then you need to backup the transaction
log regularly.
If you don't need to set recovery model to Full then use Simple Recovery
Model you can find detailed information about it from Books Online.
Check out BACKUP LOG WITH TRUNCATE_ONLY (if it's acceptable for you..)
FROM BOL:
NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and
truncates the log. This option frees space. Specifying a backup device is
unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY ar
e
synonyms.
After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes
recorded in the log are not recoverable. For recovery purposes, immediately
execute BACKUP DATABASE.
"Fluffy_Ninja" wrote:
> Hello. I've got a situation where a live database has stopped working beca
use
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions
! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is no
t
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd
be
> fantastic. If anyone can give advice on how to do this, you really would b
e
> saving my life!
Cannot shrink Transaction Log
the transaction logs have filled all available disk space. I would really
appreciate any advice on how to get it running again. My knowledge of SQL
Server 2000 is very limited so I would need so quite detailed instructions! I
am happy with entering statements into Query Analyzer.
I've tried to shrink the transaction log by running a backup on it in
Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
enough disk space to back this up.
So somehow I need to shrink these .LDF transaction log files. Also, if
anyone could advise on how to stop this situation happening again, that'd be
fantastic. If anyone can give advice on how to do this, you really would be
saving my life!1. Consider the recovery model for the database. If not "simple" then SQL Server will not empty the
log files automatically, and the log will keep growing. When not "simple", only backup of the
transaction log will empty the log files.
2. After either setting to simple or scheduling regular transaction log backups, verify that the log
files are more or less empty. Use:
DBCC SQLPERF(LOGSPACE)
3. Now time for the shrink. Use DBCC SHRINKFILE, (not SHRINKDATABASE), as documented in Books
Online.
Also, there are some links and general info about shrink on
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Fluffy_Ninja" <FluffyNinja@.discussions.microsoft.com> wrote in message
news:C338EACF-9E37-47B3-B307-D9A15A87539C@.microsoft.com...
> Hello. I've got a situation where a live database has stopped working because
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd be
> fantastic. If anyone can give advice on how to do this, you really would be
> saving my life!|||Hi,
What is your recovery model? Full, Simple ?
If you are using Full recovery model then you need to backup the transaction
log regularly.
If you don't need to set recovery model to Full then use Simple Recovery
Model you can find detailed information about it from Books Online.
Check out BACKUP LOG WITH TRUNCATE_ONLY (if it's acceptable for you..)
FROM BOL:
NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and
truncates the log. This option frees space. Specifying a backup device is
unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY are
synonyms.
After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes
recorded in the log are not recoverable. For recovery purposes, immediately
execute BACKUP DATABASE.
"Fluffy_Ninja" wrote:
> Hello. I've got a situation where a live database has stopped working because
> the transaction logs have filled all available disk space. I would really
> appreciate any advice on how to get it running again. My knowledge of SQL
> Server 2000 is very limited so I would need so quite detailed instructions! I
> am happy with entering statements into Query Analyzer.
> I've tried to shrink the transaction log by running a backup on it in
> Enterprise Manager. However, the largest .LDF file is 33Gb and there is not
> enough disk space to back this up.
> So somehow I need to shrink these .LDF transaction log files. Also, if
> anyone could advise on how to stop this situation happening again, that'd be
> fantastic. If anyone can give advice on how to do this, you really would be
> saving my life!
Cannot shrink the transaction logs.
file (Size 9384.99 space used 87MB). I would like to shrink it, but
it's not working. I don't get any errors, the file just doesn't get any
smaller.
I'm using the Enterprise Manager. Datavbases.. Tasks.. Shrink
Databases.. Shrink File.. selecting the log file and trying both
"Compress" and "Truncate: options.
I can see a progress bar, so i know its doing something However the
file does not get smaller. And I have no idea why.
Any suggestions (including "go find someone who knows what he's
doing") are welcome
Jim Helfer
WTW Architects
Pittsburgh PACheck out http://www.karaszi.com/SQLServer/info_dont_shrink.asp, and pay special attention to the
section about DBCC LOGINFO.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jim Helfer" <JimHelfer@.newsgroup.nospam> wrote in message
news:eyczNyvSHHA.1200@.TK2MSFTNGP04.phx.gbl...
> I have a SQL Server 2000 SP3 database that has a large transaction file (Size 9384.99 space
> used 87MB). I would like to shrink it, but it's not working. I don't get any errors, the file
> just doesn't get any smaller.
> I'm using the Enterprise Manager. Datavbases.. Tasks.. Shrink Databases.. Shrink File..
> selecting the log file and trying both "Compress" and "Truncate: options.
> I can see a progress bar, so i know its doing something However the file does not get smaller.
> And I have no idea why.
> Any suggestions (including "go find someone who knows what he's doing") are welcome
> Jim Helfer
> WTW Architects
> Pittsburgh PA
>
>
Cannot shrink the transaction logs.
file (Size 9384.99 space used 87MB). I would like to shrink it, but
it's not working. I don't get any errors, the file just doesn't get any
smaller.
I'm using the Enterprise Manager. Datavbases.. Tasks.. Shrink
Databases.. Shrink File.. selecting the log file and trying both
"Compress" and "Truncate: options.
I can see a progress bar, so i know its doing something However the
file does not get smaller. And I have no idea why.
Any suggestions (including "go find someone who knows what he's
doing") are welcome
Jim Helfer
WTW Architects
Pittsburgh PACheck out http://www.karaszi.com/SQLServer/info_dont_shrink.asp, and pay spe
cial attention to the
section about DBCC LOGINFO.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jim Helfer" <JimHelfer@.newsgroup.nospam> wrote in message
news:eyczNyvSHHA.1200@.TK2MSFTNGP04.phx.gbl...
> I have a SQL Server 2000 SP3 database that has a large transaction file
(Size 9384.99 space
> used 87MB). I would like to shrink it, but it's not working. I don't get
any errors, the file
> just doesn't get any smaller.
> I'm using the Enterprise Manager. Datavbases.. Tasks.. Shrink Databases
. Shrink File..
> selecting the log file and trying both "Compress" and "Truncate: options.
> I can see a progress bar, so i know its doing something However the file
does not get smaller.
> And I have no idea why.
> Any suggestions (including "go find someone who knows what he's doing") a
re welcome
> Jim Helfer
> WTW Architects
> Pittsburgh PA
>
>