moving passwords

  • does anyone have a script that extracts login passwords (encrypted naturally) so they can be ported to a disaster recovery server?

    SQL 2012 Standard VPS Windows 2012 Server Standard

  • I'll check it out. Looks like taking the password out of the system table then useing the

    @encryptopt = 'skip_encryption' for sp_addlogin works.

    SQL 2012 Standard VPS Windows 2012 Server Standard

  • I know about

    DTS,

    KB246133,

    sp_addlogin

    @encryptopt = 'skip_encryption'

    But none of it is working

    DTS - service is running under the wrong account - cant change it

    @encryptopt = 'skip_encryption' - not working not sure why. Possibly because of different service packs? SRC is sp3 and DST is sp4. Does anyone know if the encyption of a password under sp3 is forward compatible with sp4?

    SQL 2012 Standard VPS Windows 2012 Server Standard

  • okay here is how i made this work. Im not sure why it workds this way but maybe someone can tell me.

    Why convert the password to varbinary while its being asigned to the sysname datatype? What's going on here? BOL says:

    nvarchar = "Variable-length Unicode data with a maximum length of 4,000 characters. sysname is a system-supplied user-defined data type that is functionally equivalent to nvarchar(128) and is used to reference database object names." Does that mean one MUST use sysname datatype to update system tables? Why?

    USE master

    go

    DECLARE

    @binpwd sysname

    BEGIN

    SET @binpwd = CONVERT(varbinary(256),0x0100D560FA0C666854DB2A02E0E357333983CA2282DC46A3734AD459E70152FBC74YEDA29D872ED0290B3C2BA7DE)

    EXEC sp_addlogin 'some_sqluser',

    @passwd = @binpwd,

    @defdb = 'some_db',

    @deflanguage = 'us_english',

    @sid = @binsid,

    @encryptopt = 'skip_encryption'

    END

    SQL 2012 Standard VPS Windows 2012 Server Standard

  • Is there a way to move the database permission also ?

Viewing 6 posts - 1 through 5 (of 5 total)

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