Forum Replies Created

Viewing 15 posts - 91 through 105 (of 497 total)

  • RE: How to automate database scripting

    jared-709193 (10/19/2011)


    I still think using sqlpubwiz is the easiest way to do this. It works on 2008R2 (as I've just tested it) and I would run it in a batch...

  • RE: Scripting objects in powershell

    Found a workaround: if you use "IncludeIfNotExists" it would script the views using dynamic sql:

    SL SQLSERVER:\SQL\"(local)"\DEFAULT\Databases\"MyDb"\Views

    $so = new-object Microsoft.SqlServer.Management.Smo.ScriptingOptions

    $so.IncludeIfNotExists = 1

    dir | %{$_.Script($so) + 'GO' | Out-File "C:\Temp\04_Views.sql" -Append}

    SET ANSI_NULLS...

  • RE: How to automate database scripting

    Roust_m (10/18/2011)


    anthony.green (10/18/2011)


    i use powershell to script the object definitions out to a .sql file on a nightly basis so that developers dont need any permissions on the live db.

    couple...

  • RE: How to automate database scripting

    jared-709193 (10/18/2011)


    Let me add a link to Pinal Dave for Database Publishing Wizard. If you scroll down, you will see some comments on 2008 and that this installs with...

  • RE: How to automate database scripting

    jared-709193 (10/18/2011)


    Roust_m (10/18/2011)


    jared-709193 (10/18/2011)


    Easy enough! 🙂 Use the wizard to script what you want, or script the entire database and then remove what you don't need. You may want to...

  • RE: How to automate database scripting

    anthony.green (10/18/2011)


    i use powershell to script the object definitions out to a .sql file on a nightly basis so that developers dont need any permissions on the live db.

    couple of...

  • RE: How to automate database scripting

    jared-709193 (10/18/2011)


    Easy enough! 🙂 Use the wizard to script what you want, or script the entire database and then remove what you don't need. You may want to add in...

  • RE: How to automate database scripting

    Dev @ +91 973 913 6683 (10/18/2011)


    The failure may or may not happen. If it does happen, I will use scripts and re-initialise the data.

    Will you not require having...

  • RE: How to automate database scripting

    jared-709193 (10/17/2011)


    Roust_m (10/16/2011)


    I don't want to backup them, so to avoid any performance impact, so I want to script them out and in case of any failure restore the databases...

  • RE: How to automate database scripting

    Dev @ +91 973 913 6683 (10/17/2011)


    The requirement is:

    I want to script them out and in case of any failure restore the databases from the script and then re-initialise the...

  • RE: How to automate database scripting

    MysteryJimbo (10/17/2011)


    Dev @ +91 973 913 6683 (10/17/2011)


    I don't want to backup them, so to avoid any performance impact,

    If it's just object definitions, scripting make sense else it...

  • RE: How to automate database scripting

    Dev @ +91 973 913 6683 (10/17/2011)


    I don't want to backup them, so to avoid any performance impact,

    If it's just object definitions, scripting make sense else it (script...

  • RE: How to automate database scripting

    Yes, I know, but I need to automate it and run it from an sql job, not manually.

  • RE: Replication filters and data on subscriber

    Ok, found it out: yes it would remove the record from the subscriber

  • RE: How to turn off the checking if the column exists

    GilaMonster (9/21/2011)


    Untested, but I think this is close at least

    EXEC sp_MSforeachdb N'DECLARE @s-2 VARCHAR(200);

    USE ?;

    IF ''?'' LIKE ''MyDb__''

    BEGIN

    IF EXISTS (SELECT * FROM sys.columns WHERE name = ''PriceListID'' and OBJECT_NAME(object_id) =...

Viewing 15 posts - 91 through 105 (of 497 total)