July 13, 2008 at 7:23 pm
Hi All.
First a little background:
This is for an in-house database capacity planning system. It all runs from MSSQL 2005 Standard edition and collects space and database information for all of our company's Sybase and MSSQL databases. It's primary way of achieving this is via MSSQL Linked servers and synonyms, however, there is the need to execute the Sybase ISQL.exe to run some SQL scripts for data on space used. This is where I have experienced some problems.
While testing this on my PC, using the same service accounts, Sybase versions and drivers, everything works as expected. I can run the following commands and receive the expected output:
select @@version
declare @execsql varchar(1024)
select @execsql = 'C:\sybase\OCS-12_5\bin\isql.exe -v'
exec xp_cmdshell @execsql
output
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sybase CTISQL Utility/12.5.1/P-EBF15471 ESD #22/PC Intel/BUILD1251-053/OPT/Mon Feb 18 19:54:33 2008
NULL
Confidential property of Sybase, Inc.
Copyright 1987, 2008
Sybase, Inc. All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
NULL
This software contains confidential and trade secret information of Sybase,
Inc. Use, duplication or disclosure of the software and documentation by
the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and Sybase, Inc. or other written
agreement specifying the Government's rights to use the software and any
applicable FAR provisions, for example, FAR 52.227-19.
Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
NULL
NULL
(16 row(s) affected)
When I move this to a server (enterprise, standard and developer editions have the same issue), and I run the same command, I receive the following results:
select @@version
declare @execsql varchar(1024)
select @execsql = 'C:\sybase\OCS-12_5\bin\isql.exe -v'
exec xp_cmdshell @execsql
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)
Feb 9 2007 22:47:07
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
(1 row(s) affected)
output
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NULL
(1 row(s) affected)
As you can see - it actually hasn't run the isql.exe command at all. The example I have used is just displaying the client version. The utility itself calls an input file for execution, however, that does nothing as well.
I've moved this to several servers, and they all exhibit the same behavior. What works fine on my local PC (Windows XP), does nothing on the servers (windows 2000 and windows 2003 server).
I've checked the directory and file permissions - they are the same.
I've checked the database service accounts and permissions/roles - they are the same.
The only thing that seems to differ is the operating system.
Has anyone else encountered this? Has anyone heard of this ? Is there a fix or workaround for this?
Please help if possible - I've hit a wall and have nowhere else to go.
Thanks in advance.
July 13, 2008 at 7:38 pm
could it be pathing to isql? I've seen some strange behavior with sybase and MS isql programs and environment paths.
July 13, 2008 at 7:51 pm
I initially thought this as well. So I made the Sybase portion of the path variable the same on both machines (EDIT - in the same location within the PATH statement also). Sadly - no effect.
I've been testing this on some other servers (Windows 2003, Windows 2000 / MSSQL 2005, MSSQL 2000) and have had it work successfully. However, these are all test servers. I can't leave my utility on a test server - it will eventually get nuked. The main reason I want it off my pc ;).
Any thoughts are good thoughts - keep 'em coming folks :).
July 14, 2008 at 4:03 pm
Okay - I have found a solution and the cause of the fault. For those interested, details are below:
When the server was built, it was a rushed build to replace an already crashed production box.
During the haste, the server was not rebooted after the Sybase install. This is not entirely unusual however, as the install does not prompt you to reboot post install. Not only that, but the Sybase client tools are 99.9% functional, with the 0.1% non-functionality in the original post.
Note - that running the isql.exe tool from the command-line is still successfull, and will enable you to connect to a Sybase database engine.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply