How to find latest Sybase ASE queries within DB? - sybase

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.

Related

How to obtain these monitor metrics from a server in Sybase ASE 16?

I have a database hosted on a server. And I have to monitor the database with a script with the necessary queries and stored procedures. The metrics that I have to monitor are:
accounts or users are connected
transactions are activated
resources use transactions
what time
Processor use
Disk use
They told me that with MDA tables I can do it. How can I get those metrics with these MDA ASE tables? Or with what stored procedures could I obtain them?
You are asking about full functionality of a full featured program. There are commercial tools available - like Bradmark Surveilance, or free - like asetune. You can also write your own scripts.
You could be using build in procedures like sp_sysmon. Or you can write your own scripts that read MDA tables and store the results. You can also try to use the tools delivered with ASE server - like ASE cockpit, Sybase Control Center (older versions), or Sybase Central (ancient ASE versions).
One tool in Sybase that may be very helpful is sp_help table_name (just replace table_name with the name of the table you want to know more about). sp_help will show you everything you need to know about the tables, and columns in your database, and I've found it extremely helpful when I need to build queries, but can't remember the full structure of all the tables.
Once you have an idea of what values are stored where, you can build queries that will pull the information you need. As #Adam point out in his answer above, Sybase has built-in procedures that will gather at least some of this data. The Sybase InfoCenter is also a great source of information about what's available to you already.

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.

Redshift with SSIS/SSDT

Has anyone been successful using Amazon Redshift as a source or destination ODBC component in SQL Server Data Tools 2012?
I've installed the PostgreSQL drivers provided by Amazon and have successfully tested a connection in the Windows ODBC driver administrator but keep running into arcane error messages when I choose my saved DSN and try to pull a table listing.
Redshift is based on quite an old version of Postgres (8.0). Postgres has changed quite a bit since then and the Postgres tools have changed with it. When downloading any tools to use with Redshift you will probably need to use previous versions from several years ago.
The table listing problem is particularly annoying but I have yet to find a version of psql that can properly list Redshift tables. As an alternative you can use the INFORMATION_SCHEMA tables to find this kind of info, and in my opinion this is what SSIS/SSDT should be doing by default.
I would not expect SSIS to be able to load data into Redshift reliably, i.e. create a Redshift destination. This is because Redshift does not really support INSERT INTO as a way to load data. If you use INSERT INTO you will only be able to load ~10 rows per second. Redshift can only load data quickly from S3 or DynamoDB using the COPY command.
It's a similar story for all other ETL tools I've tried, notably the open source tools Pentaho PDI (aka Kettle) and Talend Open Studio. This is particularly annoying in Talend's case as they have Redshift components but they actually try to use INSERT INTO for loading. Even Amazon's own ETL tool Data Pipeline does not yet have support for Redshift as 'node'.
I have been successful. Try installing both the 32-bit and 64-bit versions of the PostgreSQL ODBC drivers.
Also, in your Project Properties under 'Configuration Properties' > 'Debugging', set 'Run64BitRuntime' to False.
You can also try specifying the connection string in Connection Manager. For example:
Driver={PostgreSQL ANSI};
server=redshiftdb.d113klxjd4ac.us-west-2.redshift.amazonaws.com;uid=;database=;port=5432

Where does Oracle DBCA come in?

I'm planning to play around with Oracle Business Intelligence (for fun). I have access to a number of Oracle products, and may have gone overboard installing them all (quite possibly more than I need).
Problem is I'm not too sure how all the different Oracle components fit together, but I think I am still missing something, a crucial part - DBCA.
All the online help material I can find says use DBCA to create a database - but I don't seem to have DBCA anywhere.
What I do have installed is:
Oracle - OraClient11g_home1
Oracle - OraDb11g_home1
Oracle Business Intelligence
Oracle Weblogic
Does Oracle have a separate Database Server that is not included in the above? (Like MS SQL Server)
I'll note that I am completely new to Oracle and may be missing something very simple, so any help would be appreciated.
I'm looking for an answer that can lead me to how I can install DBCA and create my database but extra kudos for any additional brief information on how these Oracle building blocks work independently and together.
DBCA is the database configuration assistant. It is a wizard used to create a database and should be instaled during the server install. If you are testing you just want to create a database as part of the server insall and ignore dbca.
Oracle - OraDb11g_home1 is the database (most probably at least - given then Oracle naming conventions). DBCA was called as part of the installation process.
Note that a "database" in Oracle terms is something completely different than a "database" in MS SQL Server. A SQL Server "database" is closer to an Oracle schema.

How to automatically store data from Oracle in SQL Server (according to a schedule)

Hello,
I'm new here, so sorry, if my question is too basic. However, maybe you have some advice, example, links, which could help me... I'm trying to find something helpfull for few days, but no results as for now.
I'm working in a distributed environment. I have a Oracle server hundreds of miles away and a MS SQL server close to me. I'm writing a application using Visual Web Developer 2008 Express. I need some data from Oracle. It's not worth to query the Oracle server every time i need some data from it. I'd prefer to run some Oracle queries once each night and store results in some local (SQL Server) tables. I assume, I should run queries through standard windows scheduler (Windows Server 2008). I have the basic connectivity - I can open Oracle Database from local Visual Studio.
The questions are:
How to write a query/procedure/function that would get data from Oracle and put them into a SQL Server table (possibly recreated before each query run)?
How can I run such a query from command line (or in other way run from scheduler)
What naming conventions are applicable? In VS I use something like //IP.IP.IP.IP/Name and a user with password.
Thanks for any help or advice.
Regards,
Matteo
I suggest you speak to the DBA's of the Oracle and SQL Server databases, as there may be other considerations you need to bear in mind. (Data Integrity, Security, ownership etc.)
One route you could follow would be to implement DTS (For older databases) or SSIS (for new versions of SQL Server) processes to copy the data across on the schedule you want. (This is pretty much what they were built for.)
How much data are we talking about?
If there is a small quantity that you need to transfer every day, you can write a stupid fetch and insert script in language of your choice.
You only need to search for better solutions if "sync" would take too much resources.
Thanks...
I'm the DBA for the SQL Server, which will serve only for my application. For Oracle I just want to read data and I have enough privileges and agreement with DBA's. Security, ownership and integrity are not an issue for now. I just need some technical advise how to get data from Oracle to MSSQL tables on a schedule.
I use MS SQL Server 2008 Express SP1. I'm very close to solve my problem - I have established connections and everything installed and working. I just don't know, how to run a query, which would get data from Oracle and put into MSSQL, on regular basis, without manual interaction.
I've some experience in programming, but not much in databases (except creating complex SQl queries). Therefore some example or links to detailed description would be helpful. I'm not sure about naming conventions, differences between procedures, functions and queries, command line options to run db automation procedures and so on. I'm also not sure, about which mechanisms or technologies are available in MS SQL Server 2008 Express edition.

Resources