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 2000 Forums
 Transact-SQL (2000)
 sp_configure and exec master..xp_cmdshell 'bcp

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-01-05 : 14:47:07
Pb: equivalent of sp_configure and exec master..xp_cmdshell 'bcp... in T-sql 2000

This is not working for me in sql 2000. It works well in sql 2005


use master;
GO
EXEC sp_configure 'show advanced option', '1';
reconfigure
exec sp_configure 'xp_cmdshell',1
reconfigure

exec master..xp_cmdshell 'bcp mosaikDB742.dbo.FilelistInput in C:\Dev\Mosaik\SQl\Filelist.csv -T -c -Uusername -Ppassword -Sinstance'

exec sp_configure 'xp_cmdshell',0
reconfigure

EXEC sp_configure 'show advanced option', '0';
reconfigure

Thanks a lot for your help.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-01-05 : 15:03:25
sql 2000

grant execute on xp_cmdshell to userName
Go to Top of Page

sonnysingh
Starting Member

42 Posts

Posted - 2007-05-28 : 06:15:33
It is still give the result 'Access Denied' but when run
exec master..xp_cmdshell 'dir c:\*.*' works fine..

what I am missing???

Thanks in Advance


SqlIndia
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-28 : 12:35:11
Need add sql login as master db user to run xp_cmdshell.
Go to Top of Page
   

- Advertisement -