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.

Batch file run problem in vista

4 posts in General Discussion Last posting was on 2009-09-16 17:20:09.0Z
Partha Posted on 2009-09-16 15:56:28.0Z
Sender: 1458.4ab1089d.1804289383@sybase.com
From: Partha
Newsgroups: ianywhere.public.general
Subject: Batch file run problem in vista
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ab10aac.14b7.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Sep 2009 08:56:28 -0700
X-Trace: forums-1-dub 1253116588 10.22.241.41 (16 Sep 2009 08:56:28 -0700)
X-Original-Trace: 16 Sep 2009 08:56:28 -0700, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7720
Article PK: 6764

Hi,

Our application containing 2 database.
To start the Database at the same time(both of them), I have
write the following code in a batch file :

dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"

Now it will allways run the 1st Database not the 2nd one.
How I will run the both of at the same time using batch
file?

But the bat file is properly working in windows XP, 2000.

PowerBuilder Version : 11.5
Sybase : 9.0
Windows : Vista Business(32 Bit)

Thanks,
Partha


John Smirnios [Sybase] Posted on 2009-09-16 16:39:44.0Z
From: "John Smirnios [Sybase]" <smirnios_at_sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Batch file run problem in vista
References: <4ab10aac.14b7.1681692777@sybase.com>
In-Reply-To: <4ab10aac.14b7.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: <4ab114d0$1@forums-1-dub>
Date: 16 Sep 2009 09:39:44 -0700
X-Trace: forums-1-dub 1253119184 10.22.241.152 (16 Sep 2009 09:39:44 -0700)
X-Original-Trace: 16 Sep 2009 09:39:44 -0700, vip152.sybase.com
Lines: 41
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7721
Article PK: 6761

There might be settings that control whether the batch file is expected
to wait for program termination or not. Normally, the shell waits for
non-GUI apps and doesn't wait for GUI apps.

Try putting 'start' at the beginning of each line:

start dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
start dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"

-john.

--
John Smirnios
Senior Software Developer
iAnywhere Solutions Engineering

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

Partha wrote:
> Hi,
>
> Our application containing 2 database.
> To start the Database at the same time(both of them), I have
> write the following code in a batch file :
>
> dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
> dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"
>
> Now it will allways run the 1st Database not the 2nd one.
> How I will run the both of at the same time using batch
> file?
>
> But the bat file is properly working in windows XP, 2000.
>
> PowerBuilder Version : 11.5
> Sybase : 9.0
> Windows : Vista Business(32 Bit)
>
> Thanks,
> Partha


Jeff Albion [Sybase iAnywhere] Posted on 2009-09-16 16:45:49.0Z
From: "Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Batch file run problem in vista
References: <4ab10aac.14b7.1681692777@sybase.com> <4ab114d0$1@forums-1-dub>
In-Reply-To: <4ab114d0$1@forums-1-dub>
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: <4ab1163d$1@forums-1-dub>
Date: 16 Sep 2009 09:45:49 -0700
X-Trace: forums-1-dub 1253119549 10.22.241.152 (16 Sep 2009 09:45:49 -0700)
X-Original-Trace: 16 Sep 2009 09:45:49 -0700, vip152.sybase.com
Lines: 27
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7722
Article PK: 6762

Using the "dbspawn" utility is also a way to get around this:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbdaen9/00000610.htm

Regards,

John Smirnios [Sybase] wrote:
> There might be settings that control whether the batch file is expected
> to wait for program termination or not. Normally, the shell waits for
> non-GUI apps and doesn't wait for GUI apps.
>
> Try putting 'start' at the beginning of each line:
>
> start dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
> start dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"
>
> -john.
>

--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/library/sql-anywhere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/


Breck Carter [TeamSybase] Posted on 2009-09-16 17:20:09.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: Batch file run problem in vista
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <7f72b51dua1k8b72n6uvkb9kru6j7a7pi3@4ax.com>
References: <4ab10aac.14b7.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 16 Sep 2009 10:20:09 -0700
X-Trace: forums-1-dub 1253121609 10.22.241.152 (16 Sep 2009 10:20:09 -0700)
X-Original-Trace: 16 Sep 2009 10:20:09 -0700, vip152.sybase.com
Lines: 41
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7723
Article PK: 6763

Try using dbspawn to invoke dbsrv9...

dbspawn dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
dbspawn dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"

Without dbspawn, dbsrv9 will not return control to the next command
line until the server is shut down.

Breck

On 16 Sep 2009 08:56:28 -0700, Partha wrote:

>Hi,
>
>Our application containing 2 database.
>To start the Database at the same time(both of them), I have
>write the following code in a batch file :
>
>dbsrv9.exe -x tcpip(ServerPort=2620) -n DB1 "C:\DB\DB1.db"
>dbsrv9.exe -x tcpip(ServerPort=2621) -n DB2 "C:\DB\DB2.db"
>
>Now it will allways run the 1st Database not the 2nd one.
>How I will run the both of at the same time using batch
>file?
>
>But the bat file is properly working in windows XP, 2000.
>
>PowerBuilder Version : 11.5
>Sybase : 9.0
>Windows : Vista Business(32 Bit)
>
>Thanks,
>Partha

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com