Menu

SQL Server 2008

2008-12-17
2013-03-22
  • Frank Rotchford

    Frank Rotchford - 2008-12-17

    Directory of C:\ScriptDB\SS2008-Mods

    12/17/2008  09:58    <DIR>          .
    12/17/2008  09:58    <DIR>          ..
    04/21/2007  08:55            38,756 ScriptDBv00.cs
    12/16/2008  19:36            39,782 ScriptDBv01.cs
                   2 File(s)         78,538 bytes
                   2 Dir(s)  22,435,758,080 bytes free

    C:\ScriptDB\SS2008-Mods>diff ScriptDBv00.cs ScriptDBv01.cs
    154c154
    < using Microsoft.SqlServer.Management.Smo.RegisteredServers;
    ---
    > using Microsoft.SqlServer.Management.Sdk.Sfc;
    276a277,281
    >          else if (srvrVersion.StartsWith("10."))
    >          {
    >              scrp.Options.TargetServerVersion = SqlServerVersion.Version100;
    >              scrp.Options.Permissions = true;
    >          }
    351a357,378
    >             if (srvrVersion.StartsWith("10."))
    >             {
    >                 string connect = "Data Source=" + argServer
    >                                + ";Initial Catalog=" + argDatabase;
    >
    >                 if (args.Length == 5)
    >                 {
    >                     connect += ";Trusted_Connection=false"
    >                              + ";User ID=" + args[3]
    >                              + ";Password=" + args[4];
    >                 }
    >                 else
    >                 {
    >                     connect += ";Integrated Security=SSPI";
    >                 }
    >
    >                 string command = "EXEC sp_helprotect"
    >                                + "  @name = '" + tbl.Name + "'"
    >                                + ", @grantorname = '" + tbl.Schema + "'";
    >
    >                 ScriptPermissions(connect, command, filename);
    >             }

    C:\ScriptDB\SS2008-Mods>

    NOTE: All references path to SQL Server 2008
    (Name)  Microsoft.SqlServer.Management.Sdk.Sfc
    Path    C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Management.Sdk.Sfc.dll
    Runtime Version v2.0.50727
    Version 10.0.0.0

    You will need to install SharedManagementObjectsX86.msi or SharedManagementObjectsX64.msi
    available at:
    Microsoft SQL Server 2008 Feature Pack, August 2008
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

    Claims to be backward compatable to SS2000, SS2005, SS2008

    Tested ScriptDB succesfully with local connect to both SS2005 and SS2008 using x86 for 2005 and x64 for 2008

    NOTE: There are other Versions of 10. floating arround which have been reported to fail when other Classes within SMO are used.

    Cheers,
    Frank

     
    • Richard Sutherland

      Many thanks, Frank, I appreciate you taking the time to test and send this in!

      Richard

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.