Prevent queries from SQL Injection attack in SQL Server 2005

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2006
Posts: 116
Reputation: bhavna_816 is an unknown quantity at this point 
Solved Threads: 0
bhavna_816 bhavna_816 is offline Offline
Junior Poster

Prevent queries from SQL Injection attack in SQL Server 2005

 
0
  #1
May 29th, 2008
I am using SQL Server 2005, I have some select and update statements in my query with WHERE clause

I want to prevent these queries from SQL injection attacks.
What are the steps and precautions to be taken for SQL Injection attacks?
Does anybody have suggestions?


Thanks in advance,
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 100
Reputation: M_K_Higa is an unknown quantity at this point 
Solved Threads: 2
M_K_Higa's Avatar
M_K_Higa M_K_Higa is offline Offline
Junior Poster

Re: Prevent queries from SQL Injection attack in SQL Server 2005

 
0
  #2
Jun 5th, 2008
Use stored procedures and pass the data you need to update as parameters.
-Mike
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 3
Reputation: TCBW is an unknown quantity at this point 
Solved Threads: 1
TCBW TCBW is offline Offline
Newbie Poster

Re: Prevent queries from SQL Injection attack in SQL Server 2005

 
0
  #3
Jun 5th, 2008
The common method is to use regular expressions against the text that will be used in the where clause. The initial poster is correct in that stored procedures and parameters will stop this, but, if you are going to execute a sting built in the stored procedure you are still susceptible to an injection attack.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the MS SQL Forum
Thread Tools Search this Thread



Tag cloud for MS SQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC