Is their,Query to find the which tempfile our Database currently using ?
Hi All,
Is their,Query to find the which tempfile our Database currently using ?
Regards,
DB
select property_name,property_value from database_properties where property_name like '%TABLE%';
John Watson
Oracle Certified Master DBA
http://skillbuilders.com
Edited by: JohnWatson on May 14, 2013 12:27 PM
(assuming that you mean temporary tablespace rarther thsn tempfile)
Similar Messages
-
Query to find the list of workbooks and worksheets assiciated to those book
Hi Gurus,
Could you help me with the tables / Query to fetch the list of workbooks and associated worksheets names as welll.
Thanks in advance!!
Rgds,
SantoshHi Santosh
The whole point of the STATS table is to allow you to query performance, who did what and when. The database itself does not keep such statistics so if you disable Discoverer's method of capturing these you have no way of knowing who did what and when.
Without this it is impossible to say. I would strongly recommend you enable the capturing of statistics.
The reason you cannot directly query a WORKBOOK to determine what WORKSHEETS are associated with it is because that information is stored as binary information and not in SQL format.
Discoverer 10g has the capability of providing detailed information on the EUL. This feature is not offered "out of the box" but can be easily enabled.
The EUL Administrator can enable the feature by completing the following steps (see also MOS Note 556932.1):
1. Log on to SQL*Plus as the Discoverer Administrator on the machine where Discoverer Administration Edition is installed.
2. Execute the EUL5.SQL script found in the *$ORACLE_HOME\discoverer\util* directory. (This script will create the necessary database objects.)
NOTE: If you are using an Oracle Applications mode EUL, you must also run the eul5_apps.sql file in the $ORACLE_HOME\discoverer\util directory. This script must be run as the EUL owner, and not the Oracle Applications SYSADMIN user.
4. Exit SQL*Plus and log on to the Discoverer Administration Edition product (as the EUL Administrator).
5. From the menu bar, select File | Import.
6. Import the EUL5.EEX file from the ORACLE_HOME\discoverer directory. Once the EUL import is complete, a new business area will be created and visible called The Discoverer V5 EUL. This is the business area that provides the details on the EUL.
EUL Management Workbooks for Discoverer Administrators
The EUL5.EEX file also imports four pre-built Discoverer workbooks. These workbooks are automatically saved to the database during the EEX import and can be executed in Discoverer Plus, Viewer or Desktop:
EUL Workbook Management - shows which workbooks are shared with which users. Examine worksheets to find the folders, items, joins and conditions they depend upon.
EUL Access - This Workbook indicates if a current EUL exists in this users schema. It also displays the EUL's in other user schemas that this user can access.
EUL Query Statistics - Find out which workbooks and worksheets are being used by whom. Examine users ad-hoc queries.
Lineage - Hyper Drill from Discoverer to find a folder or Items Lineage in Oracle Warehouse Builder. To enable the Hyper drill, you will first need to run the Lineage.sql script.
The Discoverer Administrator can use the pre-built workbooks or build their own EUL management workbooks by using the Discoverer V5 EUL business area.
Best wishes
Michael -
Query to find the memory of database in oracle,sql
Hi All,
Please let me know the query to find the memory of database in oracle,sql.
Thanks,
sajithHow do I find the overall database size?
The biggest portion of a database's size comes from the datafiles. To find out how many megabytes are allocated to ALL datafiles:
select sum(bytes)/1024/1024 "Meg" from dba_data_files;
To get the size of all TEMP files:
select nvl(sum(bytes),0)/1024/1024 "Meg" from dba_temp_files;
To get the size of the on-line redo-logs:
select sum(bytes)/1024/1024 "Meg" from sys.v_$log;
Putting it all together into a single query:
select a.data_size+b.temp_size+c.redo_size "total_size"
from ( select sum(bytes) data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0) temp_size
from dba_temp_files ) b,
( select sum(bytes) redo_size
from sys.v_$log ) c;
Another query ("Free space" reports data files free space):
col "Database Size" format a20
col "Free space" format a20
select round(sum(used.bytes) / 1024 / 1024 ) || ' MB' "Database Size"
, round(free.p / 1024 / 1024) || ' MB' "Free space"
from (select bytes from v$datafile
union all
select bytes from v$tempfile
union all
select bytes from v$log) used
, (select sum(bytes) as p from dba_free_space) free
group by free.p
This is what I use :P From http://www.orafaq.com/wiki/Oracle_database_FAQ#How_do_I_find_the_overall_database_size.3F -
Query to find out which process consuming more cpu?
Hi All,
some one please tell me the query to find out which process is consuming more
cpu resources?
Thanks and Regards
SrikanthUse V$SESSTAT to determine which sessions are using most CPU, and investigate what SQL these users/sessions are executing:
SQL> select ss.sid, se.command, ss.value CPU, se.username, se.program
from v$sesstat ss, v$session se
where ss.statistic# in
(select statistic#
from v$statname
where name = 'CPU used by this session')
and se.sid=ss.sid
order by ss.value desc; -
Query to find the Salary table details HRMS 11i
I am looking query to find the persons salary details in Oralce EBS 11i.
I tried the below query bu it didn'ty work.
SELECT papf.employee_number
,papf.full_name
,pj.NAME job
,haou.NAME ORGANIZATION
,ppp.proposed_salary_n salary
FROM per_all_people_f papf
,per_all_assignments_f paaf
,per_jobs pj
,hr_all_organization_units haou
,per_position_definitions ppd
,per_all_positions pap
,per_pay_proposals ppp
WHERE 1 = 1
AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.current_employee_flag = 'Y'
AND papf.employee_number IS NOT NULL
AND paaf.person_id = papf.person_id
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND paaf.job_id = pj.job_id
AND paaf.organization_id = haou.organization_id
AND paaf.position_id = pap.position_id
AND pap.position_definition_id = ppd.position_definition_id
AND ppp.pay_proposal_id = (SELECT MAX (pay_proposal_id)
FROM per_pay_proposals
WHERE assignment_id = paaf.assignment_id)
In our case all the below tables have 0 records..
select count(*) from PER_PAY_PROPOSALS ;
COUNT(*)
0
select count(*) from pay_element_entry_values_f;
COUNT(*)
0
select count(*) from PAY_ELEMENT_ENTRY_VALUES_F;
COUNT(*)
0
select count(*) from PAY_ELEMENT_ENTRIES_F;
COUNT(*)
0Hi,
Your results clearly states that there is no salary data which is been captured as well as there are no element entries which are assigned to any assignment.
Please do the below which will insert records in salary as well as element entries table:
1. Add a salary proposal to any active employee (People Enter and Maination --> Search for any employee --> Assignment --> Salary) - This will insert a record in PER_PAY_PROPOSALS table
2. Add an element entry to any active assignment (People Enter and Maination --> Search for any employee --> Assignment --> Entries) - This will insert a record in PAY_ELEMENT_ENTRIES_F and PAY_ELEMENT_ENTRY_VALUES_F table
Hope this clarifies.
Thanks,
Sanjay -
Query to find the Base tables of views
Hi,
Can you pl let me know the query to find the base tables on which the view is based.I looked into views like ci_view_definitions but i could not find them.
Thanks for your help
thanx,
Suji.select vw.name viewname, nvl( tabdef.name, vwdef.name) "based on"
from ci_view_definitions vw
, i$sdd_vwtab
, ci_view_definitions vwdef
, ci_table_definitions tabdef
where view_ref = vw.id
and table_ref = tabdef.id (+)
and table_ref = vwdef.id (+) -
Query to find the Views and synonyms that are accessing through db_link
HI all,
Oracle 10g
I need a Query to find the Views and synonyms that are accessing through db_link.
ie.
database A have the db_link to database B through a schema A
now i need to find what are the Synonyms and views that are accessing through db_link either directly or indirectly..
regards,
Deepak
Edited by: Deepak_DBA on Dec 10, 2010 5:38 PMOn the second database (B) use this query to find the SQL which used by the schema A (DB LINK USER). Check the SQL_FULLTEXT column.
select sql_fulltext,sql_id,module,parsing_schema_name,parsing_user_id,first_load_time,loads,users_executing,rows_processed,plsql_exec_time,sorts,fetches,invalidations,parse_calls,cpu_time,elapsed_time,disk_reads,buffer_gets
from V$sqlarea
where parsing_schema_name = 'A' --and to_char(first_load_time,'dd/mm/yyyy') like '%11/08/2007'
order by first_load_time desc;
Regards
Asif Kabir -
Query to find the long running concurrent requests morethan 2 hours
Can any one please provide the " Query to find the long running concurrent requests which are running more than 2 hours"
You need to find the different between the current time/date and FND_CONCURRENT_REQUESTS.ACTUAL_START_DATE for the running requests.
More details can be found in the following notes:
Note: 187504.1 - bde_request.sql - Process and Session info for one Concurrent Request (11.5)
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=187504.1
Note: 134035.1 - ANALYZEREQ.SQL - Detailed Analysis of One Concurrent Request (Release 11 and up)
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=134035.1
Note: 751438.1 - How To Check List , Start And End Dates Of A Parent Concurrent Request And All Childs
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=751438.1 -
Query to find the class name that has the maximum number of students ?
I need the query to find the [class Name] which has the most number of students. please look below at the tables
Students Table
StudentId StudentName ClassID
1 xxx 1
2 yyy 1
3 zzz 1
4 fff 2
5 ttt 2
Classes Table
ClassID ClassNane
1 CSHARP
2 JSHARP
The result should be : CSHARP
since there are 3 students in CSHARP and 2 students in JSHARP class
Appreciate your help
ThanksTry:
DECLARE @Classes TABLE (
ClassID INT identity(1, 1) PRIMARY KEY
,ClassName VARCHAR(50)
INSERT INTO @Classes (ClassName)
VALUES ('CSharp')
,('JSharp')
DECLARE @Students TABLE (
StudentID INT identity(1, 1) PRIMARY KEY
,StudentName VARCHAR(10)
,ClassID INT
INSERT INTO @Students (
StudentName
,ClassID
VALUES (
'xxx'
,1
'yyy'
,1
'zzz'
,1
'fff'
,2
'ttt'
,2
SELECT TOP (1)
WITH TIES C.ClassName
FROM @Classes C
INNER JOIN @Students S ON C.ClassID = S.ClassID
GROUP BY C.ClassID
,C.ClassName
ORDER BY COUNT(S.StudentID) DESC
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles -
Create a query to find the open PO
Hi all,
I want to create a query to find the Open PO which GR is not complete or Open invoice.
But I don't know how can I get the value: still to be invocied ,still to be delivery .
I want to know which table I can find these information.
I know a T-code :ME2L can run this report, but the format is not user friendly,so I want to create a new query .Hi
No need to create any query to find an Open PO.
You can use ME2N or ME2L or ME2N with proper scope of list and selection parameter.
In scope of list you can use the ALV one to get the user friendly report, if you do not have the ALV then you can
create your own scope of list by following the steps.
1) press F1 and click on the customizing icon
2) Click the button W/O specifying the project
3) Click Define scope of list
4) Copy any scope of list for example BEST and rename it as BEST_ALV and Tick the check box AL on the Bottom
5) You can get this new scope of list in the tcods mentioned above and execute thereports.
6) Once you get the output you can modify the layoout to get the user friendly format. Also you can download into excel sheet.
Hope it helps
Thanks/karthik -
Query to find the list of users having access to a particular scenario
Hi,
I am learning Hyperion Planning 9.2 x version. I wanted to know the query to find the list of users having access to Plan Iteration - 1 scenarion.
As I am new to Hyperion Essbase and Hyperion Planning, I am assuming these ideas work out to get the desired result.
1) As Hyperion Planning uses Relational DB to store the User Security information, we can query the list of users who is having access to Plan Iteration - 1 Scenario.
I am not sure if this solution works. Please correct me If I am wrong.
2) We can also query from the essbase editor to find out who all having access to this scenario.
If the above is correct, can you please provide me the query.
I am really need of this and I will be happy if any one provide the solution.
Thanks & Regards,
Upendra. BesthaHi,
If you are looking for some SQL to retrieve the access rights by member then you can use something like (SQL Server code though can easily be modified for Oracle)
SELECT usr.object_name as Username,mem.object_name as Member,
'Access Rights' = CASE acc.access_mode
WHEN -1 THEN 'None'
WHEN 1 THEN 'Read'
WHEN 2 THEN 'Write'
WHEN 3 THEN 'Write'
ELSE 'Unknown' END,
'Relation' = CASE acc.flags
WHEN 0 THEN 'Member'
WHEN 5 THEN 'Children'
WHEN 6 THEN 'Children (inclusive)'
WHEN 8 THEN 'Descendants'
WHEN 9 THEN 'Descendants (inclusive)'
ELSE 'Unknown' END
FROM
hsp_access_control acc, hsp_object mem, hsp_object usr
WHERE acc.object_id = mem.object_id
AND acc.user_id = usr.object_id
AND mem.object_name = 'Plan Iteration - 1'
Cheers
John
http://john-goodwin.blogspot.com/ -
Query to find the no of columns in a table
Is there a query to find the total number of columns in a table?
Dou you know read?
-- the number of rows in a table named yourtable:
select count(1) from yourtable;
-- the number of columns in a table
-- If is a user's table:
select count(1)
from user_tab_columns
where table_name='YOURTABLE'
--If it is´t
select count(1)
from DBA_tab_columns
where owner = 'USEROWNER'
and table_name='YOURTABLE' -
Query to find the latest record with respect to the current status
Dear gurus
I have the following data in a table
Customernum
bkcode
reqtdate
Prevstat
currstat
The data will be like this
CustomerNum bkcode reqdate prevstat currstat
5900 1 03-Aug-12 0 1
5900 1 06-Aug-12 1 0
5900 5 22-Jun-12 0 1
If a customer has an issue to solved, a record is added with bkcode , register date and currstat will be 1
If the issue is resolved for the bookingcode,a new record is added, the currentstatus will become 0. and prev stat will show 1. Row no 1 and 2 reflects this case
If this table is queried for finding the unresolved issues. the output should be only the Last row of the above example. since issue with bookingcode 1 has been resolved
I have trying hard to get this thing confused what to use Lead or Max
Kindly guide meHi,
one way here:
WITH mytable(CustomerNum, bkcode, reqdate, prevstat, currstat)
AS
SELECT 5900, 1, TO_DATE('03-Aug-12', 'DD-Mon-YY'), 0, 1 FROM DUAL UNION ALL
SELECT 5900, 1, TO_DATE('06-Aug-12', 'DD-Mon-YY'), 1, 0 FROM DUAL UNION ALL
SELECT 5900, 5, TO_DATE('22-Jun-12', 'DD-Mon-YY'), 0, 1 FROM DUAL
SELECT CustomerNum, bkcode, reqdate, prevstat, currstat
FROM (SELECT a.*
, ROW_NUMBER() OVER (PARTITION BY CustomerNum, bkcode
ORDER BY reqdate DESC) AS rn
FROM mytable a
WHERE rn=1
AND currstat=1;
CUSTOMERNUM BKCODE REQDATE PREVSTAT CURRSTAT
5900 5 22-JUN-12 0 1Regards.
Al
Edited by: Alberto Faenza on Dec 18, 2012 5:23 PM
Changed again!! Previous logic was wrong -
Query to find the second maximum date in a table
please give me the query to find the second maximum date in a table
You can try with this
SELECT empno
,hiredate
FROM emp a
WHERE 2 = (SELECT COUNT(DISTINCT hiredate)
FROM emp b
WHERE b.hiredate >= a.hiredate
OR
SELECT empno
,hiredate
FROM (SELECT ROWNUM row_num
,empno
,hiredate
FROM emp a
ORDER BY hiredate ASC
WHERE row_num = 2;Regards
Arun -
Sql query to find the space in between the sentense
hi,
can anybody tell me the query to find the space in between the data
chandanNot sure what you mean, but you might want to take a look at INSTR, like in
instr (txt, ' ')
Maybe you are looking for
-
Anyone who can expalin me how i can connect her non iphone (it lights up as she is very deaf like a chritmas tree so no i cant give he an iphone before anyone suggests) so i can get here to text via imessage on the ipad please.
-
Windows 8.1 itunes 11.1.5
Installed Windows 8.1 on new Intel NUC and trying to install iTunes 11.1.5. Install stalls and after awhile, it stated that Installer has failed. Any suggestions?
-
JRockit 1.4.2_04 crashing
We're having consistent dumps with JRockit. It behaves better than the Sun JVM, but is still giving us trouble. It ran for 12 days up until friday, which is the longest it has run yet. This is a RH 9 system, a P4, 1GB ram, running resin, producing th
-
Server Error in '/' Application. WRT54GL Mangling traffic?
Okay, here goes. Maybe someone can help me understand this behavior and what I might be able to do to fix it. I run both wired and wireless at home, a netgear 10/100/1000 workgroup switch in my room for multiple PC's and a fileserver. Connected di
-
XP Proff will not switch off system when closing down.
I have a brand new installation loaded to a KM3M-V board with Semperon 2200 - everything works perfectly with the exception that when the command is given to shut down Windows, instead of switching off the system I get athe following Windows message