Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What exactly is external procedure xp_cmdshell in sql server?
I wanna know why it's said to be dangerous!!
Posted

1 solution

You can execute OS level commands on the server.
It is not dangerous on it's own. But if the a database or a server is not well protected, if there are leaks in the security settings, an attacker can access the operating system itself, and that's the danged.
So you need to be extremely careful. Here are some really good articles you should read in this topic:
- http://thinkingeek.com/2008/11/13/controlling-the-commands-executed-with-xp_cmdshell-on-sql-server-2005/[^]
- http://blogs.msdn.com/b/sqlsecurity/archive/2008/01/10/xp-cmdshell.aspx[^]
But if you can avoid using it.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 31-Dec-12 16:01pm    
Good points, a 5.
Happy New Year!
—SA
Zoltán Zörgő 31-Dec-12 16:28pm    
Thank you and a Happy New Year to you too!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900