What are the available Sybase non interactive command line tools for Windows - sybase

I am searching for command line tools to execute the script files in Sybase. If anyone could point me to a download links will help.

'Sybase' is actually not a database, since there are 3 different database from the Sybase brand: Sybase ASE, Sybase IQ and Sybase SQL Anywhere (Incidentally, Sybase has been renamed to SAP since quite a few years.)
For ASE, the standard tool for batch execution is 'isql -i'. For IQ or SQL Anywhere, you can use 'dbisql -nogui'. See the respective documentation for details.

Related

How to debug stored procedures in Sybase?

I work with Sybase Central 4.3.0.2428 and the server is Sybase ASE 16.0 SP01 PL03/EBF 24830.
I would like to debug stored procedures.
How do I do that?
There is a command line tool called sqldbgr. Look for the manual to check the parameters and commands.
Years ago Sybase has released a Eclipse based suite called Sybase Workspace. It had included an interface for the SQL debugger. But the product is no longer maintained and is no longer available. You will have trouble to find the binaries.

Sybase BCP vs MS SQL BCP

I have a multi-database setup that I need to work with and both have their own bcp versions that do not act the same way. Plus both are in my %PATH% and the Sybase one is listed before the MS SQL exe so calling "bcp" from the command line always hits the Sybase exe.
First, the versions are "different":
Sybase BCP:
Sybase CTBCP Utility/15.0/P-EBF17890 ESD #24/PC Intel/BUILD1500-123/OPT/Thu May 13 02:45:43 2010
(for Adaptive Server Enterprise/15.7/EBF 23008 SMP SP130 /P/RS6000/AIX 6.1/ase157sp13x/3819/64-bit/FBO/Sat Aug 23 02:49:06 2014)
MS SQL BCP:
Version: 11.0.2100.60
(queries hitting SQL 2008 R2 and 2012 SP3 dbs)
They definitely do not handle output to a file the same way and the docs for each show that. Everything I read on bcp says that bcp should work the same between Sybase and MS SQL but I have to call the full MS SQL bcp.exe path for a queryout call to MS SQL because the Sybase bcp does not support the queryout the same way.
My process uses a batch script to call multiple queries that hit the Sybase DBS and then MS SQL databases to output data to a staging db, will I always have to differentiate between the Sybase and MS SQL bcp's or can I use just one without issue? If so, which one is the "right" one to use (not trying to spark a debate here on which is better). Also, I see nothing showing that the version numbers have any relation what so ever so knowing which is the "latest" and using that one is proving difficult.
Keep in mind that MS SQL Server was identical to Sybase ASE back in 1994 (the called Sybase SQL Server), but after that, they slowly started to move apart. So the concept of BCP is still there and similar, but the details are different.
For one thing, do not expect to be able to interchange client tools for these databases: Microsoft has made changes to the TDS protocol that makes it impossible to connect a client to the other vendor's databases.
If you've got a clash between to two executables with the same name, common solutions include (i) explicitly specifying the executable's pathname (ii) setting the right environment variables before calling one or the other executable (iii) renaming one of the executables. YMMV.

How to find latest Sybase ASE queries within DB?

I have a PB application connecting to Sybase ASE; Is there a way we can trace the DB calls when the application is running.
I used to do that in Oracle 10/11G but unable to figure out in sybase ase.
It will be immensely helpful if I am able to run a module in PB application and check the queries executed after that.
I am using either DBVisualizer or RapidSQL.
Use the MDA tables. For example, monSysStatement and monSysSQLText. See the ASE documentation and/or www.sypron.nl/mda.

Migrate Sybase SQL Server/11.0.3.2 ( Sybase 11.0) to Sybase 11.9.2

I would like to migrate a instance of SQL Server/11.0.3.2 to Sybase 11.9.2 (i want use SSMA after that). There is no documentation on this subject on the web because it's too old (1997).
I only want migrate 3 databases of my instance. I try to dump a db to Sybase 12.5.4, not work, ddlgen not work on 11.0.3.2. With the system table, i can recreate the SQL script for table, view, procedure... and then i bcp the data. But i think it's not a good way, it's too long and not safe...
An other solution: upgrade the server to 11.9.2 (or more), but as i say, i only want migrate 3 databases.
If sombody have an other way to do that, it's will be a great help.
Thank in advance.
You should be able to take a database dump from 11.0.3 and load it into a later ASE version. It is not formally supported, but I have done this successfully for ASE 12.5.

How can I see differences between two .sdf files?

I need a tool that show me the differences between two .sdf files.
Is there something I can download or do I have to write some code?
There are a number of companies which make schema comparison tools for SQL Server (which I presume is what underlies your question). For instance xSQL Software offers xSQL Object, which is free for certain editions of SQL Server. Red-Gate have SQL Compare, which has a 14-day trial.
If you are looking for something FOSS, there is Open DBDiff.
If you are running on linux you can compare any two files, or directories for that matter, using the 'diff' command. The syntax is quite simple: 'diff item1 item2'. For more info use 'man diff' or check out this link.

Resources