Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy log to diff server

Status
Not open for further replies.

parsql

MIS
Nov 10, 2005
106
US
Hi all,

How can i copy the log file and make it run everytimne log gets back up. I have the server on STD edition so have to copy manually.

the back up is done by maitainance plan.
and back up of log is like

test_tlog_200605241600.TRN

I am trying to run command like bellow but not able to make it work

EXEC master..xp_cmdshell 'copy Y \\actualserver\f$\logs\test\test_tlog_'+ +getdate()+'.TRN'
\\standbyserver\d$\MSSQL\BACKUP\LOG\test_LOG.TRN'

it happens every 30 min so how can i copy this files.

Thanks
 
Look like your going down the right path! If you wish to copy files over server through xp_cmdshell you have to be running the SQL Server agent as a domain account with rights to all servers involved. LocalSystem will not work. That's where I would start.

-derek
 
i have done that but i am having trouble to copy file every 30 min because it says that specified file not found.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top