IT Community - Software Programming, Web Development and Technical Support

How Can we change the logon password in SQL Server 2005 ?

This is a discussion on How Can we change the logon password in SQL Server 2005 ? within the Database Support forums, part of the Web Development category; I am getting the error when I enter into sql server as follows, Login failed for user "sa". ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-15-2007, 11:37 PM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Default How Can we change the logon password in SQL Server 2005 ?

I am getting the error when I enter into sql server as follows,
Login failed for user "sa". The user is not associated with a trusted SQL Server Connection.

Actually I forgot my password and I need change SQL Server password. Is there any possible to change the password?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-16-2007, 01:39 AM
Gopisoft Gopisoft is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 119
Gopisoft is on a distinguished road
Default Re: How Can we change the logon password in SQL Server 2005 ?

Hi,

Two way to changing the 'SA' Password.

1)
USE [master]
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'lion' MUST_CHANGE
GO

2) From a command shell (start > run > cmd)
OSQL -S <YOUR_SERVERNAME_GOES_HERE> -E
Synatax
sp_password 'Old','New', Account


1> EXEC sp_password NULL, 'lion', 'sa'
2> GO

-R.Gopi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 migration to SQL Server 2005 Collation Change - Method? arjkhanna Database Support 5 10-02-2009 09:58 PM
Server Assessment for Sql server 2005? arjkhanna Server Management 3 10-30-2007 10:09 AM
What is a Linked Server in sql server 2005? Archer Database Support 2 08-14-2007 03:24 AM
change a password for an existing user via mysqladmin sivakumar Database Support 1 07-20-2007 01:55 AM
Username,Password verfication in SQL Server 2005 itself using stored procedure oxygen Database Support 0 07-19-2007 11:21 PM


All times are GMT -7. The time now is 01:39 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0