Unanswered: Sybase - trace query from external application
I am new to Sybase. I have an external application which runs its queries on Sybase database.
The application is taking too long to execute queries. If I try to run same query on database (using Db visualizer) it is much more quick.
I want to trace the query to know where exactly it is taking so long to execute.
I searched on internet and found options like set showplan on .. .but where do I run this command.
I tried Dbvisualizer... but nothing happens.
Also, if I have to use isql utility.. is it through command line?
What is the default username and password for this?
If you use Sybase ASE, the default admin user is "sa" without password. Change/add password for production environment.
1. sp_who your_app_login_name --Displays info about server processes for your app login
2. sp_showplan SPID, null, null, null --Displays plan of currently executing SQL statement
3. dbcc traceon(3604)
dbcc sqltext(SPID) --displays currently executing SQLText