Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This seems far fetched to me. There are far too many benefits to SP's. SP have changed in capabilities greatly in 2005 though.He says that Microsoft is trying to eliminate Stored Procedures
Yes/No. Anything put together poorly will decrease performance. Anything put together well possibly show gains in performance if it is the write object for the taskWill Stored Procedures decrease the performance
Avoid dynamic SQL statements as much as possible. Dynamic SQL tends to be slower than static SQL, as SQL Server must generate an execution plan every time at runtime. IF and CASE statements come in handy to avoid dynamic SQL. Another major disadvantage of using dynamic SQL is that it requires users to have direct access permissions on all accessed objects, like tables and views. Generally, users are given access to the stored procedures which reference the tables, but not directly on the tables. In this case, dynamic SQL will not work. Consider the following scenario where a user named 'dSQLuser' is added to the pubs database and is granted access to a procedure named 'dSQLproc', but not on any other tables in the pubs database. The procedure dSQLproc executes a direct SELECT on titles table and that works. The second statement runs the same SELECT on titles table, using dynamic SQL and it fails with the following error:
Server: Msg 229, Level 14, State 5, Line 1
SELECT permission denied on object 'titles', database 'pubs', owner 'dbo'.
To reproduce the above problem, use the following commands:
sp_addlogin 'dSQLuser'
GO
sp_defaultdb 'dSQLuser', 'pubs'
USE pubs
GO
sp_adduser 'dSQLUser', 'dSQLUser'
GO
CREATE PROC dSQLProc
AS
BEGIN
SELECT * FROM titles WHERE title_id = 'BU1032' --This works
DECLARE @str CHAR(100)
SET @str = 'SELECT * FROM titles WHERE title_id = ''BU1032'''
EXEC (@str) --This fails
END
GO
GRANT EXEC ON dSQLProc TO dSQLuser
GO
Now login to the pubs database using the login dSQLuser and execute the procedure dSQLproc to see the problem.
Performance loss: the execution plan for a dynamic query cannot be cached.
Hard to debug.
The error management becomes more unreliable. There is no easy way to validate the dynamic code or control its effects.
Temporary tables from the main statement cannot be used, unless they are global.
If the algorithm of the main statement has many loops, calculations or slow queries, that time will add up to the time of executing the dynamic code.
Maintenance is difficult because the schema is hard coded in the dynamic code. The main statement is harder to understand than regular code because it is necessary to consider how it affects the dynamic code, without seeing it.
Security can be compromised with SQL injection.