Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to set password newly install Sql server 2005 by query?


How to set password newly install Sql server 2005 by query?

Author
Message
thenndral
thenndral
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 5
Hi,

I'm using Vb6.0
Database : SQL Server 2005.

In my vb6.0 installation file, add sql server 2005 and install automatically if not already installed.
sqlserver installation is installed properly when my software installation.No issues in Sql server 2005 installation.

Additional info: I install this exe file sql server 2005 "SQLEXPR.EXE"

here I have a question.
After install sql server 2005, how to reset or change the password for "sa"? At this stage, "sa" have no password.this is newly install sql server2005.so user have to set password.

I want to do this reset password by automatically using query.because user have no knowledge about the Sql server and settings.

How can I achieve this?
I guess explain clearly, if not please let me know.

Thanks in advance,
thenndral
HanShi
HanShi
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3051 Visits: 3633
I guess this should work (when you are logged in as the SA):
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'new_password'
GO



** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
thenndral
thenndral
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 5
Thanks HanShi.

I didn't install "Sql Server Management Studio Express" because user no need use.

could you tell me, where can I run this query?
Please explain me, little more detail.

I check this code in query window, It is working well but user have no knowledge how to use query window and setting password.

USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'new_password'
GO



Thanks Again,
thenndral
HanShi
HanShi
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3051 Visits: 3633
From your VB6 you allready install the SQL instance. You could add some additional code to create an ODBC connection when the installation is finished. Next you execute the SQL-code from within your VB6 code over the ODBC connection. No user action needed ;-).
I found a quick sample over here: http://www.connx.com/products/connx/connx%208.6%20userguide/CONNXCDD32C/Sample_Visual_Basic_ODBC_Application.htm

** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search