Friday, March 30, 2012
Remove inactive entries from transaction log and log shipping
set to Full), I get an option to truncate the transaction log by checking
"Remove inactive entries from transaction log" check box in the backup
dialog. This basically causes the inactive portion of the transaction log
(where transaction is completes, either rolled back are committed) to be
truncated. So this potentially leads to saving of huge amount of hard disk
space.
Now, when I setup log shipping is there any similar option I can set on the
primary database? After every transaction log backup I want inactive entries
from the transaction log to be removed. Is there any way to do this? If yes,
how?. If no, why is that so? Once the backup is taken inactive log entries
on the primary database are of no use to log ship, right?
Rathna RajThe option in the backup dialog is very misleading. It basically means that
EM does *not* send the WITH NO_TRUNCATE option. This option is designed for
doing an "emergency" backup in case the database is corrupted, and I have
communicated to MS that the dialog shouldn't be misleading in this way. The
normal way to do log backup is by not specifying this option (having the
checkbox checked (I believe), the default). If the log shipping was written
by a sane individual ;-), then it should not specify this option, I.e., you
already have the desired behavior. To be certain, use a Profiler trace to
see what is going on.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Rathna Raj" <RathnaRajT@.icode.com> wrote in message
news:%2365JEWJyDHA.1272@.TK2MSFTNGP12.phx.gbl...
> When I try to take a Transaction log backup of a database (Recovery model
> set to Full), I get an option to truncate the transaction log by checking
> "Remove inactive entries from transaction log" check box in the backup
> dialog. This basically causes the inactive portion of the transaction log
> (where transaction is completes, either rolled back are committed) to be
> truncated. So this potentially leads to saving of huge amount of hard disk
> space.
> Now, when I setup log shipping is there any similar option I can set on
the
> primary database? After every transaction log backup I want inactive
entries
> from the transaction log to be removed. Is there any way to do this? If
yes,
> how?. If no, why is that so? Once the backup is taken inactive log entries
> on the primary database are of no use to log ship, right?
> Rathna Raj
>|||Hi Rathna,
Thanks for your post. Based on my research, log shipping does done backup
log part, so transaction log should not be large. Therefore, it seems that
truncating the transaction log of the primary server manually in log
shipping is not necessary.
For more information regarding log shipping, please refer to the following
article on SQL Server Books Online. Also, the example in this article will
help describe how the log shipping works.
Topic; "Log Shipping"
Thanks for using MSDN newsgroup.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.sql
Wednesday, March 28, 2012
Remove Backup History
Now,
I want to remove the backup history log from the Restore Database dialog
window but I could not find the command to remove it.
exec msdb.dbo.sp_delete_backuphistory
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> I have done a database backup and store the backup file in a harddisk
folder.
> Now,
> I want to remove the backup history log from the Restore Database dialog
> window but I could not find the command to remove it.
|||Thanks a lot. It works.
"Hassan" wrote:
> exec msdb.dbo.sp_delete_backuphistory
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> folder.
>
>
Remove Backup History
.
Now,
I want to remove the backup history log from the Restore Database dialog
window but I could not find the command to remove it.exec msdb.dbo.sp_delete_backuphistory
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> I have done a database backup and store the backup file in a harddisk
folder.
> Now,
> I want to remove the backup history log from the Restore Database dialog
> window but I could not find the command to remove it.|||Thanks a lot. It works.
"Hassan" wrote:
> exec msdb.dbo.sp_delete_backuphistory
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> folder.
>
>
Remove Backup History
Now,
I want to remove the backup history log from the Restore Database dialog
window but I could not find the command to remove it.exec msdb.dbo.sp_delete_backuphistory
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> I have done a database backup and store the backup file in a harddisk
folder.
> Now,
> I want to remove the backup history log from the Restore Database dialog
> window but I could not find the command to remove it.|||Thanks a lot. It works.
"Hassan" wrote:
> exec msdb.dbo.sp_delete_backuphistory
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:877ED168-5E2E-44CA-ABD8-9E16F83B9AA1@.microsoft.com...
> > I have done a database backup and store the backup file in a harddisk
> folder.
> > Now,
> > I want to remove the backup history log from the Restore Database dialog
> > window but I could not find the command to remove it.
>
>sql
Monday, March 26, 2012
Remove 2nd Log file
I've got a SQL 2000 SP4 server with a database that has 3 data files and 2
logs files.
I no longer need the 2nd log file and I would like to remove it. How is this
best accomplished with no or at least extremely minimal downtime. Is it done
the same way I remove a data file?
DBCC SHRINKFILE (MySecondLogFile, EMPTYFILE)
GO
USE master
GO
ALTER DATABASE MyDatabase
REMOVE FILE MySecondLogFile
Thanks for any advice or pointers!
-PhilHi,
As a first step take a transaction log backup to clear the active portion in
transaction log.
Step -1 - Transaction log backup
Step 2 - DBCC SHRINKFILE EMPTY FILE
Step -3 - ALTER DATABASE REMOVE FILE
Thanks
Hari
SQL Server MVP
"pmattson" <pmattson@.discussions.microsoft.com> wrote in message
news:CA34A3A3-1DC6-42EF-BFB9-C94DC2EC3CB2@.microsoft.com...
> Hi all,
> I've got a SQL 2000 SP4 server with a database that has 3 data files and 2
> logs files.
> I no longer need the 2nd log file and I would like to remove it. How is
> this
> best accomplished with no or at least extremely minimal downtime. Is it
> done
> the same way I remove a data file?
> DBCC SHRINKFILE (MySecondLogFile, EMPTYFILE)
> GO
> USE master
> GO
> ALTER DATABASE MyDatabase
> REMOVE FILE MySecondLogFile
>
> Thanks for any advice or pointers!
> -Phil
Friday, March 23, 2012
Remotely connecting
Question:
I am trying to set up server.
I have installed SQL 2005 standard.
And now I am trying to log in through TCP/IP..
I went to SQL Server Config Mgmt and Enabled TCP/IP
Double checked IP address and made it Active and enabled it.
Now I tried to connect Management Studio using that IP and it doesnt log in.
Does anyone knows good links to guidelines on how to set up server, login etc.
Thank you very muchDid you restart the service ? See my screencast on www.sqlserver2005.de . You have to restart to make changes effective.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de|||
check your surface area configuration for connection. check the ooption that says you want to accept connection from a remote connection. The only connection allowed by default is local
start>programs>micrsoft sql server 2005>configuration tools>surface area configuration>configuration for services and connection>remote connection>local and remote connection
from there you'll know what to do
Tuesday, March 20, 2012
Remote SQL Access Through ISA (SBS 2003)
Our Software vendor needs to log on to SQL Server (we
have SBS 2003 Premium Edition)through ISA server. I have
followed microsoft direction and have opened port 1433.
He still cannot log on. He can log on through terminal
services but has no access to sql server. I have tried my
self and get the message that either the server does not
exsist or permission has been denied.
I can Ping the server sucessfully from remote site.
Please advice.
Thank you.
I have read articles # 300211 on microsoft web site in
knowledge base.
Many thanks for your time.
.Is your SQL Server a default or a named instance? If it's a default
instance then by default it listens on port 1433 but an admin could have
changed it to some other port. If it's a named instance then it will by
default use a dynamic port. You would need to check the Server Network
Utility on the server or read the latest SQL error log to see what port
your SQL Server is actually listening on and then open the appropriate port.
Also, if it's a named instance you will need to open UDP port 1434 OR
make your port static through the Server Network Utility AND specify the
port at the client (through an alias or by adding ,XXXX to the server name
in the connection string).
823938 How to use static and dynamic port allocation in SQL Server 2000
http://support.microsoft.com/?id=823938
You didn't mention the error you get, but most likely it's the one from:
328306 INF: Potential Causes of the "SQL Server Does Not Exist or Access
http://support.microsoft.com/?id=328306
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Remote Server Not Visible
I am trying to set up log shipping between SQL servers on two different
networks (diff forests) with a two way trust relationship.
Problem is that I can't see the remote SQL server in the destination
server drop down list (I can see local SQL servers).
The SQL agents on both machines are running under different accounts.
I have tried to add the account running the remote SQL agent to my local
SQL servers administrators group but this has no effect.
I can ping the server by name and it resolves OK.
I have registered the server with Enterprise manager, and even tried to
add it as a linked server to no effect.
Any ideas to resolve this would be much appreciated.
Ranj.
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Ranj,
I have no way of emulating your situation here, but one thing I'd try is
using the client network utility to create an alias to the other server
based on IP address, register the alias in EM and then see if that appears
in the Log-shipping wizard.
HTH,
Paul Ibison
|||Hi Paul,
Thanks for the response.
I tried adding the server through the client network utility with tcp/IP
and then named pipes, but neither worked.
Is it possible to script transaction log shipping through stored
procedures ?
Ranj.
On Wed, 14 Jul 2004 17:09:24 +0100, Paul Ibison
<Paul.Ibison@.Pygmalion.Com> wrote:
> Ranj,
> I have no way of emulating your situation here, but one thing I'd try is
> using the client network utility to create an alias to the other server
> based on IP address, register the alias in EM and then see if that
> appears
> in the Log-shipping wizard.
> HTH,
> Paul Ibison
>
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|||Ranejet,
there is a list of SPs for log shipping (and other sections) in BOL :
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\tsq
lref.chm::/ts_sp_00_519s.htm
It is possible to script it, but not possible to script it out from an
existing one, so this could take some time.
Please can you post back to let me know what OSs you are using?
Regards,
Paul Ibison
|||Hi Paul,
thanks for the info - I am using Windows 2000 Server edition on local and
remote - both have SQL Enterprise installed.
Both networks have their own forests and are connected with a two way
trust.
There is a checkpoint firewall between them used to esatblish a VPN.
Ranj.
|||Ranj,
you can setup logshipping using the resource kit utilities. I use the ones
that was for sql7 on sql2000 with no problems at all, it is eay to setup as
well.
let me know if you need the scripts and documentation from resource kit from
sql7.
regards
m
"ranejet" <not-tellint> wrote in message
news:opsa55bmjgcakp78@.idt.toare.co.uk...
> Hi Paul,
> Thanks for the response.
> I tried adding the server through the client network utility with tcp/IP
> and then named pipes, but neither worked.
> Is it possible to script transaction log shipping through stored
> procedures ?
> Ranj.
> On Wed, 14 Jul 2004 17:09:24 +0100, Paul Ibison
> <Paul.Ibison@.Pygmalion.Com> wrote:
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|||Ranejet,
pinging the server doesn't mean port 1433 is open in the firewall. I'd check
that.
Also, use dnslookup to verify the ip address after you have successfully
pinged the server - it may be another server in a different domain.
HTH,
Paul Ibison
|||try an odbcping to verify 1433 is open.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eeD$nBoaEHA.3596@.tk2msftngp13.phx.gbl...
> Ranejet,
> pinging the server doesn't mean port 1433 is open in the firewall. I'd
check
> that.
> Also, use dnslookup to verify the ip address after you have successfully
> pinged the server - it may be another server in a different domain.
> HTH,
> Paul Ibison
>
|||If You can ping the Server, that probably means You have full IP connectivity, since ICMP is the first thing to block in a firewall.
What You might lack, however, is NetBIOS resolution, which Is possibly what the Enterprise Manager is looking for. Do You see the remote Server in the "network" in Windows Explorer ?
If not, activating NetBIOS over TCP/IP might work, alternatively, You need a common WINS server between the two servers to establish a browse list.
Remote Server login
Monday, March 12, 2012
Remote restore question
Quick question. We perform db backups at 10pm on a certain database
that is about 12 gig. Then the transaction log is backed up every
hour. We'd like to restore this database to another off site server,
then apply the logs to keep it in sync w/ production. I've tested this
and it seems to work fine. My only question is regarding the full
backups that are performed every night. Due to bandwidth limitations,
we can't get the full db backup to the remote server in a reasonable
amount of time (the logs can make it over within one hour no problem).
Can we just keep restoring the logs on the remote server without the
nightly db backups being restored? I guess I'm asking if the full db
backup does anything to the log (empties it or the like) that would
make the dbs out of sync?
Thanks in advance.That would be fine. This is one of the reasons why a full backup doesn't
truncate the transaction log. But I suggest you have operational
instructions readily available on how to do this manually, in case the log
restores becomes out of sync, for any reason...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"sqlboy2000" <sqlboy2000@.hotmail.com> wrote in message
news:49e85cd3.0403171311.6b65aab4@.posting.google.com...
> Hello everyone,
> Quick question. We perform db backups at 10pm on a certain database
> that is about 12 gig. Then the transaction log is backed up every
> hour. We'd like to restore this database to another off site server,
> then apply the logs to keep it in sync w/ production. I've tested this
> and it seems to work fine. My only question is regarding the full
> backups that are performed every night. Due to bandwidth limitations,
> we can't get the full db backup to the remote server in a reasonable
> amount of time (the logs can make it over within one hour no problem).
> Can we just keep restoring the logs on the remote server without the
> nightly db backups being restored? I guess I'm asking if the full db
> backup does anything to the log (empties it or the like) that would
> make the dbs out of sync?
> Thanks in advance.|||You can restore logs in sequence on a SQL 7.0 or 2000 and ignore intervening
full backups. This is intentional so that if a full backup goes bad, you
can go to an older full backup and restore more logs to get your database up
to the last committed transaction.
BTW, this is called log-shipping. SQL enterprise edition includes it as
built-in, but many people write their own routines to handle situations and
configurations not directly supported but the built-in tools.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"sqlboy2000" <sqlboy2000@.hotmail.com> wrote in message
news:49e85cd3.0403171311.6b65aab4@.posting.google.com...
> Hello everyone,
> Quick question. We perform db backups at 10pm on a certain database
> that is about 12 gig. Then the transaction log is backed up every
> hour. We'd like to restore this database to another off site server,
> then apply the logs to keep it in sync w/ production. I've tested this
> and it seems to work fine. My only question is regarding the full
> backups that are performed every night. Due to bandwidth limitations,
> we can't get the full db backup to the remote server in a reasonable
> amount of time (the logs can make it over within one hour no problem).
> Can we just keep restoring the logs on the remote server without the
> nightly db backups being restored? I guess I'm asking if the full db
> backup does anything to the log (empties it or the like) that would
> make the dbs out of sync?
> Thanks in advance.|||Excellent. Thanks to both of you.
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message news:<enVq$YGDEHA.1588@.tk2msftn
gp13.phx.gbl>...
> You can restore logs in sequence on a SQL 7.0 or 2000 and ignore interveni
ng
> full backups. This is intentional so that if a full backup goes bad, you
> can go to an older full backup and restore more logs to get your database
up
> to the last committed transaction.
> BTW, this is called log-shipping. SQL enterprise edition includes it as
> built-in, but many people write their own routines to handle situations an
d
> configurations not directly supported but the built-in tools.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "sqlboy2000" <sqlboy2000@.hotmail.com> wrote in message
> news:49e85cd3.0403171311.6b65aab4@.posting.google.com...
Remote Proc Restore Fails
2000. I have added a link on my primary server so I can execute a
remote stored proc on the standby server from the SQL Agent job on the
primary. The remote procedure restores the backup copied over from the
primary server.
When the remote procedure executes, the job reports success, but the
standby server is left in the Loading state or Loading/Suspect on some
executions. The procedure is:
RESTORE DATABASE MPR
FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
STATS = 5
When I execute the procedure on the standby using SQL Query Analyzer
after a failure, it restores successfully! It only fails when it runs
from the job on the primary server. But the job history says it was
successful.
Can anyone help me troubleshoot this problem? I don't know where to
begin.
TerryI should mention that I have 12 other databases using similar
procedures to implement log shipping and I have never seen this
problem before on any of them. The only apparent difference is that
this DB is much bigger 15GB and uses multiple file groups.
dontsendmecrud@.hotmail.com (Terry) wrote in message news:<e2c86606.0407080535.11f95f63@.posting.google.com>...
> I have set up a job to implement simple Log Shipping for SQL Server
> 2000. I have added a link on my primary server so I can execute a
> remote stored proc on the standby server from the SQL Agent job on the
> primary. The remote procedure restores the backup copied over from the
> primary server.
> When the remote procedure executes, the job reports success, but the
> standby server is left in the Loading state or Loading/Suspect on some
> executions. The procedure is:
> RESTORE DATABASE MPR
> FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
> WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
> MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
> MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
> MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
> MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
> STATS = 5
> When I execute the procedure on the standby using SQL Query Analyzer
> after a failure, it restores successfully! It only fails when it runs
> from the job on the primary server. But the job history says it was
> successful.
> Can anyone help me troubleshoot this problem? I don't know where to
> begin.
> Terry|||Hi - I have exactly the same problem, with the standby database in a
state of loading after the database restore - rather than in read only.
I can run each step in the job manually and it works fine - only when
run from the remote server does it seem to fail.
Any help would be appreciated.
Thanks,
Serena.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hi - Found the issue - the linked server has a query timeout connection
setting - this was set to 0 which means it uses the remote query timeout
setting in sp_configure - this was set to 10 minutes...hence the failures.
"Serena Barker" wrote:
> Hi - I have exactly the same problem, with the standby database in a
> state of loading after the database restore - rather than in read only.
> I can run each step in the job manually and it works fine - only when
> run from the remote server does it seem to fail.
> Any help would be appreciated.
> Thanks,
> Serena.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
>
Remote Proc Restore Fails
2000. I have added a link on my primary server so I can execute a
remote stored proc on the standby server from the SQL Agent job on the
primary. The remote procedure restores the backup copied over from the
primary server.
When the remote procedure executes, the job reports success, but the
standby server is left in the Loading state or Loading/Suspect on some
executions. The procedure is:
RESTORE DATABASE MPR
FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
STATS = 5
When I execute the procedure on the standby using SQL Query Analyzer
after a failure, it restores successfully! It only fails when it runs
from the job on the primary server. But the job history says it was
successful.
Can anyone help me troubleshoot this problem? I don't know where to
begin.
TerryI should mention that I have 12 other databases using similar
procedures to implement log shipping and I have never seen this
problem before on any of them. The only apparent difference is that
this DB is much bigger 15GB and uses multiple file groups.
dontsendmecrud@.hotmail.com (Terry) wrote in message news:<e2c86606.0407080535.11f95f63@.posti
ng.google.com>...
> I have set up a job to implement simple Log Shipping for SQL Server
> 2000. I have added a link on my primary server so I can execute a
> remote stored proc on the standby server from the SQL Agent job on the
> primary. The remote procedure restores the backup copied over from the
> primary server.
> When the remote procedure executes, the job reports success, but the
> standby server is left in the Loading state or Loading/Suspect on some
> executions. The procedure is:
> RESTORE DATABASE MPR
> FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
> WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
> MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
> MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
> MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
> MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
> STATS = 5
> When I execute the procedure on the standby using SQL Query Analyzer
> after a failure, it restores successfully! It only fails when it runs
> from the job on the primary server. But the job history says it was
> successful.
> Can anyone help me troubleshoot this problem? I don't know where to
> begin.
> Terry|||Hi - I have exactly the same problem, with the standby database in a
state of loading after the database restore - rather than in read only.
I can run each step in the job manually and it works fine - only when
run from the remote server does it seem to fail.
Any help would be appreciated.
Thanks,
Serena.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Hi - Found the issue - the linked server has a query timeout connection
setting - this was set to 0 which means it uses the remote query timeout
setting in sp_configure - this was set to 10 minutes...hence the failures.
"Serena Barker" wrote:
> Hi - I have exactly the same problem, with the standby database in a
> state of loading after the database restore - rather than in read only.
> I can run each step in the job manually and it works fine - only when
> run from the remote server does it seem to fail.
> Any help would be appreciated.
> Thanks,
> Serena.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>
Remote Proc Restore Fails
2000. I have added a link on my primary server so I can execute a
remote stored proc on the standby server from the SQL Agent job on the
primary. The remote procedure restores the backup copied over from the
primary server.
When the remote procedure executes, the job reports success, but the
standby server is left in the Loading state or Loading/Suspect on some
executions. The procedure is:
RESTORE DATABASE MPR
FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
STATS = 5
When I execute the procedure on the standby using SQL Query Analyzer
after a failure, it restores successfully! It only fails when it runs
from the job on the primary server. But the job history says it was
successful.
Can anyone help me troubleshoot this problem? I don't know where to
begin.
Terry
I should mention that I have 12 other databases using similar
procedures to implement log shipping and I have never seen this
problem before on any of them. The only apparent difference is that
this DB is much bigger 15GB and uses multiple file groups.
dontsendmecrud@.hotmail.com (Terry) wrote in message news:<e2c86606.0407080535.11f95f63@.posting.google. com>...
> I have set up a job to implement simple Log Shipping for SQL Server
> 2000. I have added a link on my primary server so I can execute a
> remote stored proc on the standby server from the SQL Agent job on the
> primary. The remote procedure restores the backup copied over from the
> primary server.
> When the remote procedure executes, the job reports success, but the
> standby server is left in the Loading state or Loading/Suspect on some
> executions. The procedure is:
> RESTORE DATABASE MPR
> FROM DISK = N'\\MPR01\SQLLogShip\MPR_backup_device.bak'
> WITH REPLACE, STANDBY = N'\\MPR01\SQLLogShip\undo_MPR_Data.ldf',
> MOVE N'MPR_Data' TO N'E:\SQLData\MSSQL\Data\MPR_Data.mdf',
> MOVE N'MPR_Index' TO N'D:\SQLIndex\MPR_Index.ndf',
> MOVE N'MPR_Log1' TO N'E:\SQLData\MSSQL\Data\MPR_Log1.ldf',
> MOVE N'MPR_Log2' TO N'E:\SQLData\MSSQL\Data\MPR_Log2.ldf',
> STATS = 5
> When I execute the procedure on the standby using SQL Query Analyzer
> after a failure, it restores successfully! It only fails when it runs
> from the job on the primary server. But the job history says it was
> successful.
> Can anyone help me troubleshoot this problem? I don't know where to
> begin.
> Terry
|||Hi - I have exactly the same problem, with the standby database in a
state of loading after the database restore - rather than in read only.
I can run each step in the job manually and it works fine - only when
run from the remote server does it seem to fail.
Any help would be appreciated.
Thanks,
Serena.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Hi - Found the issue - the linked server has a query timeout connection
setting - this was set to 0 which means it uses the remote query timeout
setting in sp_configure - this was set to 10 minutes...hence the failures.
"Serena Barker" wrote:
> Hi - I have exactly the same problem, with the standby database in a
> state of loading after the database restore - rather than in read only.
> I can run each step in the job manually and it works fine - only when
> run from the remote server does it seem to fail.
> Any help would be appreciated.
> Thanks,
> Serena.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>