Are the posted questions getting worse?

  • This is basically the means that I use now instead of revlogin

    N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column("l.password_hash"))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column("p.sid"))', 'nvarchar(100)')

    This works on 2008 up through 2014. I don't remember the last time I tried it on 2005 if I did or not. I have yet to test on 2016.

    I haven't had a problem with any accounts created using this method.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (4/13/2016)


    This is basically the means that I use now instead of revlogin

    N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column("l.password_hash"))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column("p.sid"))', 'nvarchar(100)')

    This works on 2008 up through 2014. I don't remember the last time I tried it on 2005 if I did or not. I have yet to test on 2016.

    I haven't had a problem with any accounts created using this method.

    Thanks, Jason. I'll play around with this when I get some free time. Always looking for better ways to do things. 😉

  • SQLRNNR (4/13/2016)


    This is basically the means that I use now instead of revlogin

    N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column("l.password_hash"))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column("p.sid"))', 'nvarchar(100)')

    This works on 2008 up through 2014. I don't remember the last time I tried it on 2005 if I did or not. I have yet to test on 2016.

    I haven't had a problem with any accounts created using this method.

    Once the light dawned in my head that you're using sys.sql_logins instead of sys.syslogins (like revlogin uses,) I got this working. Tested it by snagging one of my current SQL2012 logins, and using the create script to create it on one of the new SQL2014s, with no hitches.

    You da' man!

  • jasona.work (4/14/2016)


    SQLRNNR (4/13/2016)


    This is basically the means that I use now instead of revlogin

    N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column("l.password_hash"))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column("p.sid"))', 'nvarchar(100)')

    This works on 2008 up through 2014. I don't remember the last time I tried it on 2005 if I did or not. I have yet to test on 2016.

    I haven't had a problem with any accounts created using this method.

    Once the light dawned in my head that you're using sys.sql_logins instead of sys.syslogins (like revlogin uses,) I got this working. Tested it by snagging one of my current SQL2012 logins, and using the create script to create it on one of the new SQL2014s, with no hitches.

    You da' man!

    Actually, the real credit goes to Robert Davis http://www.sqlsoldier.com/wp/sqlserver/transferring-logins-to-a-database-mirror for bringing it to light and Wayne Sheffield for making it work better.

    And credit to you as well. You took a small snippit and ran with it until it worked.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Ummmm. Ouch?

    Or does this really matter[/url] to anyone?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin (4/14/2016)


    Ummmm. Ouch?

    Or does this really matter[/url] to anyone?

    I feel that many of these standards to certify processes are simply created to make money.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Hopefully Hugo has him sorted.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (4/14/2016)


    jasona.work (4/14/2016)


    SQLRNNR (4/13/2016)


    This is basically the means that I use now instead of revlogin

    N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column("l.password_hash"))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column("p.sid"))', 'nvarchar(100)')

    This works on 2008 up through 2014. I don't remember the last time I tried it on 2005 if I did or not. I have yet to test on 2016.

    I haven't had a problem with any accounts created using this method.

    Once the light dawned in my head that you're using sys.sql_logins instead of sys.syslogins (like revlogin uses,) I got this working. Tested it by snagging one of my current SQL2012 logins, and using the create script to create it on one of the new SQL2014s, with no hitches.

    You da' man!

    Actually, the real credit goes to Robert Davis http://www.sqlsoldier.com/wp/sqlserver/transferring-logins-to-a-database-mirror for bringing it to light and Wayne Sheffield for making it work better.

    And credit to you as well. You took a small snippit and ran with it until it worked.

    Thank you!

    In case anyone's wondering, here's what I came up with:

    select p.name

    , l.is_disabled

    , 'CREATE LOGIN ' + QUOTENAME( p.name ) + N' WITH PASSWORD = 0x' +

    CAST('' AS XML).value('xs:hexBinary(sql:column(''l.password_hash''))','nvarchar(300)') +

    N' HASHED, SID = 0x' + CAST('' AS XML).value('xs:hexBinary(sql:column(''p.sid''))', 'nvarchar(100)') + ', DEFAULT_DATABASE = [' + p.default_database_name + ']' as [Create_Login]

    from sys.server_principals as p

    left join sys.sql_logins as l

    ON ( l.name = p.name )

    WHERE p.type = 'S'

    and p.name not like '##%'

  • SQLRNNR (4/14/2016)


    Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Hopefully Hugo has him sorted.

    Yes he did. Then the OP moved on to his loop to split strings. I referred him to Jeff's article and I'm curious on where it'll go.

  • Ed Wagner (4/14/2016)


    SQLRNNR (4/14/2016)


    Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Hopefully Hugo has him sorted.

    Yes he did. Then the OP moved on to his loop to split strings. I referred him to Jeff's article and I'm curious on where it'll go.

    IMO, people that can't understand INSERT INTO...SELECT shouldn't be coding splitters in T-SQL.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (4/14/2016)


    Ed Wagner (4/14/2016)


    SQLRNNR (4/14/2016)


    Luis Cazares (4/14/2016)


    Is this guy for real?

    How is it possible that he can't work out a basic DML statement and still have a job?

    Hopefully Hugo has him sorted.

    Yes he did. Then the OP moved on to his loop to split strings. I referred him to Jeff's article and I'm curious on where it'll go.

    IMO, people that can't understand INSERT INTO...SELECT shouldn't be coding splitters in T-SQL.

    Agreed. Learn the basics of the language before using it. Then, after you've learned it, learn something new every day.

  • Well, apparently I don't write good questions to teach these people things.

    Maybe some of you should write some questions to help people learn how to write DML?

    :-P:-D:w00t::hehe:

    Seriously, looking for articles and questions, if you are so inclined.

  • Steve Jones - SSC Editor (4/14/2016)


    Well, apparently I don't write good questions to teach these people things.

    Maybe some of you should write some questions to help people learn how to write DML?

    :-P:-D:w00t::hehe:

    Seriously, looking for articles and questions, if you are so inclined.

    Something like: What is the problem with the following query?

    select * from

    (delete

    (update (insert into

    where

    select 1/0 where 4 = 5)

    )

    )

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin (4/14/2016)


    Steve Jones - SSC Editor (4/14/2016)


    Well, apparently I don't write good questions to teach these people things.

    Maybe some of you should write some questions to help people learn how to write DML?

    :-P:-D:w00t::hehe:

    Seriously, looking for articles and questions, if you are so inclined.

    Something like: What is the problem with the following query?

    select * from

    (delete

    (update (insert into

    where

    select 1/0 where 4 = 5)

    )

    )

    That made my head hurt.

Viewing 15 posts - 53,506 through 53,520 (of 66,712 total)

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