Top "Sqlcmd" questions

SQLCMD is a command line tool used to run SQL batches on Microsoft SQL Server.

trying to run sqlcmd fails, unable to establish connection?

When I try to run sqlcmd (from the cmd prompt) I get the following error: HResult 0x2, Level 16, State 1 Named …

sql-server sqlcmd
Error Handling with Batch File & Sqlcmd

I have a batch file that runs some SELECT queries using sqlcmd, puts the results into text files, and uploads …

windows error-handling batch-file sqlcmd
Conditional logic in PostDeployment.sql script using SQLCMD

I am using a SQL 2008 database project (in visual studio) to manage the schema and initial test data for my …

sql database sql-server-2008 sqlcmd
SQL Server Network Interfaces: Connection string is not valid [87]

When I am running this from cmd on my SQL Server 2008 instance: sqlcmd -U sa -S mymachinen_name\MSSQLSERVER (where …

sql-server sqlcmd
sqlcmd - connect to local instance of SQLEXPRESS

I want to run a .sql batch script to delete records from a number of tables from cmd window. So, …

sqlcmd
Accessing the returned value of a SQL statement in SQLCMD

I'm trying to get the value of a SQL statement when I run it in a DOS batch file ... sqlcmd …

sql-server batch-file dos sqlcmd
Proper way to detect if SQLCMD.exe is installed?

I am creating a class library that takes .SQL files as input (FileInfo) and a connection string. It then attempts …

c# .net sqlcmd
How to encrypt all existing stored procedures of a database

Is there any possibility to encrypt all existing stored procedures of a SQL Server 2008 database AFTER they have been created …

sql-server sql-server-2008 stored-procedures encryption sqlcmd
How to properly manage database deployment with SSDT and Visual Studio 2012 Database Projects?

I'm in the research phase trying to adopt 2012 Database Projects on an existing small project. I'm a C# developer, not …

sql visual-studio-2012 sqlcmd database-project sql-server-data-tools
How to use :setvar properly?

I call several sql files using: :r C:\Scripts\Script1.sql :r C:\Scripts\Script2.sql :r C:\Scripts\Script3.…

sql sql-server tsql sqlcmd