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)
 xp_cmdshell

Author  Topic 

bilencekic
Posting Yak Master

121 Posts

Posted - 2006-08-25 : 07:00:58
why not EXEC xp_cmdshell 'c:\text.txt'
or
EXEC xp_cmdshell 'Notepad.exe'
doesn't work ? query analizer waits and waits but nothing happens.
how to run an exe ?

MS BLESS US

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-08-25 : 07:12:08
notepad.exe has a graphical user interface.

Since xp_cmdshell cannot interact with the user interface, notepad just waits and waits.

CODO ERGO SUM
Go to Top of Page

bilencekic
Posting Yak Master

121 Posts

Posted - 2006-08-25 : 07:43:06
san i set a server name when using xp_Sendmaail ?
beucase i have to send daily mails to users by getting some datas from database
but mail server and database server are on diffrent locations.


MS BLESS US
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-08-25 : 09:26:06
You should look up xp_Sendmail in SQL Server Books Online

SQL Server 2000 Books Online
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/startsql/portal_7ap1.asp

SQL Server 2005 Books Online
http://msdn2.microsoft.com/en-us/library/ms130214.aspx



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -