Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SMO Scripting and SET commands

 
   Database Help (Home) -> Programming RSS
Next:  filter by form  
Author Message
Tom152

External


Since: Aug 15, 2004
Posts: 67



(Msg. 1) Posted: Wed Oct 08, 2008 7:47 pm
Post subject: SMO Scripting and SET commands
Archived from groups: microsoft>public>sqlserver>programming (more info?)

When I script tables the set statement all appear on one line with no break
between them.
SET ANSI_NULLS ONSET QUOTED_IDENTIFIER ONSET ANSI_PADDING ON

Which option or set of options do I set to get these to appear on seperate
lines with a go between them. I am using SQL2008.

Thanks
Tom

 >> Stay informed about: SMO Scripting and SET commands 
Back to top
Login to vote
Mike Devenney

External


Since: Nov 20, 2009
Posts: 1



(Msg. 2) Posted: Fri Nov 20, 2009 6:13 am
Post subject: Bummer [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It's been a year a no response, eh? I just found SMO yesterday and decided to whip something up to help me with scripting my deployments. I'm loving how easy it is to use so far but this has me stumped. If anyone stumbles across this please point us in the right direction, thanks!




To wrote:

SMO Scripting and SET commands
08-Oct-08

When I script tables the set statement all appear on one line with no break
between them.
SET ANSI_NULLS ONSET QUOTED_IDENTIFIER ONSET ANSI_PADDING ON

Which option or set of options do I set to get these to appear on seperate
lines with a go between them. I am using SQL2008.

Thanks
Tom

Previous Posts In This Thread:

On Wednesday, October 08, 2008 10:47 PM
To wrote:

SMO Scripting and SET commands
When I script tables the set statement all appear on one line with no break
between them.
SET ANSI_NULLS ONSET QUOTED_IDENTIFIER ONSET ANSI_PADDING ON

Which option or set of options do I set to get these to appear on seperate
lines with a go between them. I am using SQL2008.

Thanks
Tom

EggHeadCafe - Software Developer Portal of Choice
Handbook for Reluctant Database Administrators
http://www.eggheadcafe.com/tutorials/aspnet/8b4b1844-f3ae-41f1-8144-10...385f3a2

 >> Stay informed about: SMO Scripting and SET commands 
Back to top
Login to vote
Michael Coles

External


Since: Oct 15, 2008
Posts: 4



(Msg. 3) Posted: Fri Nov 20, 2009 12:20 pm
Post subject: Re: Bummer [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Are you scripting to a file or a string collection? IIRC SMO will add the
GO batch terminator when you script out to a file, but you're responsible
for adding your own as necessary if you're scripting to a string collection.

<Mike Devenney> wrote in message

> It's been a year a no response, eh? I just found SMO yesterday and
> decided to whip something up to help me with scripting my deployments.
> I'm loving how easy it is to use so far but this has me stumped. If
> anyone stumbles across this please point us in the right direction,
> thanks!
>
>
>
>
> To wrote:
>
> SMO Scripting and SET commands
> 08-Oct-08
>
> When I script tables the set statement all appear on one line with no
> break
> between them.
> SET ANSI_NULLS ONSET QUOTED_IDENTIFIER ONSET ANSI_PADDING ON
>
> Which option or set of options do I set to get these to appear on seperate
> lines with a go between them. I am using SQL2008.
>
> Thanks
> Tom
>
> Previous Posts In This Thread:
>
> On Wednesday, October 08, 2008 10:47 PM
> To wrote:
>
> SMO Scripting and SET commands
> When I script tables the set statement all appear on one line with no
> break
> between them.
> SET ANSI_NULLS ONSET QUOTED_IDENTIFIER ONSET ANSI_PADDING ON
>
> Which option or set of options do I set to get these to appear on seperate
> lines with a go between them. I am using SQL2008.
>
> Thanks
> Tom
>
> EggHeadCafe - Software Developer Portal of Choice
> Handbook for Reluctant Database Administrators
> http://www.eggheadcafe.com/tutorials/aspnet/8b4b1844-f3ae-41f1-8144-10...385f3a2
 >> Stay informed about: SMO Scripting and SET commands 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
case select commands - I am trying to do something like this in a sp: case when fruit='apple' then select * from orders where fruit='apple' case when fruit='orange' then select * from orders where fruit='orange' case when fruit='grape' then select * from orders where..

scripting the records - hey all, is there any easy way to create a script for the records in a table automatically without having to type in the insert statements for each record? thanks, rodchar

Scripting roles with sproc? - In SQL Server 2005, I'm creating a database locally and will upload to a production server at some point. The user roles associated to each sproc locally and on production will be the same. Is there an easy way for me to script out the roles that go..

Scripting GRANT permission to role - I'd like to GRANT execute permission across a schema to a role. What does that syntax look like? It seems you can only grant permission to an object, not a schema, and a user but not a role. Right now, I'm right clicking a sproc, manually adding role...

Double parentheses when scripting defaults - I have a monitor that compares schemas of tables and reports any changes between servers, I've noticed, there are some servers that all their default definitions have double parentheses, after trying to change it back to "normal" they come b...
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]