You must Sign In to post a response.

Create Batch file for sql server scripts(2008)

Create batch file for Sql server scripts but batch file is error thrown
Error Details
Sqlcmd: Error: Connection failure. SQL Native Client is not installed correctly.
To correct this, run SQL Server Setup.

Pls see following code
@echo off

set /p SName=HDCHCTDAM36893:
set /p UName=traceuser:
set /p Pwd=123456:
set /p DbName=SampleBatch1:

set /p choice=ARE YOU SURE TO EXECUTE SCRIPTS in Samplebatchfile (y/n) ?

if '%choice%'=='y' goto begin
goto end

sqlcmd -U traceuser -P 123456 -S HDCHCTDAM36893 -v DbName="SampleBatch1" -i "C:\Scripts\Samletable Delete Query.sql"


No responses found. Be the first to comment...