sqlcmd Questions
4
Solved
I got a message from Microsoft in the last few days
Azure SQL Database 2014-04-01 APIs will be retired on 31 October 2025.
You're receiving this email because you use Azure SQL Database APIs.
To i...
Axum asked 2/11, 2022 at 16:12
7
Solved
I have the below master script which creates tables, and inserts some data and then creates the stored procedures.
--todo_master.sql
use master
go
:r todo_create_ddl.sql
:r todo_create_dml.sql
:...
Handgun asked 6/1, 2012 at 4:54
4
Solved
I am working on a MacBook Pro with M1 CPU so I can't use the "normal" mssql docker image. I am using azure-sql-edge that doesn't have sqlcmd to initialize the database (create schema, dat...
Picrite asked 7/4, 2022 at 5:44
11
I have followed the official Microsoft documentation and I have installed SQL Server Docker image
As result I have a SQL Server image running on Docker at the IP address 172.17.0.2
I also can ...
Wellrounded asked 17/5, 2020 at 21:45
8
I want to remove column header from SQL Server query output. I did the search but not found any solution. I have a query eg.
select cc.DepartmentID , cc.Name from HumanResources.Department cc
W...
Savoie asked 22/4, 2014 at 13:50
13
SQLCMD supports the -s parameter to specify the column separator, but I couldn't figure how how to represent the tab (CHAR(9)) character. I have tried the following but both don't work:
sqlcmd -S ...
Rarefy asked 30/9, 2010 at 10:9
2
Solved
I am using the Microsoft Data-Tier Application framework to create a deployment script based on a DacPackage object. I am attempting to use the Microsoft.SqlServer.Management.Smo.Server class to ex...
Portent asked 28/10, 2014 at 19:49
11
Solved
Using the following sqlcmd script:
sqlcmd -S . -d MyDb -E -s, -W -Q "select account,rptmonth, thename from theTable"
> c:\dataExport.csv
I get an csv output file containing
acctnum,rptmo...
Kimberli asked 30/6, 2014 at 19:54
2
I am trying to run a sql query from powershell for Windows SQL Server 2008 R2. It looks like the code is failing to pass SQL Server Authentication credentials to run the sqlcmd correctly. I am runn...
Charmaincharmaine asked 11/3, 2014 at 20:13
2
i am using SQLCMD to run a .sql file which is 270 MB. The script file (.sql) was generated using Red Gate SQL Data Compare synchronization wizard. I cannot run it from SSMS because of insufficient ...
Desiccator asked 10/7, 2014 at 0:31
3
Solved
In my Post Deployment Script, I would like to include all script files in a folder using a wildcard like this:
:r .\$(ReleaseName)\*.sql
Is there a way to do this? I can't find any..
Entice asked 13/3, 2014 at 14:29
4
Solved
Is there a way to tell if a variable is defined on command line using SQLCMD?
Here is my command line:
sqlcmd -vDB="EduC_E100" -i"Z:\SQL Common\Admin\ProdToTest_DB.sql"
Inside ProdToTest_DB.s...
Pointillism asked 12/10, 2010 at 13:20
5
Solved
In SSDT project (using VS2017/VS2015, SSDT version 15.1.61702.140), I cannot get my project to build. The compiler keeps complaining about the sql statement in my PostDeploymentScript (yes, I have ...
Grappling asked 11/5, 2017 at 20:58
7
Solved
I need to start and stop SQL Server from the command line. I am willing to write a small C# program if necessary, but I suspect that there's something (PowerShell, maybe?) that currently exists tha...
Aegean asked 15/12, 2008 at 15:46
9
Solved
I installed SQL Server 2008 R2 to my local machine. But, I can't create a new database because of rights (or lack of).
"CREATE DATABASE PERMISSION DENIED"
So, I tried to assign the admin privi...
Menagerie asked 27/3, 2012 at 12:13
4
Solved
I have this command
sqlcmd.exe -E -i "C:\joe-db-scripts\joe-db-tasks.Install.sql"
and I need to add the specific non-standard port of 32001. How do I do that? I was thinking of some flag like -p...
3
I am creating a class library that takes .SQL files as input (FileInfo) and a connection string. It then attempts to execute the sql file against the connection.
I have decided to support Microso...
12
Solved
I can quite easily dump data into a text file such as:
sqlcmd -S myServer -d myDB -E -Q "select col1, col2, col3 from SomeTable"
-o "MyData.txt"
However, I have looked at the help files for SQ...
Gastroenteritis asked 8/1, 2009 at 18:49
2
Here is the command line:
sqlcmd -S localhost -U myuser -P mypwd -b -r0 -Q "raiserror('hello',10,1) with nowait;waitfor delay '00:00:10';raiserror('world!',10,1) with nowait"
It is supposed to o...
Pool asked 29/6, 2016 at 18:30
4
I have read numerous posts and articles about the error:
Shared Memory Provider: No process is on the other end of the pipe.
Communication link failure.
...including these:
Error message: (p...
Aroma asked 27/4, 2019 at 14:47
19
Solved
How can I suppress hyphens (------------) from the results set of this sqlcmd command:
C:\temp>sqlcmd -d AdventureWorks -s ";"
-Q "SET NOCOUNT ON SELECT top 5 FirstName, LastName FROM Person....
Domination asked 2/3, 2010 at 9:57
4
Solved
I am using Visual Studio 2013 to manage a .sqlproj file containing our database schema. The schema has been deployed successfully dozens of times.
When attempting to publish to one specific target...
Octahedrite asked 19/2, 2015 at 22:37
3
Solved
So I have some trouble getting sqlalchemy and pyodbc working with a remote MS SQL Server. Local sqlcmd worked properly but not when I try to read the db via python code. Any help would be appreciat...
Hominoid asked 22/6, 2018 at 21:59
2
Solved
The PowerShell sqlps module provides core support for SQL Server access from within PowerShell and its Invoke-Sqlcmd cmdlet is its main workhorse for executing literal queries or SQL script files (...
Refrigeration asked 10/8, 2012 at 16:24
4
Solved
When I am running this from cmd on my SQL Server 2008 instance:
sqlcmd -U sa -S mymachinen_name\MSSQLSERVER
(where MSSQLSERVER is my instance name)
I get prompt for password and after that I ge...
Whisler asked 22/2, 2015 at 15:48
1 Next >
© 2022 - 2024 — McMap. All rights reserved.