Settings for "Script Table As..."

  • It used to be that when you right clicked on a table to script it, one of the menu options on the popup menu was to set "Scripting Options". I've done a quick check in BOL and Google and I can't find where the moved the "Scripting Options" menu to. And, no, I'm not talking about the scripting options in the Generate Scripts Wizard.

    Where did they move the "Scripting Options" forwhen you right click on an object in the SSMS Object Browser to?

    Thanks folks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Look under tools-> options->SQL Server Object Explorer->Scripting

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • Man, thanks for the very quick reply, Robert. I was in a bit of a crunch and just couldn't bring myself to use the "urgent" word. 😛 Thank you very much for the help.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks again for the previous tip. Similar problem, though... there doesn't appear to be an option to turn off SET ANSI_NULLS ON or SET QUOTED_IDENTIFIER ON parts of the script. Is there anyway to get rid of those or am I stuck with them?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Unfortunately I do not see anywhere to stop those table option from being scripted out.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • there doesn't appear to be an option to turn off SET ANSI_NULLS ON or SET QUOTED_IDENTIFIER ON parts of the script

    They are functional parts of the definition of objects, which I guess is why you can't just turn them off. They aren't just client/database/server level connection settings, each object holds the setting:

    USE tempdb

    go

    SET ANSI_NULLS ON

    CREATE TABLE test

    (

    col1 int

    )

    SET ANSI_NULLS OFF

    CREATE TABLE test1(

    col1 int

    )

    SELECT OBJECTPROPERTY(OBJECT_ID('test'),'IsAnsiNullsOn')

    SELECT OBJECTPROPERTY(OBJECT_ID('test1'),'IsAnsiNullsOn')

  • Robert klimes (3/24/2011)


    Unfortunately I do not see anywhere to stop those table option from being scripted out.

    I didn't either and I've been looking! 😛 Thanks for your very quick help, Robert.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • HowardW (3/24/2011)


    there doesn't appear to be an option to turn off SET ANSI_NULLS ON or SET QUOTED_IDENTIFIER ON parts of the script

    They are functional parts of the definition of objects, which I guess is why you can't just turn them off. They aren't just client/database/server level connection settings, each object holds the setting:

    USE tempdb

    go

    SET ANSI_NULLS ON

    CREATE TABLE test

    (

    col1 int

    )

    SET ANSI_NULLS OFF

    CREATE TABLE test1(

    col1 int

    )

    SELECT OBJECTPROPERTY(OBJECT_ID('test'),'IsAnsiNullsOn')

    SELECT OBJECTPROPERTY(OBJECT_ID('test1'),'IsAnsiNullsOn')

    Ahhhh... of course. Not sure why I didn't think of that. Thanks Howard.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply