Viewing 15 posts - 1 through 15 (of 19 total)
the DMV repository gets wiped on service restart, so you'd only see objects that had been touched in current session, hence I suggest you don't rely on sys.dm_exec_procedure_stats (or any...
June 15, 2012 at 6:48 am
extras for the list ...
1. dependency list. before SQL2008 the sysdepends was incomplete but sys.sql_expression_dependencies should be ok. anyway, when you create that DEV environment try a simple SSMS script...
June 15, 2012 at 1:23 am
for more info ..
-- #1 long numbers (Carlo doesn't like for Excel)
CREATE SEQUENCE SSC_ROCKS;
SELECT N0 = (NEXT VALUE FOR SSC_ROCKS); -- -9223372036854775808
SELECT N1 = (NEXT...
April 18, 2012 at 1:33 am
small beer, but
for "Employees probably know more about each other, and problem recognize a larger percentage of the company."
read
"Employees probably know more about each other, and probably recognize...
January 5, 2012 at 10:05 am
Monday's SSC email features another script on index defragmentation (certainly a worthy topic for community understanding and action), so now we have several contenders [my pref order!]
January 3, 2012 at 5:26 am
you should realise that name alone is insufficient (there are many roses!), and you should understand significance of object_id
if you _need_ to discover the parent object you should execute this...
December 30, 2011 at 11:12 am
Steve, Hi
I agree that your INSERT statements will populate based on your SELECT predicates, and [unless you have done SET NOCOUNT ON] you should get the "n-rows affected" responses to...
December 20, 2011 at 4:12 am
Correct - tables, triggers, sprocs etc should be solid objects. IMHO it is bad practice to create new objects by existing objects (i.e. dynamic DDL).
but in any case, you don't...
December 15, 2011 at 6:28 am
the trigger (e.g. tr_1) relates to one parent table (dbo.mytablename). If you have 10 tables you would need 10 triggers, and each could be hardcoded to "know" about their parent...
December 15, 2011 at 2:50 am
I think your attempt to open the connection is failing because you have single quotes round the database name ("blah Initial Catalog='DBA'") and you simply swallow the error ("On Error...
December 15, 2011 at 2:29 am
the standard SQL error messages are held in master db, so you can execute this
select *
from master..sysmessages
where error in (18053,17066)
and msglangid=1033-- English (substitute yours or comment this whole line)
order...
December 15, 2011 at 2:06 am
I recommend that people look at this "industry standard" set of scripts (free download)
http://ola.hallengren.com/Documentation.html#IndexOptimize
the basics are that rebuild/reorg will happen appropriate to degree of fragmentation
- once...
November 11, 2011 at 8:23 am
herewith the code that I use FYI
/* [drop_schemas.sql]
PURPOSE
drop redundant schemas (i.e. unused, and legacy from way prev SQL behaved)
HISTORY
20101110 dbakercreated
USAGE
sqlcmd -S MLON11U11021A\ULNCSSCN01 -d RMM_GlobalReport -i drop_schemas.sql
*/
-- USE [RMM_GlobalReport]
GO
DECLARE@SchNamesysname
,@sqlvarchar(999)
DECLARE...
November 11, 2011 at 2:38 am
Most people would shun having application-level passwords within a table (bad, bad, bad). Once a client app has succeeded in connecting to SQL (whether as SQL login or Windows-integrated login),...
November 11, 2011 at 2:35 am
@cfradenburg
thanks for your reply, and I apologise for my last line which was out of order
- perhaps Q just hit my funny-bone badly !
October 26, 2011 at 7:21 am
Viewing 15 posts - 1 through 15 (of 19 total)