Password Validation failed with osql on 2005 Express with sa user

  • I get the following when trying to run a script from a command line to create a database that's been working on sql server 2000:

    C:\>osql -n -S <servername> -U sa -P <password> -i .\script.sql

    Msg 15118, Level 16, State 1, Server SFORTNER-D810\ELANTOOLS, Line 1

    Password validation failed. The password does not meet Windows policy requirements because it is not complex enough.

    The odd thing is that the password is 13 characters, and contains more than 3 numbers, and some non-alphanumeric characters not in the list of $, !, %, ^ that's recommended on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmgmt/security/strong_password_enforcement_and_passfilt_dll.asp.  I tried changing the sa password to use '%' instead of the other non-alphanumeric ones, but I get the same error when trying to run the script.

    I'm using SQL Server 2005 Express SP1, and installed it via command line with the following options:

    Start /wait sqlexpr.exe /qb INSTANCENAME="<InstanceName>" ADDLOCAL=SQL_Engine,SQL_Data_Files SAPWD="<ComplexPassword>" DISABLENETWORKPROTOCOLS=2 SECURITYMODE=SQL.  I had been using msde 2000 release A, but with DISABLENETWORKPROTOCOLS set to 0 when I installed it.  I wouldn't think that would be a problem though, as 0 means use named pipes, and 2 means don't.

    I may uninstall and reinstall with DISABLENETWORKPROTOCOLS set to 0, but I'm not hopeful this will fix the problem.  Anyone know of a solution.  Didn't find anything searching for this on Google other than this site, but the previous posting didn't address this problem exactly, even though it was the same error.

    TIA, Steve

     

     

  • Solved.  The script created a user as well, and contained the line:

    exec sp_addlogin N'anuser', N'anuser', @logindb, @loginlang

    so I changed it to:

    exec sp_addlogin N'anuser', N'anewuser', @logindb, @loginlang

    so it met the 8 character password requirements now in place in sql server 2005 and it worked.

    Thanks, Steve

Viewing 2 posts - 1 through 2 (of 2 total)

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