Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

how to restart the Sybase Sql Server using open server api?

2 posts in Open Server Last posting was on 2008-06-26 13:18:29.0Z
Leo Guan Posted on 2008-06-26 01:46:41.0Z
Sender: 43f5.4861b2af.1804289383@sybase.com
From: Leo Guan
Newsgroups: sybase.public.connectivity.openserver
Subject: how to restart the Sybase Sql Server using open server api?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4862f501.7284.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Jun 2008 18:46:41 -0700
X-Trace: forums-1-dub 1214444801 10.22.241.41 (25 Jun 2008 18:46:41 -0700)
X-Original-Trace: 25 Jun 2008 18:46:41 -0700, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.connectivity.openserver:56
Article PK: 112172

Hi.
I am developing a program with c++, now I want to restart
the sybase sql server into single user mode using the api
sybase provide, but I did not find out the api. Could you
tell me is there any APIs can solve my probelm, my OS is
windows 2003 server.

Special thanks!!


SybaseNeal Posted on 2008-06-26 13:18:29.0Z
From: SybaseNeal <nstack@nospam.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.connectivity.openserver
Subject: Re: how to restart the Sybase Sql Server using open server api?
References: <4862f501.7284.1681692777@sybase.com>
In-Reply-To: <4862f501.7284.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48639725$1@forums-1-dub>
Date: 26 Jun 2008 06:18:29 -0700
X-Trace: forums-1-dub 1214486309 10.22.241.152 (26 Jun 2008 06:18:29 -0700)
X-Original-Trace: 26 Jun 2008 06:18:29 -0700, vip152.sybase.com
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.connectivity.openserver:57
Article PK: 112165

Hello,

There is no Open Client or Open Server API that would allow
you to restart a server. Almost all of the APIs are used to
communicate with an active/running server.

You would need to execute an operating system command to start
a server. On UNIX you could use the system() call...

system("/software/sybase125/ASE-12_5/install/RUN_my_server");

I'm not much of a Windows programmer but I think you could use
the system call too:
system("c:\sybase\ase-12_5\install\RUN_my_server.bat");

Or I think Windows provides some APIs to control services such
as StartService()...
http://msdn.microsoft.com/en-us/library/ms685942(VS.85).aspx

Thanks,
Neal