How to use Toad to trace SQL - performance

How to use Toad to trace what sql are being executed by my application? All I want to do is trace what SQL / PL/SQL procedures are being executed by my application and what parameters are being passed?

You can not use TOAD to trace SQL fired by external application, but you can utilize session browser to see what queries are being executed on session basis.There is also oracle utility called tkprof which can be used to profile SQL.Also take a look at this :
Oracle: is there a tool to trace queries, like Profiler for sql server?

In the commercial version of Toad you can use the SQL Tracker which is found in the menu option: Database > Monitor > SQL Tracker. If you don't have that as part of your Toad then they also offer SQL Monitor for free. A blog about it is here.

Related

Continue running SQL procedure when SQL Developer is Closed

Is there any way to execute a procedure in SQL Developer and have the procedure continue to run even in SQL Developer is closed?
Yes, here's an Oracle doc that will guide you through defining a scheduler job. You can use this method (or DBMS_SCHEDULER, or OEM) to schedule a job that will execute a procedure without needing to maintain database connectivity.
Would recommend reading the entire doc, but you can skip ahead to "Schedule SQL Scripts Using SQL Developer" to view the relevant info.
https://docs.oracle.com/database/sql-developer-17.2/DMRIG/generating-deploying-sql-scripts.htm#DMRIG260

How to see tables created on SQL developer with SQL PLUS?

I created a tablespace on Oracle SQL Developer and trying to access tables data with SQL PLUS console. But when I insert a row with SQL Developer and want to see if the result is display on the SQL PLUS console, SQL PLUS doesn't show me any results. Seems like there's no connection between SQL PLUS and SQL Developer.
Is anyone has an idea ?
of course you are committing the transactions, then querying them from SQL*Plus; otherwise there is no way to see the data from another session.
commit;
SQLDeveloper and SQL*Plus are just two front end tools that allow to access the database. Let's start by making sure, that:
* You connected with the same database
* You are connected as the same user
* You did commit
You need to commit from JDeveloper and not be in a transaction in sqlplus.

Require tool to trace the LInq Queries in Oracle

i am working entity framework with oracle data connection.
Can anyone suggest tool to get the LINQ queries executed in oracle.
I am looking similar tools like SQL profile in Oracle to trace and execute the queries.
I'm not aware of such a tool, but if you are using Entity Framework 6 and you can modify the application code, you can trace the queries by using the builtin logging.
For example, to output all queries to the console, you can use:
context.Database.Log = Console.Write;
For more details check https://msdn.microsoft.com/en-us/data/dn469464.aspx.

How do I set the SDE version in SSIS dataflow source

I have a GIS oracle database and I am needing to reference in a SSIS dataflow task. Ideally I would normally do something like this (which works perfectly in Oracle SQL Developer):
execute sde.version_util.set_current_version('SAFE.mvedits')
SELECT CAD_EVENTID
FROM SAFE.INCIDENT_POINT_MV
however when I try to use that as the SQL command of my OLE DB Datasource it throws me an "Invalid SQL" error.
How do I set the SDE version in a SSIS dataflow task data source?
Knowing nothing of nothing on Oracle, what you might try is
In your Oracle Connection Manager, change the property RetainSameConnection to True. This means that all connections will Oracle will use the same thread.
Add an Execute SQL Task before your Data Flow that talks to Oracle. Use your query there to modify the current version thing. This setting should be persisted on the connection.
In your OLE DB Datasource, start with the SELECT statement.
You might need to set DelayValidation to true as well.
If that's not working, let me know and I'll see if I can come up with anything else.
As it turns out this is a shortfall of interacting with GIS Oracle databases through thirdparty applications. In my situation we addressed it by just bundling the change up in a stored procedure that lives on the oracle server and invoking that stored procedure from inside SSIS.

Monitor and change SQL queries with SQL Server 2000

I have a database upgrade tool that is misbehaving. I would like to catch one of the queries it sends to the database and change it before it is executed.
The tool connects via ODBC.
The tool and the SQL Server are on the same Windows 2003 Server box.
Any ideas?
EDIT: (More info)
When the tool runs it dies on step 12 out of 100. It issues some bad SQL intended to create a view. I need to suppress the error message or correct the SQL before it is executed. I can't just create the view because the first thing it does it drop the view. Even then it would error because the view would already exist.
Certainly - use the SQL Profiler to intercept and record the query.
Very useful little tool that...

Resources