Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 SQLCMD not working

Author  Topic 

masood_1966
Starting Member

4 Posts

Posted - 2015-01-08 : 05:10:12
I have SQL Server 2012 installed on my machine under windows 8. I am trying to sqlcmd in which only sqlcmd help is working and for rest of the commands it is giving error message
T-SQL execution command line has stopped working
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.


Please help how to fix the problem. I don't want to reinstall the software.



S. Husain Akhter Naqvi
CSD, TimesNow

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2015-01-08 : 05:51:41
can you run this in management studio and then try the SQLCMD again
EXEC sp_configure 'xp_cmdshell', 1
Go


Javeed Ahmed
https://www.linkedin.com/pub/javeed-ahmed/25/5b/95
Go to Top of Page

masood_1966
Starting Member

4 Posts

Posted - 2015-01-08 : 06:06:24
I already executed the mentioned command with Reconfigure command but still not working for me.

quote:
Originally posted by ahmeds08

can you run this in management studio and then try the SQLCMD again
EXEC sp_configure 'xp_cmdshell', 1
Go


Javeed Ahmed
https://www.linkedin.com/pub/javeed-ahmed/25/5b/95



S. Husain Akhter Naqvi
CSD, TimesNow
Go to Top of Page

masood_1966
Starting Member

4 Posts

Posted - 2015-01-08 : 06:12:35
Please see below the command

C:\Windows\system32>sqlcmd -?
Microsoft (R) SQL Server Command Line Tool
Version 9.00.1399.06 NT INTEL X86
Copyright (c) Microsoft Corporation. All rights reserved.

usage: Sqlcmd [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w screen width]
....

but any other command except help is not working.


S. Husain Akhter Naqvi
CSD, TimesNow
[/quote]

S. Husain Akhter Naqvi
CSD, TimesNow
Go to Top of Page

masood_1966
Starting Member

4 Posts

Posted - 2015-01-09 : 05:24:08
Immediate help is required as I am stuck

S. Husain Akhter Naqvi
CSD, TimesNow
Go to Top of Page
   

- Advertisement -