See all the SQL statements executed in Oracle DB 12c [duplicate] - sql

This question already has answers here:
How can I see queries that are executed against Oracle?
(3 answers)
Closed 5 years ago.
I'm an administrator of DB with DBA role. So I need to gather all the SQL statements executed in DB in all sessions. Does anyone know if there is a command that shows a list of username and SQL statement executed by him? Thanks in advance.

The closest thing you can get to that is by querying DBA_HIST_ACTIVE_SESS_HISTORY.
If sessions did not matter to your requirements, you could query DBA_HIST_SQLSTAT.
both required diagnostic pack license

Related

How to generate output in different tabs for simultaneously executing queries in Oracle SQL Developers? [duplicate]

This question already has answers here:
Run 2 queries at the same time on Oracle SQL Developer?
(6 answers)
Closed 4 years ago.
We are testing a table. There are 20 different tests to be done in the given table. So there are 20 different queries we execute. Is there a way that I run 20 different queries on the same table and get 20 different outputs generated for the same table? We are using Oracle SQL Developer and Standard Edition 2.
Please let me know if it is possible as it will save a lot of time. If you need more information, let me know.
Thanks.
Maybe you just need to check the "Show query results in new tabs" checkbox.

Function usage in SQL Server 2008 R2 [duplicate]

This question already has answers here:
How to find all the dependencies of a table in sql server
(13 answers)
Closed 6 years ago.
I can find one scalar valued function in one database.
I just want to know where that function is being used like in any stored procedure or any view.
Is there any query to check this?
Thanks in advance.
You could download SQL Search by RedGate if you're allowed to install things.
Alternatively you could script out the database, Right Click on your database -> Tasks -> Generate Scripts. This will script out the entire database (any objects you select) and will take a while on a larger system. Once it's finished you'll be able to use Ctrl+F to search and see where the function is called.

Automate SQL Statement using Oracle Scehduler [duplicate]

This question already has answers here:
Best way to run Oracle queries periodically
(2 answers)
Closed 6 years ago.
I'm using Oracle SQL developer to run a select statement every morning and then export those table results to a .csv file. I'm considering automating this process and wanted to know if it was practical to use Oracle Scheduler by creating a Job to run the query daily ?
-Oracle SQL Developer version 4.0.0.13
-Oracle 12g
I've just read on stackoverflow # Best way to run Oracle queries periodically that DBMS_Scheduler in fact would be the way to go.

how can i see all the scheme in the sql server 2000 [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I obtain a list of all schemas in a Sql Server database
I manage to see all the schemas in the sql server 2000. I used the following statement
show search_path
But it failed.
Please try:
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
For more info please refer link How do I obtain a list of all schemas in a Sql Server database

View the query by which a table was created in SQL Server 2000 [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to see query history in SQL Server Management Studio
I have created a table by create command in sql server, I executed the query from query analyzer and then I closed the query analyzer. Now I want to see that query by which I created the table how can I do it?
Right-click on the Table in your Object Explorer and select Script Table as... -> CREATE to -> New Query Editor Window.
In general - NO. But you can get just similar script by various scripting modules, including supplied with Sql Server 2000 (Enterprise Manager and Query Analyzer Script Table as context menu)
OR
exec sp_help 'tablename'
May provide you sufficient information for your needs