1.

Which of the stored procedure used for dynamic SQL is prone to attacks?(a) xp_executesql(b) executesql(c) sp_execute(d) sp_executesqlI had been asked this question during an internship interview.Enquiry is from Dynamic SQL in section Developing with SQL Server of SQL Server

Answer»

Correct ANSWER is (d) sp_executesql

The explanation is: sp_executesql executes a Transact-SQL statement or batch that can be reused many times or one that has been built dynamically. RUN time-compiled Transact-SQL STATEMENTS can expose APPLICATIONS to MALICIOUS attacks.



Discussion

No Comment Found

Related InterviewSolutions