cancel
Showing results for 
Search instead for 
Did you mean: 

Reset sa user for ASE 15.7 on Windows 2012 R2

Former Member
0 Kudos

Hi Guys

I am new to ASE and i am trying to reset the password for sa user since the customer has none of the DB users passwords, i have tried to reset by note  1872806 - How to set a new password for SA account in Sybase ASE server, here are the steps i have went through:

1- logged in to win by SYBSID user then shutdown the service Sybase SQLServer _ SID

2- Edit file G:\sybase\SID\ASE-15_0\install\RUN_SID.bat to:

rem

rem Adaptive Server Information:

rem  name:                          SID

rem  master device:                 G:\sybase\SID\sybsystem\master.dat

rem  server page size:              16384

rem  master device size:            400

rem  errorlog:                      G:\sybase\SID\ASE-15_0\install\SBD.log

rem  interfaces:                    G:\sybase\SID\ini

rem

"G:\sybase\SID\ASE-15_0\bin\sqlsrvr.exe" -d"G:\sybase\SID\sybsystem\master.dat" -SID-e"G:\sybase\SID\ASE-15_0\install\SID.log" -i"G:\sybase\SID\ini" -M"G:\sybase\SID\ASE-15_0"

-psa


3- Saved the .bat file


4- in DOS box tried to run RUN_SID as following:

C:\Users\sybSID>G:\sybase\SID\ASE-15_0\install\RUN_SID.bat

C:\Users\sybSID>rem

C:\Users\sybSID>rem Adaptive Server Information:

C:\Users\sybSID>rem  name:                          SID

C:\Users\sybSID>rem  master device:                 G:\sybase\SID\sybsystem\mast

er.dat

C:\Users\sybSID>rem  server page size:              16384

C:\Users\sybSID>rem  master device size:            400

C:\Users\sybSID>rem  errorlog:                      G:\sybase\SID\ASE-15_0\insta

ll\SID.log

C:\Users\sybSID>rem  interfaces:                    G:\sybase\SID\ini

C:\Users\sybSID>rem

C:\Users\sybSID>"G:\sybase\SID\ASE-15_0\bin\sqlsrvr.exe" -d"G:\sybase\SID\sybsys

tem\master.dat" -sSID -e"G:\sybase\SID\ASE-15_0\install\SID.log" -i"G:\sybase\SB

D\ini" -M"G:\sybase\SID\ASE-15_0"

00:0000:00000:00000:2015/02/14 00:06:37.07 kernel  dopen: open 'G:\sybase\SID\sy

bsystem\master.dat', No error

C:\Users\sybSID>-psa

'-psa' is not recognized as an internal or external command,

operable program or batch file.


so i am not sure what am i doing wrong here.

I also tried to run the service by running sqlsrvr.exe but i got no password generated in the output.

Please Advise.

Thanks

Sam



Accepted Solutions (1)

Accepted Solutions (1)

former_member188958
Active Contributor
0 Kudos

The "-psa" is being seen as a separate command line by the OS rather than as a parameter to the sqlsrvr binary.  The is probably a carriage return between your -M parameter and the -psa.  Make sure they are on the same line.

-bret

Former Member
0 Kudos

Hi Bret

Thanks for your reply,

I have edited the RUN_SID.bat file as you suggested and ran it again in cmd with output:

C:\Users\sybSID>G:\sybase\SID\ASE-15_0\install\RUN_SID.bat

C:\Users\sybSID>rem

C:\Users\sybSID>rem Adaptive Server Information:

C:\Users\sybSID>rem  name:                          SID

C:\Users\sybSID>rem  master device:                 G:\sybase\SID\sybsystem\mast

er.dat

C:\Users\sybSID>rem  server page size:              16384

C:\Users\sybSID>rem  master device size:            400

C:\Users\sybSID>rem  errorlog:                      G:\sybase\SID\ASE-15_0\insta

ll\SID.log

C:\Users\sybSID>rem  interfaces:                    G:\sybase\SID\ini

C:\Users\sybSID>rem

C:\Users\sybSID>"G:\sybase\SID\ASE-15_0\bin\sqlsrvr.exe" -d"G:\sybase\SID\sybsys

tem\master.dat" -sSID -e"G:\sybase\SID\ASE-15_0\install\SID.log" -i"G:\sybase\SB

D\ini" -M"G:\sybase\SID\ASE-15_0" -psa

00:0000:00000:00000:2015/02/14 00:40:49.55 kernel  dopen: open 'G:\sybase\SID\sy

bsystem\master.dat', No error

is this the right way to run the DB or should i run with sqlsrvr.exe in command line??

i tried that as well by the way.but got no generated password.

Thanks Bret

Sam

former_member188958
Active Contributor
0 Kudos

I'm not clear if you are actually getting the message "No error" in the errorlog, or it you are saying you get the normal boot sequence without any error.

This is what it looks like when I do boot my Windows ASE with -psa in the RUN file.

I've bolded what I actually typed in, and bolded and underlined in the output what the new password output looks like.  Note that it is kind of buried in there, it is output just after all the system databases finish recovering, but before user databases do.

I hardly ever use ASE on Windows.  My impression is that most people would have ASE set up as a service, after that the most common way would be to use the batchfile.  Calling sqlsrvr directly can be done but I think is unusual.

C:\sybase\ASE-15_0\install>RUN_BJCN00561588A2ps.bat

C:\sybase\ASE-15_0\install>rem

C:\sybase\ASE-15_0\install>rem Adaptive Server Information:

C:\sybase\ASE-15_0\install>rem  name:                          BJCN00561588A2

C:\sybase\ASE-15_0\install>rem  master device:                 C:\Sybase\data\master2.dat

C:\sybase\ASE-15_0\install>rem  server page size:              2048

C:\sybase\ASE-15_0\install>rem  master device size:            30

C:\sybase\ASE-15_0\install>rem  errorlog:                      C:\Sybase\ASE-15_0\install\errorlog

C:\sybase\ASE-15_0\install>rem  interfaces:                    C:\Sybase\ini

C:\sybase\ASE-15_0\install>rem

C:\sybase\ASE-15_0\install>"C:\Sybase\ASE-15_0\bin\sqlsrvr.exe" -d"C:\Sybase\data\master2.dat" -sBJCN00561588A2 -e"C:\Sybase\ASE-1
5_0\install\errorlog" -i"C:\Sybase\ini" -M"C:\Sybase\ASE-15_0" -psa
00:0000:00000:00000:2015/02/13 16:21:26.22 kernel  SySAM: Using licenses from: C:\Sybase\\SYSAM-2_0\licenses\SYBASE_ASE_DE.lic;C:\
Sybase\\SYSAM-2_0\licenses\SySAMLicenseServer.lic;C:\Sybase\\SYSAM-2_0\licenses\_20150130190010.lic
00:0000:00000:00000:2015/02/13 16:21:26.42 kernel  SySAM: Checked out graced license for 1 ASE_CORE (2014.1103) will expire Sat Ma
r 14 13:52:33 2015.
00:0000:00000:00000:2015/02/13 16:21:26.42 kernel  SySAM: Failed to obtain license(s) for ASE_CORE feature from license file(s) or
server(s).
00:0000:00000:00000:2015/02/13 16:21:26.42 kernel  SySAM: Licenses exist for ASE, but a license containing the configured (PE=EE;L
T=SR) attributes could not be obtained. Verify that ASE is configured to use the correct type of license, and either reconfigure;
or generate and deploy the desired license from the Sybase Product Download Center.
00:0000:00000:00000:2015/02/13 16:21:26.43 kernel  SySAM: License feature name:  ASE_CORE

[...snip...]

00:0002:00000:00001:2015/02/13 16:21:29.29 server  Checking external objects.
00:0002:00000:00001:2015/02/13 16:21:29.30 server  The transaction log in the database 'sybsystemprocs' will use I/O size of 2 Kb.

00:0002:00000:00001:2015/02/13 16:21:29.30 server  Database 'sybsystemprocs' is now online.

New SSO password for sa:uhnbmqlyvyrsh6

00:0002:00000:00011:2015/02/13 16:21:29.30 kernel  server will listen on all networks present on host
00:0002:00000:00011:2015/02/13 16:21:29.46 kernel  network name BJCN00561588A, interface IPv6, address fe80::4988:f6e1:fc44:c56d,
type nlwnsck, port 5000, filter NONE
00:0002:00000:00011:2015/02/13 16:21:29.70 kernel  network name BJCN00561588A, interface IPv4, address 10.48.201.172, type nlwnsck
, port 5000, filter NONE
00:0002:00000:00011:2015/02/13 16:21:29.71 kernel  network name BJCN00561588A, interface IPv4, address 192.168.0.9, type nlwnsck,
port 5000, filter NONE
00:0002:00000:00015:2015/02/13 16:21:29.71 kernel  hbc_ninit: No sockets available for HBC
00:0002:00000:00015:2015/02/13 16:21:29.71 kernel  Enable boot traceflag 1642 to allocate required HBC sockets at next boot
00:0002:00000:00001:2015/02/13 16:21:29.73 server  Recovery complete.
00:0002:00000:00001:2015/02/13 16:21:29.73 kernel  Reenlistment of DTC Transactions Complete
00:0002:00000:00001:2015/02/13 16:21:29.73 server  ASE's default unicode sort order is 'binary'.
00:0002:00000:00001:2015/02/13 16:21:29.73 server  ASE's default sort order is:
00:0002:00000:00001:2015/02/13 16:21:29.73 server       'bin_cp850' (ID = 50)
00:0002:00000:00001:2015/02/13 16:21:29.74 server  on top of default character set:
00:0002:00000:00001:2015/02/13 16:21:29.74 server       'cp850' (ID = 2).
00:0002:00000:00001:2015/02/13 16:21:29.74 server  Master device size: 30 megabytes, or 15360 virtual pages. (A virtual page is 20
48 bytes.)
00:0002:00000:00001:2015/02/13 16:21:29.86 kernel  Console logging is disabled. This is controlled via the 'enable console logging
' configuration parameter.


Former Member
0 Kudos

Hi Bret,

thanks for your detailed output.

i am actually getting 'no error" message in the output file when i run .bat file from a command line, i assume that the DB did not actually start since there are no log details in G:\sybase\SID\ASE-15_0\install\SID.log .

Thanks

Sam

former_member188958
Active Contributor
0 Kudos

I've been trying to figure out how you would get that "dopen:" message.  It seems to be some kind of permissions or file existence issue.  Are you running this "as admistrator"?  (If not, right click on icon for terminal window when starting it up and select "run as administrator" from the options).

If I try to run sqlsrvr against a non-existent master file  "foo" when I am not running as admin, I get this error because it can't open the default errorlog location due to permissions, doesn't even get to trying to access the master device.:

C:\sybase\ASE-15_0\install>sqlsrvr -d foo

00:0000:00000:00000:2015/02/14 09:19:56.35 kernel  kcinit: couldn't open error log file 1'C:\Sybase\ASE-15_0\install\errorlog'.

00:0000:00000:00000:2015/02/14 09:19:56.35 kernel  Failed to log the current message in the

Windows NT event log

Same thing if I add the actual errorlog parameter:

C:\sybase\ASE-15_0\install>sqlsrvr -d foo -e "C:\Sybase\ASE-15_0\install\errorlog"

00:0000:00000:00000:2015/02/14 09:28:38.17 kernel  kcinit: couldn't open error log file 1'C:\Sybase\ASE-15_0\install\errorlog'.

00:0000:00000:00000:2015/02/14 09:28:38.17 kernel  Failed to log the current message in the Windows NT event log

If I create a file and reference that file as the errorlog,  that resolves the permssions problem on the errorlog and I then
get pretty close to your error message:

C:\sybase\ASE-15_0\install>touch bar

C:\sybase\ASE-15_0\install>sqlsrvr -d foo -e bar
00:0000:00000:00000:2015/02/14 09:29:02.53 kernel  Attempt to open device foo failed.
00:0000:00000:00000:2015/02/14 09:29:02.53 kernel  dopen: open 'foo', No error

Something a little different is going on though as you aren't getting the "attempt to open device failed" message,

so there is something else wrong with access to the file.

Take a close look at who owns the master device an errorlog files, what permissions are set on them, and which login account you are running as.

Former Member
0 Kudos

Hi Bret,

you are correct it worked fine when i ran the RUN_SID as administrator and it worked perfectly soi have got the generated password, and tried to log to isql with sa user and the generated password:

C:\Users\sybSID>isql -U sa -P wqxlmezzinhfs7

Msg 4002, Level 14, State 1:

Server 'SID':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to connect to the server

failed.

so i reset the password for user sapsso (cause sa is mostly locked)  tried to login and i got the following:

C:\Users\sybSID>isql -U sapsso -P tdfnhdykhaozo9

Msg 1640, Level 16, State 2:

Server 'SID':

Adaptive Server requires encryption of the login password on the network.

Msg 4002, Level 14, State 1:

Server 'SID':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to connect to the server

failed.

I am not sure what is the problem


thanks again Bret you were really helpful.

Sam

Answers (1)

Answers (1)

Former Member
0 Kudos

this issue of the encryption has been resolved by following note  1942379 - Setup password encryption to encrypt login passwords on the network between ASE and isql

Thanks

Sam