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.
| Author |
Topic |
|
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2010-10-22 : 09:01:22
|
Hi, I am trying to use xp_cmdshell, which I have used on th ejob all the time in this way, but for some reason is not working on my computer. Below is the error mesage that I am getting, but I am not understanding what it is telling me or what to do about it. I am using SQL Server Express 2008, and my machine is Windows 64 bit processing, is case this has something to do with it. If you have any ideas what I can do to get this work I would appreaciate it.Thank you SQLState = 08001, NativeError = 126Error = [Microsoft][SQL Native Client]VIA Provider: The specified module could not be found. NULLSQLState = 08001, NativeError = 126Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.SQLState = S1T00, NativeError = 0Error = [Microsoft][SQL Native Client]Login timeout expiredNULLMy code:my code:This is using the the Northwind databaseexec Master..xp_cmdshell 'bcp " Select * from dbo.Employees " queryout C:\TestEd.xls -T -c' ITM |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-22 : 14:37:30
|
| Seems like you will have to enable xp_cmdshell on your server.PBUH |
 |
|
|
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2010-10-22 : 19:10:22
|
quote: Originally posted by Sachin.Nand Seems like you will have to enable xp_cmdshell on your server.PBUH
Yes it looks like I have to turn on something comand shell or repote server, but how do you do that?ITM |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-23 : 01:01:55
|
| EXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmdshell', 1GORECONFIGUREGOPBUH |
 |
|
|
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2010-10-23 : 20:59:24
|
| Hi,I ran this but I still get the same error, do you have any other ideas what I might be able to do? I appreciate your help I have been searching for a solution for week now.thank youITM |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2010-10-24 : 13:38:38
|
| I got it to work, thanks for your help.ITM |
 |
|
|
|
|
|
|
|