May 5, 2014 at 11:04 pm
Comments posted to this topic are about the item Context Is Everything - Check Your Settings
May 5, 2014 at 11:06 pm
Thank you for this William, very useful!
😎
May 6, 2014 at 5:22 am
Hi,
I can't seem to find the
"
There is a script attached to this article"
Regards
May 6, 2014 at 5:54 am
The attachment is at the very bottom of the article. It is called Settings.sql
May 6, 2014 at 6:16 am
Nice article, but you just made every support call I handle twice as long. Every user that sees this will be adding SQL DBA to their resume and business card. I can see it now:
SCENARIO: I am called to discuss sudden performance problem on an ordinarily behaving server.
USER: I did some troubleshooting of my own and I am concerned with this thing called 'COLLATION'. I read online that 'EBCDIC' is faster.... When can we make that change?'
SQL DBA: <groan>
May 6, 2014 at 10:23 am
I can only run this script from master else I get the following error.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "objects.schema_id" could not be bound.
How do I collect Database Properties from a specific database?
I am guessing I need to edit
insert into @s-2 select 'DatabaseProperty', 'IsAnsiNullDefault', cast(DATABASEPROPERTYEX(db_name(), 'IsAnsiNullDefault') as varchar(300)), '1', 1, 0;
to this
insert into @s-2 select 'DatabasePropertyTargetDB', 'IsAnsiNullDefault', cast(DATABASEPROPERTYEX('TargetDB', 'IsAnsiNullDefault') as varchar(300)), '1', 1, 0;
and repeat this for every database I wish to monitor? That's fine as I don't have many databases to watch. Still a very useful script.
Thanks!
May 6, 2014 at 12:39 pm
facemann (5/6/2014)
I can only run this script from master else I get the following error.Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "objects.schema_id" could not be bound.
I wrote the script for sqlserver 2008r2 but you may replace the DROP PROCEDURE statement at the top or adapt it for other versions.
How do I collect Database Properties from a specific database?
I am guessing I need to edit
insert into @s-2 select 'DatabaseProperty', 'IsAnsiNullDefault', cast(DATABASEPROPERTYEX(db_name(), 'IsAnsiNullDefault') as varchar(300)), '1', 1, 0;
to this
insert into @s-2 select 'DatabasePropertyTargetDB', 'IsAnsiNullDefault', cast(DATABASEPROPERTYEX('TargetDB', 'IsAnsiNullDefault') as varchar(300)), '1', 1, 0;
and repeat this for every database I wish to monitor? That's fine as I don't have many databases to watch. Still a very useful script.
Thanks!
My objective was to create a custom version for each database project I support since each database may have different requirements. The db_name() function will get the current setting for the database in which the procedure is created so no edit of that is necessary. I think there is an MsForEach proc that will iterate through all databases but I'm no expert on using that.
May 6, 2014 at 1:37 pm
Got it. Thanks Bill. 🙂
May 7, 2015 at 10:15 am
Thanks, Bill, definitely food for thought.
-----
[font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply