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...
>
>
No comments:
Post a Comment