Forums » .NET » SQL Server »

Create Batch file for sql server scripts(2008)

Posted Date: 21 Apr 2011      Posted By:: Anbuselvan     Member Level: Bronze  Member Rank: 0     Points: 1   Responses: 0

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 respond and make money from revenue sharing program.

Post Reply     
You must Sign In to post a response.

  • Return to Discussion Forum
  • Start new thread

  • Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India