Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

Results 1 to 12 of 12
  1. #1
    Enthusiast BuHTuK is offline
    MemberRank
    Aug 2005 Join Date
    BobruyskLocation
    43Posts

    note Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    Hi guys!

    I found solution for this problem
    You need fix function fn_md5 on ACCOUNT database, modify it and replace from my code:

    Code:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    
    ALTER  FUNCTION [dbo].[fn_md5] (@data varchar(255)) 
    RETURNS CHAR(32)  AS  
    BEGIN
    	return SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @data)), 3, 32)
    END
    Press save (Execute) button and you don't need xp_md5_x64.dll

    Sorry for english I use translator



  2. #2
    Account Upgraded | Title Enabled! Daman2009 is offline
    MemberRank
    Feb 2009 Join Date
    GreenDespairLocation
    343Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    Anyone tested this???

    I would but I gave up on running SQL2005 and Vista64!
    If it does work then I will re-install vista and give it a go!

  3. #3
    Enthusiast BuHTuK is offline
    MemberRank
    Aug 2005 Join Date
    BobruyskLocation
    43Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    I tested this and it's works perfect. I currently using this feature, I do not use xp_md5_x64.dll or other extended libs

  4. #4
    Novice opium2k is offline
    MemberRank
    Apr 2007 Join Date
    3Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    Where is this file or db where do i go to look for it, in what folder and do you have what it originaly looks like so im know im doing it to the right one

    Quote Originally Posted by BuHTuK View Post
    Hi guys!

    I found solution for this problem
    You need fix function fn_md5 on ACCOUNT database, modify it and replace from my code:

    Code:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
     
    ALTER  FUNCTION [dbo].[fn_md5] (@data varchar(255)) 
    RETURNS CHAR(32)  AS  
    BEGIN
        return SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @data)), 3, 32)
    END
    Press save (Execute) button and you don't need xp_md5_x64.dll

    Sorry for english I use translator


  5. #5
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    This is a query you run on the account database to add a new function. There is no original to check as if there was we wouldn't need the new function.

    What BuHTuK means is that you should remove the xp_md5 extended procedure first (if you have installed it) because you can't have 2 functions with the same name.

  6. #6
    Apprentice krazywhiteboy is offline
    MemberRank
    Aug 2008 Join Date
    11Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    I did the test using select account.dbo.fn_md5('test')

    with mssql guide from chump on adding the crypt and xp_md5 and it came up null. Then i found this post because i am using the x64 bit mssql on windows 7. So i run the query posted above and i got the following error.

    Code:
    Msg 208, Level 16, State 6, Procedure fn_md5, Line 5
    Invalid object name 'dbo.fn_md5'.
    EDIT: nvm got it shows md5 hash now when i run query :)
    Last edited by krazywhiteboy; 27-04-10 at 01:31 AM.

  7. #7
    Apprentice Shadow373 is offline
    MemberRank
    Apr 2010 Join Date
    5Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    BuHTuK make some mistake when post the text of function.
    first time you must CREATE function.
    replace ALTER -> CREATE, then add permissions for execute to public and only after his you may test this function.
    here is code
    Code:
    use [master]
    go
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
     
    CREATE  FUNCTION [dbo].[fn_md5] (@data varchar(255)) 
    RETURNS CHAR(32)  AS  
    BEGIN
        return SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @data)), 3, 32)
    END
    go
    GRANT EXECUTE ON [dbo].[fn_md5] TO [public]
    go
    
    select [master].[dbo].[fn_md5]('test')
    --------------------------------
    098f6bcd4621d373cade4e832627b4f6
    
    (1 row(s) affected)
    all done. tested on MS SQL 2005 SP3 developer's edition.

  8. #8
    Enthusiast cristinel is offline
    MemberRank
    May 2006 Join Date
    RomaniaLocation
    25Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    i get this error when i am trying to create an account:

    Code:
    Msg 515, Level 16, State 2, Procedure cabal_tool_registerAccount, Line 10
    Cannot insert the value NULL into column 'Password', table 'ACCOUNT.dbo.cabal_auth_table'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    Msg 515, Level 16, State 2, Procedure cabal_tool_registerAccount, Line 16
    Cannot insert the value NULL into column 'UserNum', table 'ACCOUNT.dbo.cabal_charge_auth'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    
    (1 row(s) affected)
    I have used this fix because i have windows xp x64 professional and i still get errors...

  9. #9
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    Check what you did again as this works perfectly (i use it myself). Remember that the xp_md5 entry for the dll must not be present in your "master" db (extended procedures folder) and this fix only works on sql2005 not 2000.

    Also check Shadow373's post above yours to make sure you are running a "create" not and "alter" and use the query shown to test it is working (select [master].[dbo].[fn_md5]('test')). I would put it in your account db rather than master though.

  10. #10
    Enthusiast cristinel is offline
    MemberRank
    May 2006 Join Date
    RomaniaLocation
    25Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    thank you but i figured out what was wrong now i need to get a good web and to make a launcher that work :D

    ! question what is your last db version or date? for cabal server?

  11. #11
    The Dinosaur chumpywumpy is offline
    MemberRank
    Jun 2008 Join Date
    /f451/Location
    5,127Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    The dbs are kinda old at the moment, the only set is in my sig. Some new dbs will be appearing soon and i just know dealing with db upgrades is going to be really painful (probably why i have left it so long).

  12. #12
    Enthusiast razvikennedy is offline
    MemberRank
    Jun 2010 Join Date
    43Posts

    Re: Fix login problem when you use x64 system and SQL 2005 (no need xp_md5_x64.dll)

    It's not working properly on MSSQL 2014... What can I do? MSSQL 2008 not working on windows 10.



Advertisement