Does Anyone Have A Script To Reset SQL Login Passwords?
Apr 13, 2006
We are doing a consolodation whereby we are pulling 2 servers into one big one. We have a problem with duplicate logins and differing passwords. I want to be able to cursor (or tran?) through a list of logins resetting their passwords to a default.
This will currently run under SQL 2000, but I may want to do it on our 2K5 server at some time - I feel the second part may be more difficult though.
Does anyone have a script lying around in their armoury that will do this?
Our company website runs off of Microsoft SQL Server. Someone tried changing the 'administrative' password but the way that they did it locks us out of the database.
Under Enterprise Manager there is a Security group, underneath here is a login. The person reset the password here on the login id that is the DBO for our website's database. Underneath the database in Enterprise Manager the dbo uses this login id. Where else does the password need to get reset in order for that login id to access the database? We cannot set it back to the previous password because it is unknown.
When we go to our website we get the following error: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
Please try the following: Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debugging Settings, and select the Robust Exception Information option. Check the ColdFusion documentation to verify that you are using the correct syntax. Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
I've been having this issue lately with a new login. We have set it up to use the Windows Password and Expiration Policy and I give it an initial strong password. In testing this new account I would purposely input the wrong password into an application 3 times thus causing the login to become locked out. I would then go into the SQL Management Studio, go to the Status Page and uncheck the 'Login is locked out' flag. If I would then click the 'OK' button to close the properties, I would get an error message that the password is not complex enough. This is strange since I never changed the password in the first place, I just unchecked the 'Login is locked out' flag. That's issue#1.
I then decided that I would give Management Studio the benfit of the doubt and also change the password to something complex again while still keeping the 'Login is locked out' flag unchecked. I then could click 'OK' and not get any errors. If I then go back INTO Management Studio and go to the Status Page, 'Login is locked out' would be checked again! That's issue #2
Does anyone have ANY idea what the heck is going on here or what I am missing? I would think that I should be able to uncheck the locked out login and close without issue and have the end user login again with their old (existing) password.
We are facing issue on one of our databases on Availability Group replica. FYI, please refer the below messages we are receiving. Moreover, the errors don't happen consistently for the specified user.
The client was unable to reuse a session with SPID 420, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
Login failed for user 'XXXX'. Reason: Failed to open the database 'YYYY' configured in the login object while revalidating the login on the connection. [CLIENT: aa.bb.cc.nn]
I've recently done a side by side upgrade of a mssql 2000 to mssql 2005 instance. I'm having problems with 1 login that I've been told had a password that was only 3 characters in length. They don't seem to be able to log in with it. I get an error with a state of 8 meaning it's the password. Is there an issue with migrating the id and password as is into the 2005 instance? None of the other ids are having the problem, they all seem to work and have longer passwords. Any help is appreciated.
Hi, Im getting this error when attempting to retrieve data from an sql database.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.
Source Error:
Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword") Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn) Line 15: objConn.Open() Line 16: objRdr = objCmd.ExecuteReader() Line 17: While objRdr.Read()
Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.
I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?
Thanks for any help,
Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.
I have to create some type of an sp that will force users to change their passwords every 30 days. It sounds like I should be able to create a simple table with the login and the password expiration date. Then, I should create some type of function to check the expiration, get the new password and run sp_password. Has anyone done this before? Where would this table be created? In Master? Would that also be where I should create this sp? Should this be an xp?
I'm fairly light on creating sp's. Can anyone suggest a starting point for me or give any suggestions? I would appreciate any help. Thanks! Toni E.
Does some one know of a way to use windows passwords in sql w/o having to enter them in? Like a program or sql statement? As of now, we are having to enter them in ourselves , and would like to make our jobs easier....Thanks!!
I have SQL Server 2000 and in one of the databases we store the Application passwords as a Clear text. we would like to encrypt these passwords so that we will pass the auditing.
Can some one please suggest a good way to encrypt these passwords.
I have a pgp file requiring a password that is emailed to me. Is it possible to set up a DTS package that will open the file (using the password), and insert the data into a table, file, etc. TB
There are set of logins in sql server some are NT authentication and some are sql server authentication. How can i retrieve the passwords for both these logins.
A friend of my self asked me how he can save a password not as clear text. He wanted to encrypt the password and save the encrypted string in the database.
How can he do this? Maybe somebody can help me here.
I have installed Sql Server 2000 Reporting Services. I desinged report in VS 2003.When press F5 key.Every time it is asking for user id password then only it is giving List of Report Names.
Is there any way to avoid giving user id and pwd every time. Regards.
hi, so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them: "Cannot Open Database "XXXX" requested by login. The login failed. Login failed for user 'xxx'" Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error. I've tried creating new users in SQL Server and giving them appropriate permissions to my database. I've even tried just using the built in 'sa' account. Nothing seems to change the error, except when I give it the incorrect password then it just says 'login failed' This leads me to believe that i'm successfully logging into the SQL Server, but it doesn't want to give me access to the database I'm requesting access too. But "apparently" the account i'm using should have access to the database. If nothing else the 'sa' account should, but that didn't work either. I'm stumped. Any ideas?
I have a simple .NET page that asks the user to create a new account. One of the fields on that page is 'Password'. I store the password in a SQL 2000 Database. However, it appears in the database as clear-text.
Is there a way to encrypt this so it doesn't appear as clear-text in the DB?
Wondering on how to script over the passwords from one 2000 box to another. We are cutting a box over from dev to production and need to copy userids and passwords from another box.
Hi, WE are moving one of our applications to oracle from sql server.For this migration is there any way I can move passwords from sql server syslogins table to oracle or extract the passwords. thanks in advance Mohan
We store passwords of users of our website. They need to be autenticated and based on that it gives them access to what they are entitled. But its not like NT or server authentication.
This has been setup so that we have a user table and it stores the password. However, it stores it in plain text. Is there any way I can encrypt this field so it is unreadable? Is there a property or a datatype that I can't find? Is there a way to simulate the encryption?