Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Log Shipping Jobs on Secondary not getting created Expand / Collapse
Author
Message
Posted Friday, March 23, 2012 9:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 1:39 PM
Points: 23, Visits: 151
This script is good enough and it must create those JOBS...
Did you try to execute this script at destination server without get any has an output? sems quit perplexing
Well, then.... You should create manually each job, (copy & restore).

Copy
Naming: LSCopy_sourcesrvname,pornumber_DBSource
, step 1, type Operating system (cmdexec)

"C:\apps_srv\mssql\100\Tools\Binn\sqllogship.exe" -Copy "NRO_GUID_1" -server "destination_server_instance"

Restore
Naming: LSRestore_sourcesrvname,pornumber_DBDestination
, step 1, type Operating system (cmdexec)

"C:\apps_srv\mssql\100\Tools\Binn\sqllogship.exe" -Restore "NRO_GUID_1" -server "destination_server_instance"


NRO_GUID_1-> id in msdb.dbo.log_shipping_secondary create by some like
insert into msdb.dbo.log_shipping_secondary(NEWID(),'sourceserver,portnumber',
primary_database,
backup_source_directory,
backup_destination_directory,
file_retention_period,
copy_job_id ,--> id from select * from sysjobs create early
restore_job_id ,--> id from select * from sysjobs create early
monitor_server,
monitor_server_security_mode,
user_specified_monitor,
last_copied_file - null,
last_copied_date -null)

So, first create both jobs with "id_guid" as a text, then insert into table take guid number and edit job command as needeed... and tell us how it work.

Regards! FPB





Post #1271770
Posted Tuesday, March 27, 2012 8:44 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 19, 2014 8:18 AM
Points: 239, Visits: 368
Thanks, Al-Rahim, I may try that later. Since this is a test, I have also tried log shipping to another secondary. For those trials, the jobs get created successfully, but the copy job fails with an "Could not retrieve copy settings for secondary id '*****'. Then, I tried to log ship to this same secondary without providing a monitor. In this case, all is working.

I am continuing to research this, as I need to logship to the original secondary and I must have a monitor.




Del Lee
Post #1273544
Posted Monday, July 15, 2013 5:15 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 18, 2013 10:45 PM
Points: 10, Visits: 33
Good Morning Del Lee,


I too facing the same issue.Did you get the solution for this issue?.

It will be great if you share it.

Regards
Post #1473584
Posted Monday, July 15, 2013 6:41 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 19, 2014 8:18 AM
Points: 239, Visits: 368
Did you get the solution for this issue?


No, I was never able to get this resolved. In the end, I believe it was a network issue because the secondary was on a different network. I'm sure there is a solution for this scenario, but it was not critical in our case to pursue it beyond what I had already done. Good luck with your situation.




Del Lee
Post #1473623
Posted Monday, July 15, 2013 8:27 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 1:39 PM
Points: 23, Visits: 151
The error refers to an account entitlement error... so give properly permissions to secondary agent server account. You should have same account in both primary and secondary servers. Also see permissions at windows level (the secondary agent server account should have read permission for destination backup folder)
That will solve your issue.. Please, let us know.
Regards.
Post #1473683
Posted Monday, July 15, 2013 9:03 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 19, 2014 8:18 AM
Points: 239, Visits: 368
Al-Rahim (7/15/2013)
The error refers to an account entitlement error... so give properly permissions to secondary agent server account. You should have same account in both primary and secondary servers. Also see permissions at windows level (the secondary agent server account should have read permission for destination backup folder)


As I recall, I did all of that and it was still unsuccessful. Note that this was over a year ago and Log Shipping was only going to be temporary solution at that time. The secondary server does not exist anymore and we have moved on to another DR solution, so there is no way to retry nor is there any need to retry using that exact scenario.

Thanks for your concern.




Del Lee
Post #1473709
Posted Monday, July 15, 2013 10:33 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 18, 2013 10:45 PM
Points: 10, Visits: 33
Hi,

I gave same user name and password(administrator) to both sql server agent accounts as well as sql services on both the servers.Complete read and write permissions were give to all the necessary folders.But still the same issue.

Regards

Post #1473973
Posted Tuesday, July 16, 2013 10:05 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 1:39 PM
Points: 23, Visits: 151
HI amitsdba... those servers live in same domain? Try this: create a group domain level, and give it permission in both servers, create a couple of account on it(one for each server o use the same it's up to you) ... that should resolve any permissions issue. If not, please post error log message.
Post #1474205
Posted Tuesday, July 16, 2013 10:36 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 18, 2013 10:45 PM
Points: 10, Visits: 33
Hi Al-Rahim/Del Lee,

I reinstalled sql server 2005 on both primary server and standby server on virtual machine and issue got resolved and log shipping started working fine.I think issue was with changing the server name after sql server installation .

Thanks for Al-Rahim & Del Lee for your time.
Post #1474366
Posted Friday, December 20, 2013 8:51 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 24, 2014 7:18 AM
Points: 1, Visits: 27
Yes, the problem was change the servername.

when select @@servername returns null, the jobs are not created.

I had the same issue and after i have corrected the servername the jobs were created.

@@Servername of null can happen if there is no entry in sys.servers for server_id 0. check sys.servers with this:

select * from sys.servers

steps to correct:

sp_dropserver '<servername>' -- if exist a one with the correct servername but id different from 0

sp_addserver '<servername', local

restart service:

source: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f5405442-2ab9-4e9f-8688-2e8ce5dae853/servername-returning-null?forum=sqldatabaseengine
Post #1525035
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse