Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Dos commands within a stored procedure
Can I issue a dos command like
Cd\fred
Delete *.*

Thanks in advace for your assistance...

Report this thread to moderator Post Follow-up to this message
Old Post
Jim Heavey
04-06-06 04:23 PM


Re: Dos commands within a stored procedure
use osql.

Mel


Report this thread to moderator Post Follow-up to this message
Old Post
MSLam
04-06-06 04:23 PM


Re: Dos commands within a stored procedure
Yes, though xp_cmdshell. Bu carefully consider the security implications.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/


"Jim Heavey" < JimHeavey@discussion
s.microsoft.com> wrote in message
news:98BB887A-EDD1-4D08-966D- 2938733502FD@microso
ft.com...
> Can I issue a dos command like
> Cd\fred
> Delete *.*
>
> Thanks in advace for your assistance...


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
04-06-06 04:24 PM


Re: Dos commands within a stored procedure
Hi Jim!

Don't forget that xp_cmdshell is disabled in SQL 2005 by default if that's
your platform. You'll need to enable it using the SQL Server Service Surface
Configuration Manager. And your DBA is gonna give you hell for doing so :-)

BTW, you would probably want to do a

del C:\fred\*.*

to chain the commands. And if you run a command shell like 4NT that aliases
commands like del, you may have to make it

*del C:\fred\*.*

Regards,
Jan

"Tibor Karaszi" <tibor_please.no. email_karaszi@hotmai
l.nomail.com> wrote in
message news:OpneAAZWGHA.3328@TK2MSFTNGP02.phx.gbl...
> Yes, though xp_cmdshell. Bu carefully consider the security implications.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www. solidqualitylearning
.com/
> Blog: http:// solidqualitylearning
.com/blogs/tibor/
>
>
> "Jim Heavey" < JimHeavey@discussion
s.microsoft.com> wrote in message
> news:98BB887A-EDD1-4D08-966D- 2938733502FD@microso
ft.com... 
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jan Van der Eecken
04-07-06 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 07:51 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006