Pages

Tuesday 24 November 2015

SQL SERVER ( STORED PROCEDURES ) REAL TIME INTERVIEW QUESTIONS AND ANSWERS

1. How can you debug a stored procedure?
2. What are temporary store procedures, how to create them?
3. What is the need of the store procedure?
4. What is Estimated execution plan and Actual execution plan?
5. I wrote sp but it is taking 15 min to executive how do you do sp optimization?
6. Well sometime sp rename db may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?
7. What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
8. What is an execution plan? When would you use it? How would you view the execution plan?
9. What is sp_configure commands adn set commands?
10. What does it mean to have quoted_identifier on ? What are the implications of having it off?
11. Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?
12. What is the advantage of SET NOCOUNT ON?
13. What is Stored Procedure?
14. What command do we use to rename a db, atable and a column?
15. What is recursive stored procedure?
16. How exception can be handled in SQL Server Programming?
17. What are the differences between Stored Procedure and the dynamic SQL ?
18. What is the use of SET NOCOUNT ON/OFF statement?
19. Which SQL Server table is used to hold the Stored Procedure scripts?
20. What is the use of @@SPID?
21. What is the command used to Recompile the stored procedure at run time?
22. Which command is used for user defined error messages?
23. What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
24. What is T-SQL equivalent of IIF (immediate if/ternary operator) function of other programming languages?
25. How to run an SQL script file that is located on the disk, using T-SQL?
26. How to get the complete erroe message from t-SQL while erroe handling?
27. How to pass a table name, column name ets. to the stored procedure so that i can dynamically select from a table?
28. Error inside a stored procedure is not being raised to my front-end applications using SDO. But i get the error when i run the procedure from Query Analyzer?
29. How to suppress error messages i stored procedures/triggers etc. using T-SQL?
30. How to save the output of a query/stored procedure to a text file using t-SQL?
31. Is there a way to find out when a stored procedure was last upsdated?
32. What is an advantage to using a stored procedure as opposed to passing an SQL query from an application?
33. What are the different types of Storage Procedure?
34. How do i mark the stored procedure to automatic execution?
35. How can you optimize a stored procedure?
36. How will know whether the SQL Statements are executed?
37. Why one should not prefix user stored procedures with sp_?
38. What can cause a stored procedure execution plan to become invalidated and/or fall out of cache?
39. When do one need to recomplile stored procedure?
40. SQL Server provides how many ways to recompile a stored procedure?
41. How to find out which stored procedure is recompiling? How to stop stored procedures from recompiling?
42. I have two stored procedures SP1 and SP2 as given below. How the transaction works, whether SP2 transaction succeeds or fails?
43. How will you handle Errors in SQL Stored Procedure?
44. I have a stored procedure like
      commit tran
      create table a()
      insert into table b
      ------
      ------
      rollback tran
     What will be the result? Is table created? data will be inserted in table b?
45. What do you do when one procedure is blocking the other?
46. How you will return XML from stored procedure?
47. Difference between view and stored procedure?
48. sp_configure commands?
49. What is the nesting limit of SQL Server stored procedure?
50. In how many ways you can recieve information fro stored procedure?
51. List few advantages of stored procedure?
52. What is the use of shell commands? xp_cmdshell?
53. What is Raise error?
54. What are the steps you will take to improve performance of a poor performing query?
55. sp_who?
56. Have you worked on Dynamic SQL? How will you handled "(Double Quotes)" in Dynamic SQL?
57. How to call a COM dll from SQL Server 2000?
58. You have a SP names YourSP and have the a Select Statement inside the SP. You also have a user named YourUser. What permissions you will give him for accessing the SP.?
59. Where does system store procedures located?
60. What happens If i create a procedure with SP_ ?



No comments:

Post a Comment