Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Monday, March 26, 2012

Script to find out what Edition of SQL Server is installed

Does anyone have a quick script or method to verify the edition that is inst
alledHi,
Execute the below statement from Query Analyzer,
Select @.@.version
Thanks
Hari
MCDBA
"Glenn Wilson" <anonymous@.discussions.microsoft.com> wrote in message
news:A7DB397B-B431-47A8-8B43-7598EC5140BB@.microsoft.com...
> Does anyone have a quick script or method to verify the edition that is
installed|||http://www.aspfaq.com/2160
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Glenn Wilson" <anonymous@.discussions.microsoft.com> wrote in message
news:A7DB397B-B431-47A8-8B43-7598EC5140BB@.microsoft.com...
> Does anyone have a quick script or method to verify the edition that is
installed|||Found it, FYI
SELECT SERVERPROPERTY('productversion'),
SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')

Script to find out what Edition of SQL Server is installed

Does anyone have a quick script or method to verify the edition that is installedHi,
Execute the below statement from Query Analyzer,
Select @.@.version
Thanks
Hari
MCDBA
"Glenn Wilson" <anonymous@.discussions.microsoft.com> wrote in message
news:A7DB397B-B431-47A8-8B43-7598EC5140BB@.microsoft.com...
> Does anyone have a quick script or method to verify the edition that is
installed|||http://www.aspfaq.com/2160
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Glenn Wilson" <anonymous@.discussions.microsoft.com> wrote in message
news:A7DB397B-B431-47A8-8B43-7598EC5140BB@.microsoft.com...
> Does anyone have a quick script or method to verify the edition that is
installed|||Found it, FY
SELECT SERVERPROPERTY('productversion')
SERVERPROPERTY ('productlevel')
SERVERPROPERTY ('edition'

Tuesday, March 20, 2012

Script out "Trigger rules"

When I choose the tables, generatel SQL script. it insist me to generate the
"create table" script also.
Any Simple method which i can script trigger rule (for all tables) only ?
ThxIf I understand your question...
In the Enterprise manager, goto the formatting tab and uncheck Generate Crea
te and Drop for the Objects.
Then on the Options tab check Triggers.
That should gen just the Trigger scripts.
Matt Barbour
Technology Specialist – Communications Sector.
mbarbour@.microsoft.com
W: 469-775-6206
C: 972-746-1278
--Original Message--
From: Agnes
Posted At: Friday, October 28, 2005 10:32 AM
Posted To: microsoft.public.sqlserver.programming
Conversation: Script out "Trigger rules"
Subject: Script out "Trigger rules"
When I choose the tables, generatel SQL script. it insist me to generate the
"create table" script also.
Any Simple method which i can script trigger rule (for all tables) only ?
Thx|||Yes, I try that,It will generate "CREATE TABLE...." SCRIPT together ,
IF I unclick "create table script", and tick "Trigger script" only . Nothing
is generated.
"Matt Barbour" <mestolphies@.hotmail.com> glsD:uTc8cd92FHA.3188@.TK2MSFTNGP12.phx.g
bl...
> If I understand your question...
> In the Enterprise manager, goto the formatting tab and uncheck Generate
> Create and Drop for the Objects.
> Then on the Options tab check Triggers.
> That should gen just the Trigger scripts.
> Matt Barbour
> Technology Specialist 'Communications Sector.
> mbarbour@.microsoft.com
> W: 469-775-6206
> C: 972-746-1278
> --Original Message--
> From: Agnes
> Posted At: Friday, October 28, 2005 10:32 AM
> Posted To: microsoft.public.sqlserver.programming
> Conversation: Script out "Trigger rules"
> Subject: Script out "Trigger rules"
>
> When I choose the tables, generatel SQL script. it insist me to generate
> the
> "create table" script also.
> Any Simple method which i can script trigger rule (for all tables) only ?
> Thx|||Interesting.. never noticed that before.
Is this something you are going to do more then once?
If not, just do the Create flag + the Trigger flag and prune off all the Cre
ate table's, they are up front prior to the first trigger command.
--Original Message--
From: Agnes
Posted At: Friday, October 28, 2005 10:57 AM
Posted To: microsoft.public.sqlserver.programming
Conversation: Script out "Trigger rules"
Subject: Re: Script out "Trigger rules"
Yes, I try that,It will generate "CREATE TABLE...." SCRIPT together ,
IF I unclick "create table script", and tick "Trigger script" only . Nothing
is generated.
"Matt Barbour" <mestolphies@.hotmail.com> glsD:uTc8cd92FHA.3188@.TK2MSFTNGP12.phx.gbl...[colo
r=darkred]
> If I understand your question...
> In the Enterprise manager, goto the formatting tab and uncheck Generate
> Create and Drop for the Objects.
> Then on the Options tab check Triggers.
> That should gen just the Trigger scripts.
> - Matt.
> --Original Message--
> From: Agnes
> Posted At: Friday, October 28, 2005 10:32 AM
> Posted To: microsoft.public.sqlserver.programming
> Conversation: Script out "Trigger rules"
> Subject: Script out "Trigger rules"
>
> When I choose the tables, generatel SQL script. it insist me to generate
> the
> "create table" script also.
> Any Simple method which i can script trigger rule (for all tables) only ?
> Thx[/color]|||Are you perhaps still trying to temporarily disable triggers? Read the
answers to your previous posts.
ML|||Agnes,
You may wish to try to script just the trigger with
sp_helptext tr_mytrigger
HTH
JeffP...
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%23royOT92FHA.2800@.TK2MSFTNGP10.phx.gbl...
> When I choose the tables, generatel SQL script. it insist me to generate t
he
> "create table" script also.
> Any Simple method which i can script trigger rule (for all tables) only ?
> Thx
>
>

Script method parameters

Hi.
Does anyone have details of the parameters that can be provided to the
Script method? SQL Books online lists some of the ScriptType options, but it
is an incomplete list; I have been handed a legacy script that uses
.script(333,<filename> ), where 33 is not listed in Books online.
If someone had a complete list of options for ScriptType and Script2Type, I
would be very grateful.
Cheers,
NeilYou can just add up the values of separate parameters to the script method.
So 33 = 1 + 32 = SQLDMOScript_DatabasePermissions and SQLDMOScript_Drops.
Jacco Schalkwijk
SQL Server MVP
"NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
news:FABE2617-3F56-4DD9-A716-CC73791FAA8F@.microsoft.com...
> Hi.
> Does anyone have details of the parameters that can be provided to the
> Script method? SQL Books online lists some of the ScriptType options, but
> it
> is an incomplete list; I have been handed a legacy script that uses
> .script(333,<filename> ), where 33 is not listed in Books online.
> If someone had a complete list of options for ScriptType and Script2Type,
> I
> would be very grateful.
> Cheers,
> Neil|||Thanks Jacco.
However, the number I have seen used is 333 (apologise for the misleading 33
typo). I cannot see any combination of the options listed in Books Online
making 333 by simple addition, which leads back to the list in Books Online
being incomplete.
What I am attempting to do is reproduce in a script the results of selecting
a database, choosing Generate Script... in Enterprise Manager, selecting all
options from the General tab, not touching the Formatting tab, and selecting
all Table Scripting options from the Options tab.
I am sort of hoping that any of the choices you can make in the GUI can be
replicated in a stored procedure, but this may not in fact be the case..
Cheers,
Neil
"Jacco Schalkwijk" wrote:

> You can just add up the values of separate parameters to the script method
.
> So 33 = 1 + 32 = SQLDMOScript_DatabasePermissions and SQLDMOScript_Drops.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
> news:FABE2617-3F56-4DD9-A716-CC73791FAA8F@.microsoft.com...
>
>|||Hi Neil,
I think that the bits (in the bytes that make up the number) that are not in
the list are set to 1 by default by Enterprise Manager, but are ignored. 333
breaks down to 256 + 64 + 8 + 4 + 1. 256 and 8 do not occur in the list, so
they are ignored, and 333 is effectively 69 ( = 64 + 4 + 1). You can test
this out by calling the script method with both 333 and 69 and see if they
produce the same results. I'll see if I can get confirmation about this
theory from Microsoft.
Jacco Schalkwijk
SQL Server MVP
"NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
news:70364886-5200-46D8-9D4F-95BDCA18C472@.microsoft.com...
> Thanks Jacco.
> However, the number I have seen used is 333 (apologise for the misleading
> 33
> typo). I cannot see any combination of the options listed in Books Online
> making 333 by simple addition, which leads back to the list in Books
> Online
> being incomplete.
> What I am attempting to do is reproduce in a script the results of
> selecting
> a database, choosing Generate Script... in Enterprise Manager, selecting
> all
> options from the General tab, not touching the Formatting tab, and
> selecting
> all Table Scripting options from the Options tab.
> I am sort of hoping that any of the choices you can make in the GUI can be
> replicated in a stored procedure, but this may not in fact be the case..
> Cheers,
> Neil
> "Jacco Schalkwijk" wrote:
>|||Thanks again Jacco. I'll give this a shot.
If anyone weer to find out the exact parameters required to match the
options I describe below, that'd be even better..
"Jacco Schalkwijk" wrote:

> Hi Neil,
> I think that the bits (in the bytes that make up the number) that are not
in
> the list are set to 1 by default by Enterprise Manager, but are ignored. 3
33
> breaks down to 256 + 64 + 8 + 4 + 1. 256 and 8 do not occur in the list, s
o
> they are ignored, and 333 is effectively 69 ( = 64 + 4 + 1). You can test
> this out by calling the script method with both 333 and 69 and see if they
> produce the same results. I'll see if I can get confirmation about this
> theory from Microsoft.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
> news:70364886-5200-46D8-9D4F-95BDCA18C472@.microsoft.com...
>
>|||Jacco,
Just gave it a shot with 69 instead of 333, and the ersults are different.
One of the immediately noticeable differences is that with 333 as the value
for ScriptType, the results of the script method are appended to the target
file rather than replacing the target with a new one. This is not listed as
an option in Books Online.
Thanks for the explanation on deriving a single number from several
parameters. It makes it look even more likely that there are some options
missing from the help, since there is no 8, no 16, and nothing between 64 an
d
4096. The entry for 73736 also states that it is a sum of three others that
are not referenced in the Help (in this case 65536+8192+8).
In fact, I have just run the query again using 333-8, and it has appended
instead of replacing. It looks like 256 is the parameter to introduce this
functionality.
Any idea, then, who would I go to to obtain a complete list of these options
?
Cheers
Neil
"Jacco Schalkwijk" wrote:

> Hi Neil,
> I think that the bits (in the bytes that make up the number) that are not
in
> the list are set to 1 by default by Enterprise Manager, but are ignored. 3
33
> breaks down to 256 + 64 + 8 + 4 + 1. 256 and 8 do not occur in the list, s
o
> they are ignored, and 333 is effectively 69 ( = 64 + 4 + 1). You can test
> this out by calling the script method with both 333 and 69 and see if they
> produce the same results. I'll see if I can get confirmation about this
> theory from Microsoft.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
> news:70364886-5200-46D8-9D4F-95BDCA18C472@.microsoft.com...
>
>|||Hi Neil,
I just did another trawl through BOL, and the values that we didn't find
earlier are actually documented under the Script Method (Table Object)
topic.
256 = SQLDMOScript_AppendToFile
8 = SQLDMOScript_ClusteredIndexes
and
532676608 = SQLDMOScript_DRI_All , which is probably the one you are looking
for.
Jacco Schalkwijk
SQL Server MVP
"NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
news:58357EB4-6AD7-4A7F-9935-B8C1CE27F3EE@.microsoft.com...
> Jacco,
> Just gave it a shot with 69 instead of 333, and the ersults are different.
> One of the immediately noticeable differences is that with 333 as the
> value
> for ScriptType, the results of the script method are appended to the
> target
> file rather than replacing the target with a new one. This is not listed
> as
> an option in Books Online.
> Thanks for the explanation on deriving a single number from several
> parameters. It makes it look even more likely that there are some options
> missing from the help, since there is no 8, no 16, and nothing between 64
> and
> 4096. The entry for 73736 also states that it is a sum of three others
> that
> are not referenced in the Help (in this case 65536+8192+8).
> In fact, I have just run the query again using 333-8, and it has appended
> instead of replacing. It looks like 256 is the parameter to introduce this
> functionality.
> Any idea, then, who would I go to to obtain a complete list of these
> options?
> Cheers
> Neil
> "Jacco Schalkwijk" wrote:
>|||Thanks Jacco. I had found a section under ScriptType that gave a few more,
but still didn't have 256 or 512.
There are still a few missing, eg 2048, and there is none specified to copy
rules across, but this certainly helps a lot.
Cheers,
Neil
"Jacco Schalkwijk" wrote:

> Hi Neil,
> I just did another trawl through BOL, and the values that we didn't find
> earlier are actually documented under the Script Method (Table Object)
> topic.
> 256 = SQLDMOScript_AppendToFile
> 8 = SQLDMOScript_ClusteredIndexes
> and
> 532676608 = SQLDMOScript_DRI_All , which is probably the one you are looki
ng
> for.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "NeilDJones" <NeilDJones@.discussions.microsoft.com> wrote in message
> news:58357EB4-6AD7-4A7F-9935-B8C1CE27F3EE@.microsoft.com...
>
>

Saturday, February 25, 2012

Scorecard A SQL

I am looking for a method to measure SQL performance. For example:
1. execute a SQL first
2. immediately I issue a sql command command which will capture the CPU, IO
and memory used by the SQL commnad which I issued in step 1.
See Profiler in BOL.
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.
|||Answered in .programming -- please refrain from multi-posting.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.

Scorecard A SQL

I am looking for a method to measure SQL performance. For example:
1. execute a SQL first
2. immediately I issue a sql command command which will capture the CPU, IO
and memory used by the SQL commnad which I issued in step 1.See Profiler in BOL.
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.|||Answered in .programming -- please refrain from multi-posting.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.

Scorecard A SQL

I am looking for a method to measure SQL performance. For example:
1. execute a SQL first
2. immediately I issue a sql command command which will capture the CPU, IO
and memory used by the SQL commnad which I issued in step 1.See Profiler in BOL.
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.|||Answered in .programming -- please refrain from multi-posting.
--
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Josephine" <Josephine@.discussions.microsoft.com> wrote in message
news:946E50BF-FA5D-43F6-8D1B-535366F1B1F5@.microsoft.com...
> I am looking for a method to measure SQL performance. For example:
> 1. execute a SQL first
> 2. immediately I issue a sql command command which will capture the CPU,
IO
> and memory used by the SQL commnad which I issued in step 1.