Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to set password newly install Sql server 2005 by query? Expand / Collapse
Author
Message
Posted Tuesday, July 22, 2014 2:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:14 AM
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
Post #1594965
Posted Tuesday, July 22, 2014 8:16 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:58 PM
Points: 2,290, Visits: 2,752
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’! **
Post #1595098
Posted Tuesday, July 22, 2014 6:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:14 AM
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
Post #1595319
Posted Wednesday, July 23, 2014 1:43 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:58 PM
Points: 2,290, Visits: 2,752
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’! **
Post #1595369
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse