dbTalk Databases Forums  

dbsrv9.exe termination if user log off (although SYSTEM account)

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss dbsrv9.exe termination if user log off (although SYSTEM account) in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marco Wagner
 
Posts: n/a

Default dbsrv9.exe termination if user log off (although SYSTEM account) - 06-15-2010 , 05:35 AM






Hello everyone,

in our new product version we had to change our ASA windows service to
a SYSTEM process because we have the Windows7 requirement that users
can start/stop the database. In Windows7 a service can only be started/
stopped by an administrator.

So far so good. First we had no problem but now the Systemtest found
the problem that the dbsrv9.exe (9.02.3984 latest one) will be
terminated if a user logoff from Windows. Thats no Windows7 problem,
it occurs at a WindowsXP system as well.

To prove that it is a Sybase problem I found the following way to make
it simple reproducible without our software:

1) User Account way => correct behaviour
2) System Account way => incorrect behaviour


1) Behaviour as USER process. USER processes should be terminated if a
user make a logoff.

- open CMD Shell
- start dbsrv9.exe, e.g. our parameters:
Dbsrv9.exe -gb idle -ct- -ch 20M -gl all -ti 0 -n windowsxp_pas -x
tcpip "C:\Documents and Settings\All Users\Application Data\Siemens
Energy\SICAM PAS PQS\Database\pas.db"

- open Task Manager or Process Explorer. You can see it is a USER
process under CMD and then DBSRV9.EXE
- make a User logoff
- User login
- open Task Manager or Process Explorer. You can see the CMD process
was terminated and the DBSRV9.EXE as well.

=> correct behaviour


2) Behaviour as SYSTEM process. SYSTEM processes may not be terminated
if a user log off.

- open CMD Shell
- e.g. take this trick to open a SYSTEM CMD Shell (see also
http://security.fnal.gov/cookbook/LocalSystem.html):
write "at 12:25 /interactive c:\windows\system32\cmd.exe"
At 12:25 starts a CMD Shell under SYSTEM control. Just take a minute
in the future e.g. 12:27.

- start the DBSRV9.EXE in this SYSTEM Shell dbsrv9.exe
- open Task Manager or Process Explorer. You can see the CMD and
DBSRV9.EXE are both SYSTEM processes
- User log off
- User login
- open Task Manager or Process Explorer. You can see the CMD SYSTEM
process has survived but the DBSRV9.EXE process died.
=> DBSRV9.EXE has another behaviour as other processes under SYSTEM
context. You can reproduce and test this behaviour with a lot of other
applications e.g. Notepad or C or C# programs. These processes always
stay after a user logoff if they are under SYSTEM context.


Do you have an idea why the DBSRV9.EXE has another behaviour?
Do you have an tip what I can do to solve the problem?


In our old product the DBSRV9.EXE runs as a normal Windows service.
But it has to function without windows service too :-(


Thanks & Greetings from Germany
-Marco Wagner-

Reply With Quote
  #2  
Old   
tduemesnil
 
Posts: n/a

Default Re: dbsrv9.exe termination if user log off (although SYSTEM account) - 06-16-2010 , 07:22 AM






It should work when you disable the interaction with the desktop in
the Service.

Regards

Reply With Quote
  #3  
Old   
Marco Wagner
 
Posts: n/a

Default Re: dbsrv9.exe termination if user log off (although SYSTEM account) - 06-18-2010 , 01:08 AM



Hi,

we do not use a windows database service. We have a System account
process.
I dont know a possibility to forbid a process the interaction with
desktop.

By the way I got the next "mystery":

If you use a CMD (SYSTEM Account) Shell then you get the behaviour as
I explained before.
BUT if you use schtasks to start this dbsrv9.exe then you get a system
account process which will not be terminated if the
user makes a log off. I investigate at the moment if this scenario can
help us. But I doubt it because the schtasks
is an administration tool.



On Jun 16, 2:22*pm, tduemesnil <tduemes... (AT) googlemail (DOT) com> wrote:
Quote:
It should work when you disable the interaction with the desktop in
the Service.

Regards

Reply With Quote
  #4  
Old   
tduemesnil
 
Posts: n/a

Default Re: dbsrv9.exe termination if user log off (although SYSTEM account) - 06-21-2010 , 11:55 AM



did you take a look in dbsvc tool ?

dbsvc -u "service name" can start a installed service
dbspawn can also load the server in the background.


Perhaps you can ask at http://sqla.stackexchange.com/

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.