Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I am using sql 2008 express edition.
I have sql statements.I want to schedule those sql statements through batch file.
sql statements-sqlProcess.sql

USE [Marine_STS]
insert mstplant(pCode,pUserCode,pName,pShName) values (4,4,'p','p')
GO

batch file contents

sqlcmd -S WIN-MR3EVT3JRRM -U marine -P marine -i D:\IHITS\temp\Rajeev\SCHEDULE FILES\sqlProcess.sql

This is not working in server.

What I have tried:

I have tried in local system.Its working .but not working in server
Posted
Updated 9-Dec-16 1:26am

1 solution

Check the file, and all the folders containing it: does the server have a disk D:? Does the file exist? Does the SQL user instance have access to the file - it doesn't run under your user ID, so if the folder hasn't been given explicit access to that instance or to all users, it will fail.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900