Viewing 15 posts - 46 through 60 (of 367 total)
Before executing procedure, what is len(@agItem)? Maybe it is truncated before the procedure.
March 20, 2013 at 5:27 pm
More than that! It not only didn't work, it also managed to offend innocent fellow :crying:
Did you noticed a smiley next to the message? But I don't know who would...
March 20, 2013 at 4:13 am
Moderator, please close this thread as nonconstructive.
I tried with mad goat method, but it turns out it did not work 🙂
March 20, 2013 at 1:38 am
First one who writes after this post will be raped by a mad goat! :w00t:
😀
March 19, 2013 at 6:57 pm
Here is a complete and tested example with signed procedure:
-- Script by Vedran Kesegic, 20.3.2013.
-- We will create a database and a procedure which calls sp_who2.
-- We will also create...
March 19, 2013 at 6:30 pm
Alternative would be to grant "VIEW DATABASE STATE" to the user (or better, db role) in each database you want that login to view the sessions.
After that, you do not...
March 18, 2013 at 10:25 am
With "with execute as ..." clause on a procedure/function/trigger you define a database user to execute under, not a server login.
Database user cannot have a server-level privilege such as viewing...
March 18, 2013 at 10:11 am
Grant Fritchey (3/18/2013)
If you can make changes to your architecture, you might want to look into partitioning the data.
You can't switch partition to a switching table that is in...
March 18, 2013 at 8:50 am
Cte in some situations with really long DT can help readability, but this is not the case here. Some folks (ab)use cte in every statement because they don't know how...
March 18, 2013 at 1:02 am
You could also do it without cte. Why employ complex technique when you can use simple one? Cte is really great for recursion and multiple use of the same subquery,...
March 17, 2013 at 6:07 pm
Please check is your query in the cache at all with this query:
-- Is my query/procedure in the cache ?
select * FROM sys.syscacheobjects
WHERE dbid<>32767 and dbid>4
and sql NOT...
March 15, 2013 at 3:55 am
Try with dm_exec_cached_plans:
SELECT
DatabaseName = db_name(st.dbid),
cp.objtype,
st.text,
qp.query_plan,
cp.usecounts,
cp.size_in_bytes,
cp.plan_handle
FROM sys.dm_exec_cached_plans cp
CROSS APPLY sys.dm_exec_sql_text (cp.plan_handle) st
CROSS APPLY sys.dm_exec_query_plan (cp.plan_handle) qp
WHERE st.text NOT LIKE '%sys.%'
--AND st.dbid = DB_ID() -- current db
AND st.text LIKE '%YourTableOrProcedureName%'
ORDER BY st.text
March 14, 2013 at 10:39 am
Only owner who created db diagrams can see his own diagrams, and db_owner/sysadmin can see all diagrams (created by any user) in the db.
Log on as sysadmin and query dbo.sysdiagrams...
March 14, 2013 at 10:31 am
If non-clustered index key columns are a, b, c, and table has clustered index key "id", one multi-column statistics will be created with the same name as index.
It will create...
March 12, 2013 at 10:42 am
1) How if at all, can you view which stats are touched during query execution?
Statistics are not used during execution. They are used in plan generation phase which happens just...
March 11, 2013 at 8:34 pm
Viewing 15 posts - 46 through 60 (of 367 total)