SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Replication - pre/post scripts with error failed to launch 'sqlcmd'


Replication - pre/post scripts with error failed to launch 'sqlcmd'

Author
Message
hoa.nguyen 64423
hoa.nguyen 64423
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 96
I am getting this error on the replication distribution job:

source_name error_code error_text
MSSQL_REPL 5 Access is denied.
MSSQL_ENG C:\ReplData_Hotfix\unc\100-xxxx-D-yyy$PATIENT_PUBLICATION\20140801144302\NUC_Patient_Publ77e153f5_0.sql
MSSQL_REPL 20130 Failed to launch 'sqlcmd'

The job runs under the sql server agent account which is an admin of the box and is also sysadmin on the distributor server. Full control permissions are granted on the snapshot folder C:\ReplData_Hotfix\unc\.

Please advise. Thanks!
JasonClark
JasonClark
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1742 Visits: 1027
U can execute pre and post scripts using sqlcmd utility. Before the snapshot is applied u need to specify scripts at Subscriber side. Script is used to create logins and schemas and more variety of reasons. U need to specify file location for each script and Snapshot agent copies files to snapshot folder when snapshot processing occurs. For more info visit: http://msdn.microsoft.com/en-us/library/ms152525.aspx
hoa.nguyen 64423
hoa.nguyen 64423
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 96
Thank you for the reply. I found the cause of the issue. I added the service account to the share and it worked.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search