Sql to find out non-standard dba_data_file
version 8i-10g
few dbfile were created in $OH/dbs dir in few databases in tivoli tablespace (can be dropped and re-cretaed without issues) , i am working on this to fix that.
what would be sql script to create report of all databases , having db files created in $OH/dbs location in tablespace like 'TIV%'
may be need help adjust this to show db name ....
SQL> select TABLESPACE_NAME, FILE_NAME
2 from dba_data_files
3 where TABLESPACE_NAME like 'TIV%'
4 ;
TABLESPACE_NAME
FILE_NAME
TIVOLIORTS
/u01/app/oracle/product/8.1.6/dbs/tivoliorts.dbf
It might be actually easier if you approach the problem the other way round - by finding out which database each of the files in the directory belong. This can be done by issuing a fuser command on the file to see which processes have the file open and then a ps command to see the database that has it opened. Something like:
$ fuser swf_th_data01_01.dbf
swf_th_data01_01.dbf: 9900o 6917o 28306o 846o 29413o 29411o 13633o 13615o 13600o 13176o 13146o 13134o 13120o 13100o 13090o
$ ps -ef |grep 9900
oracle 9900 1 0 Mar 01 ? 0:10 oracledoith7 (LOCAL=NO)Edited by: Lakmal Rajapakse on 05-Mar-2010 08:25
Similar Messages
-
How to find out the standard smartforms?
how to find out the standard smartforms?
Hi Sunil
You just go to transaction <b>SE80</b>(Object Navigator)
and in that enter <b>Package BC470</b>
which contains the standard Programs on Smart forms ,
I think there you can find some Smart forms in those programs.
I hope it will help you.
If it helps reward with points.
Regards Rk -
How to find out the standard info stucture for a customized IS in LIS
Hi All
I have to run the statistical set up for the customized info structure S763 for the application plant maintenance in LIS. But i dont know whether it was copied from a standard SAP info structure or it was enhanced from a standard info structure.
I have even checked out all the standard IS for plant maintenance but it is not matching. The closest match is S063 but a few characteristics and a key figure is missing.
Could anybody guide me how to find out the standard info structure?
Any help would be of great help.
Regards
SaddyHi Ganesh
No..it didnt solve my problem. MC23 only displays the info structures. I have a customized info structure S763 which was created long time back. Im not sure whether it was copied from a standard info structure or enhanced from a standard info structure.
I have to give the source info structure name to run statistical set up. The closest one which matches with the S763 is S063 but it is missing few characteristics and key figure.
does it means that the IS S063 was enhanced?? Am i right?? If it was enhanced how will i run the statistical setup for the same...
I hope i have explained clearly.
Do provide ur valuable input.
Regards
Saddy -
SQl to find out the last business day of a given week
Can any one please let me know what will be the SQL to find out the last business day (monday-friday) of a week?
Edited by: 863997 on Oct 6, 2011 10:40 AMAssuming for "this week" that you want "last week Friday," then here is the SQL:
TIMESTAMPADD(SQL_TSI_DAY,-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE)*-1, CURRENT_DATE))
If you want the "nth" business day of the month, click on this link here:
Re: calculation of Business day in OBIEE -
Sql to find out combination of true and false
Hi all,
Could any one provide the sql to find out combination of true and false . For eg: if I have 3 elements a , b c i would like to get below o/p
a b c
t t t
t t f
t f f
f f f
t f t
f f t
your reply is greatly appreated - thank youDo you mean something like this (all permutations) ?
SQL> with t as (
2 select 't' bool from dual union all select 'f' from dual)
3 select a.bool a,b.bool b,c.bool c
4 from t a,t b,t c
5 /
A B C
t t t
t t f
t f t
t f f
f t t
f t f
f f t
f f fIf not, then you already got correct answers regarding boolean type in sql.
Best regards
Maxim -
Hi,
I have a table with 50 columns, lets call it Table_A . There is a identical table called Table_B. The data in Table_B gets flushed every night and data from Table_A is moved to Table_B. A new set of data is inserted into Table_A. Now I need to find out which field value is changed and what is changed . A minus command can give the changed records, but how to get the what was prior value for each changed field . Here is what I am looking for
WITH TABLE_A AS ( SELECT 1 ID, 'JOHN' NAME, 'SALES' DIV FROM DUAL
UNION
SELECT 2 ID, 'MARRY' NAME, 'ACCOUNTS' DIV FROM DUAL
UNION
SELECT 3 ID, 'KIM' NAME, 'SERVICE' DIV FROM DUAL),
TABLE_B AS ( SELECT 1 ID, 'JOHN' NAME, 'SALES' DIV FROM DUAL
UNION
SELECT 2 ID, 'MARRY' NAME, 'ACCOUNTS' DIV FROM DUAL
UNION
SELECT 3 ID, 'KIM' NAME, 'SALES' DIV FROM DUAL)
SELECT * FROM TABLE_A
MINUS
SELECT * FROM TABLE_B
what i want is something that will spit out this (only one record, because there is only one diff record found in the above query.)
ID, OLD_ID, NAME, OLD_NAME , DIV , OLD_DIV
3 3 KIM KIM SERVICE SALESThe above one is for sample purpose, The actual table has 50 fields, and except the ID field, all other field values might change.
All ideas and solutions are appreciated.
Thanks in advance.>
I understand your frustration. Here is the scenario. There are set of 5 tables. 1 master and 4 child tables ( and an identical set of 5 tables called "prior" tables, to store the flushed data from the "current" 5 tables). Every night data comes in XML files, the data from the 5 "prior" tables get flushed out . The data from the 5"current" table set moves to 5 "prior" tables. Then XML data gets loaded into the 5 "current"tables. Now once XML gets loaded into the original table ,I have to find out the diffs in those 5 tables(between current and prior) and generate result sets listing only the columns that have changed value. So what is current value and what was the prior value(from the prior table) side by side .
>
I'm not frustrated. It's just that any suggestions we make are solely based on the information provided. Sometimes posters start focusing on the solution they want to use (which is ok for their viewpoint) and don't explain the actual problem they are trying to solve. That often limits our ability to understand the options.
Now that you posted the above there is another option you could use that might better deal with some of the issues people have mentioned.
That solution is to compare the XML versions of the data. You haven't mentioned HOW you load that XML data into relational tables (what tool and process) but there is one VERY USEFUL feature of data in XML format:
ALL data is already in TEXT format (excluding the obvious LOB possibilities, which you also haven't mentioned).
That means ALL datatypes can use simple string comparison to detect differences: numbers, dates, character data. The actual meaning doesn't matter. If even a single byte is different the value can be considered different.
Oracle uses XML and XSLT functionality as the base for their DBMS_METADATA_DIFF package. That package is used to compare schemas or databases to detect object (e.g. tables, views) differences and to automatically produce DDL for ALTER statements that can modify an object to have the same structure as the objects being compared.
I suggest that you consider doing your comparisons on the XML versions of the data. Each night you would compare the new XML file data against the previous night's XML data. You can use XSLT to do the comparison and also to produce an XML file that contains the differences. Then you can use that 'difference' file as the source of your process to ultimately display the data.
An additional advantage of doing the XML comparisons is that you can do them asynchronously as soon as the new file is available. And the, if you don't really need the 'change' info in the database you never need to load it. Just transform the change XML into an Excel file or flat file format for users to load into Excel for review.
Do you license the partitioning option? If so then another suggestion would be to stop doing your nightly 'flush and move'. Recreate your 'prior' tables as partitioned tables that have just ONE range partition; a MAXVALUE partition that covers ALL data. Then each night you would:
1. TRUNCATE the prior table
2. Do an EXCHANGE partition between the 'current' table and the associated 'prior' table. Very fast, metadata only - no data actually gets moved.
3. Load the 'current' table with new data.
The above process avoid any actual data movement between the 'current' and 'prior' tables.
Not picking on you but you also haven't said how that new daily 'current' data is being used. If the only reason you are loading it into a table is to compare it to yesterday's data you could just do that with XML like I mentioned above.
Or you could load the XML itself into a table (e.g. XMLTYPE) and uses Oracle's built-in XDB fuctionality and do the XML comparison 'inside' the database. Then load a standard heap table from the XML table when you need to.
Maybe the above helps explain why the more info we have about the actual end-to-end problem you have the more options we can suggest for dealing with it. You are the only one that can determine if an option is viable for your particular use case and constraints.
Updated to add links to Oracle's XML functionality
See the XMLDiff function that you can use IN the database if you load the XML files themselves. From the SQL Language doc
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions241.htm#SQLRF20025
>
Purpose
The XMLDiff function is the SQL interface for the XmlDiff C API. This function compares two XML documents and captures the differences in XML conforming to an Xdiff schema. The diff document is returned as an XMLType document.
For the first two arguments, specify the names of two XMLType documents.
For the integer, specify a number representing the hashLevel for a C function XmlDiff. If you do not want hashing, set this argument to 0 or omit it entirely. If you do not want hashing, but you want to specify flags, then you must set this argument to 0.
For string, specify the flags that control the behavior of the function. These flags are specified by one or more names separated by semicolon. The names are the same as the names of constants for XmlDiff function.
See Also:
Oracle XML Developer's Kit Programmer's Guide for more information on using this function, including examples, and Oracle Database XML C API Reference for information on the XML APIs for C
Examples
The following example compares two XML documents and returns the difference as an XMLType document:
>
See Oracle' own XML Developer's Kit for out-of-the-box functionality for 'diffing' XML documents:
http://docs.oracle.com/cd/E11882_01/appdev.112/e23582/adx_c_diff.htm
>
21 Determining XML Differences Using CThe Oracle XDK includes components that help you to determine the differences between the contents of two XML documents and then to apply the differences (patch) to one of the XML documents.
This chapter contains these topics:
Overview of XMLDiff in C
Using XmlDiff
Using XmlPatch
Using XmlHash
Overview of XMLDiff in C
You can use Oracle XmlDiff to determine the differences between two similar XML documents. XmlDiff generates an Xdiff instance document that indicates the differences. The Xdiff instance document is an XML document that conforms to an XML schema, the Xdiff schema.
You can then use XmlPatch, which takes the Xdiff instance document and applies the changes to other documents. This can be used to apply the same changes to a large number of XML documents.
XmlDiff only supports the DOM API for input and output.
XmlPatch also supports the DOM for the input and patch documents.
XmlDiff and XmlPatch can be used through a C API or a command line tool, and they are exposed by two SQL functions.
An XmlHash C API is provided to compute the hash value of an XML tree or subtree. If hash values of two trees or subtrees are equal, the trees are identical to a very high probability.
>
Did you notice that part about 'XmlDiff generates an Xdiff instance document that indicates the differences'? That is EXACTLY what your initial question was asking about, albeit from a DB perspective.
But XML is XML, DIFF is DIFF, a date/number/text are all strings. So XML 'database data' works the same as XML 'test or complex hierarchy' data.
Here is a pretty good writeup of how to do XML diff. See the XMLDIFF2 section for the best Oracle sample:
http://ellebaek.wordpress.com/2011/02/01/comparing-xml-in-oracle/
>
XMLDIFF2
The algorithm in our extended XMLDIFF function that we’re going to call XMLDIFF2 is:
1.Prepare CLOB variable for constructing the difference XML.
2.Find minimum number of leading elements that form primary key values (unique lookup).
3.Look for primary key values in XML1 not present in XML2: These primary key values have been deleted.
4.Look for primary key values in XML2 not present in XML1: These primary key values have been inserted.
5.Diff all common primary key values, ie in both XML1 and XML2.
6.Return NULL if no differences found. -
How to Find Out whether Standard IDOC is Availabl for Transaction ?
Hi,
We are having SAP implementation 4.7E IS-OIL. We would like to know how to find out whether is there any Standard IDOC is Available for the SAP Transaction.
Particularly for IS-Oil related transaction. e.g Load Confiramtion. T-code - O4G1.
From a Given Transaction code is there any link which can tell whether IDOC is Present or not.
Kindly help me.
Regards,
Umeshcheck for transaction....we41 and we42..
check for proper process code...then check in we57,we81 and we82..
also u can search in google..
UMESH note that u need some fucntional exp for working in IDOC...try to crack yr head ..give time..n u ll get to know the things soon..as there is no defined standards to work in idocs..
for more info u can ask me for [email protected]
best regards
Message was edited by:
Madan Gopal Sharma -
SQL to find out Objects used by
Hi,
How can I find out the list of objects which are using an object? e.g. Table temp_1 is used by procedure p_test11 and function F_test22... Is there any way to find out the list of these to objects with their type?These dictionary table you can refer to.
SQL> select * from dictionary where table_name like '%DEPENDENCIES%'
2 /
TABLE_NAME COMMENTS
DBA_DEPENDENCIES Dependencies to and from objects
USER_DEPENDENCIES Dependencies to and from a users objects
ALL_DEPENDENCIES Dependencies to and from objects accessible to the user
ALL_REFRESH_DEPENDEN Description of the detail tables that materialized views depend on for
CIES refresh
DBA_APPLY_VALUE_DEPE Synonym for _DBA_APPLY_CONSTRAINT_COLUMNS
NDENCIES
DBA_APPLY_OBJECT_DEP Synonym for _DBA_APPLY_OBJECT_CONSTRAINTS
ENDENCIES
TABLE_NAME COMMENTS
6 rows selected. -
How to find out Standard Functionalities in ECC 6.0
Hi Friends,
Can any one of you, please tell me as how to find out SAP Standard Functionalities of a particular Module in SAP-HCM (Eg: SAP-HR - PA module in ECC 6.0).
Thank you in advance and in anticipation of your reply.Hi Murali
The core HR funcationality is delivered with SAP_HR software component - this will provide Personnel Administration transactions, screens, actions, infotypes and subtypes both general (PA-XX, PY-XX) and the majority of country specific infotypes and payroll solutions. This functionality can be viewed in the Easy Access menu for Human Resources
and you can see the configuration options in SPRO IMG
The whole ERP HR solution however also includes additional software components such as EA_HR which is
an enterprise extension - its content and related applications are detailed in the following link
http://help.sap.com/saphelp_erp60/helpdata/EN/44/4541e0bc511193e10000000a155369/frameset.htm
There are also business functions and sometimes additional software components such as ERECRUIT 600
or Business Packages that are to been used with EA_HR such as BPERP5ESS for Employee Self Services
Hope this helps
Stuart -
How can we find out Standard Modified Programs
HI Friends,
How can we find out the Standard modified program.
The Standard Programs which are modified by user using Acess Key.
Thanks,In table ADIRACCESS you will find all objects for which an access key has been used.
regards,
John. -
Sql to find all Sysadmin logins in EBS
Hi ,
I am using this sql to find out all Sysadmin logins in my EBS environment.
SELECT user_name "User Name",
to_char(start_time, 'MM-DD-YYYY HH24:MI:SS') "Login Time",
to_char(end_time, 'MM-DD-YYYY HH24:MI:SS') "Logout Time"
FROM apps.fnd_logins a,
apps.fnd_user b
WHERE a.user_id = b.user_id
AND b.user_name IN ('SYSADMIN', 'MOBDEV', 'MOBADM')
AND TRUNC(start_time) > TRUNC(SYSDATE) - 1
AND login_type = 'FORM'
ORDER BY start_time;
But, somehow I am unable to relate this logins to database sessions id. Is these any direct sql to find out all session info from gv$session / gv$process whenever there is a sysadmin login.
EBS 11.5.10.2
DB 11.2.0.2Hi
HusseinNone of the query gives a correct output.
For example , when I enter the user_name as SYSADMIN for the query , the v$session.action gives result as "FRM:GXGONG:ACCO CA IND Shipping "..this is the forms session info for "GXGONG" user who doesn't have the sysadmin responsibility.
SELECT distinct(s.sid),
s.serial#,
p.spid,
s.process,
substr(to_char(s.logon_time,'mm-dd-yy hh24:mi:ss'),1,20) Logon_Time,
s.action,
s.module,
fu.user_name,
fip.ipaddress
FROM
V$SESSION s, V$PROCESS p,fnd_oam_forms_rti fip, fnd_logins fl, fnd_user fu
WHERE s.paddr = p.addr
AND s.process = fip.PID
AND fl.pid = p.pid
AND fl.user_id = fu.user_id
AND s.username IS NOT NULL
and fu.user_name IN ('SYSADMIN', 'MOBDEV', 'MOBADM')
and s.action like 'FRM%'
and s.logon_time > trunc(sysdate) -1
1047 48328 28016 31638 03-25-13 13:04:55 FRM:JPJUSTIC:ACCO ITEM/INVENTORY INVTVQOH SYSADMIN 10.32.33.95:64961
3772 63791 32428 30206 03-25-13 22:10:16 FRM:EXFINKLE:ACCO INVENTORY ADJU WIPTXSFM SYSADMIN 10.32.82.104:46034
3425 48215 18143 14036 03-25-13 21:26:09 FRM:GXGONG:ACCO CA IND Shipping WMSCTLBD SYSADMIN 172.20.23.102:33548
774 51097 21922 26155 03-25-13 21:12:15 FRM:JXLIM:ACCO PURCHASING APPLIC POXPOVPO SYSADMIN 10.43.2.16:47312
1442 21606 20941 21354 03-25-13 07:58:41 FRM:MDJAMES:ACCO Shipping Execut FNDRSRUN SYSADMIN 10.32.33.127:6350
5150 17379 16824 31376 03-25-13 16:21:49 FRM:GXROY:ACCO Receivables Colle ARXCWMAI SYSADMIN 172.25.16.120:60150
5117 45721 16824 31376 03-25-13 16:09:17 FRM:GXROY:ACCO Receivables Colle ARXCWMAI SYSADMIN 172.25.16.120:60150
3447 151 18143 14036 03-26-13 00:26:44 FRM:GXGONG:ACCO CA IND Shipping FNDRSRUN SYSADMIN 172.20.23.102:33548
5147 4240 16824 31376 03-25-13 16:08:54 FRM:GXROY:ACCO Receivables Colle ARXCUDCI SYSADMIN 172.25.16.120:60150
5107 62706 16824 31376 03-25-13 16:11:17 FRM:GXROY:ACCO Receivables Colle ARXCUDCI SYSADMIN 172.25.16.120:60150
5168 4367 16824 31376 03-25-13 16:38:00 FRM:GXROY:ACCO Receivables Colle ARXCUDCI SYSADMIN 172.25.16.120:60150
3450 59009 18143 14036 03-26-13 00:29:13 FRM:GXGONG:ACCO CA IND Shipping INVMATWB SYSADMIN 172.20.23.102:33548
5137 45737 16824 31376 03-25-13 16:13:01 FRM:GXROY:ACCO Receivables Colle OEXOETEL SYSADMIN 172.25.16.120:60150
3461 16761 18143 14036 03-25-13 21:25:39 FRM:GXGONG:ACCO CA IND Shipping INVMATWB SYSADMIN 172.20.23.102:33548
434 26798 24756 17190 03-25-13 16:20:57 FRM:MXBAKER:Direct US CSR User OEXOEORD SYSADMIN 10.32.33.123:50117
5142 31731 16824 31376 03-25-13 16:20:46 FRM:GXROY:ACCO Receivables Colle ARXCWMAI SYSADMIN 172.25.16.120:60150
1716 11892 24609 27641 03-26-13 00:36:16 FRM:BAMALAGO:ACCO INVENTORY ADJU WIPTXSFM SYSADMIN 10.32.82.143:27123 -
How to find out Orphan Process
Hi
We are using Windows clients and connect to Oracle Database Server. For some reason if the Client machine is rebooted when an application is running, The Process still shown in the V$Session and it take hours to get released from the V$Session.
Is there any sql to find out such Orphan Process?
Thanks in advance
S Muralidharan
Procon Systems Pvt. Ltd.http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96581/sqlnet.htm#437587
Read the limitations and side effects before implementing. -
Find out Large objects in Shared pool
Hi,
I am working on Oracle 10.2.0 and 11.2.0 databases.
Could you please give the sql to find out the Large objcts in Shared pool.
Thanks a lotHi;
I suggest please review:
Shared Pool script
Re: regarding shared pool
Regard
Helios -
How to find out if ENQUEUE_ESRDIRE is used inside a standard program!
Hi All,
I have run VFX3 to rellease billing document using VF02 BDC that is called inside VFX3.
I used debugging to find out in ENQUEUE_ESRDIRE, or ENQUEUE_E_TRDIR is used anywhere in the process.
I also used System Debugging and Break-point at statement functions. But I have not ben stopped at these function modules.
However, I checked using ST05 with enqueue trace enabled, and I found the below entries.
255 ESRDIRE ENQUEUE 1 0 Excl(***) TRDIR GP3VOFY4EM1BE5DHB1155DUU8H
37 ESRDIRE DEQUEUE 1 0 Excl(***) TRDIR GP3VOFY4EM1BE5DHB1155DUU8H
My query is how can we debug to a point where these lock objects are used or Do these lock objects are not identified in debug mode but are logged while enqueue trace used i.e., SAP uses internally?
Please help me as this helps me in resolving an issue where locking issue is there that fails to update VFX3 becuase for one user
in SQL trace it is logged as VF02 TRDIR Lock > 6 hours VF02 TRDIR
and for another job "UPD 42 050 BATCHFIN GZZ K > Obj: ESRDIRE # enxxhead7727" is logged in ST05.
Regards,
PratyushaHi Clemens,
I was unable to trigger the exact point from where this lock object has triggered.
But I am sure that it is a standard SAP process which is locking while releasing the billing documents.
Now my query is why SAP why SAP'S standard program VF02 that is internally called by VFX3 (RVFAKSPE) and that can be submitted in background mode will use ESRDIRE lock whil each time it releases the block?
The problem I am facing is - there are different BATCH jobs and all are for VFX3 with different variant so that no billing document is processed by two different jobs at same time. However the lock entries ENQUEUE_ESRDIRE is creating problem as it is creating locking issue and hence the jobs are processed longer than expected. This is evident from ENQUEUE trace of ST05.
Is VFX3 ( In version 4.5B) is meant for running 1 background job of VFX3 at a time?
Regards,
Pratyusha -
Hi All-
Before starting installation, I would like to find out What EDITION and VERSION is the SQL Server Software ISO.
Please note this is not to find out what version is the installed sql server but before the installation: Is there a note or abrv. that describes what kind of Edition and version is the ISO?
Detail explanation is appreciated.
Thanks.
belayzeleka@Balmukund - Thanks for the input - That one is a nice blog!
But assuming you can`t change the Product Key value (you are not provided that number, as you know it gets populated by itself) can you find out
what implies the corresponding edition? If there is a folder where this reference is store, could you provide the full file path where this folder is located?
The ideal solution would be a way to find out what the Edition
is befor we start installation.
Thanks!
Also just to add what I came across:
The SQL Server 2012 installation software comes with pretty much all edition in it, that kind of makes it difficult to easily identify what edition is the specific ISO, but when
one downloads from MSDN one must downloads the
right edition either Standard,
Enterprise, etc so that when you install it, it installs whatever edition is downloaded.
The best source would be whoever downloaded the software.
Also, before going too far, you can find out what edition it is being installed right before the setup wizard finishes on the
License Terms page (Microsoft Software License Terms Page) and if the edition is not the one you intended to install, you can cancel it there and everything will be rolled back- no hastle.
belayzeleka
Maybe you are looking for
-
Cannot Execute Error on JES4 install
Ok, I'm starting from scratch here...I'm trying to install JES4 on an Admin/Directory server. Downloaded the install from the web but when I try to run the ./install...I get the following error: /tmp/.jes_CaChE/Solaris_sparc/installer: /tmp/.jes_CaCh
-
How to get default baseline date in a payment terms
Hi, We have around 160 payment terms used in our system. We want to get the default baseline date for all these payment terms. Going to each individual payment terms and getting the default baseline date is a cumbersome job. Is there any easy way to
-
Client require the Downpayment adjust at MIRO to get budget availability.
Client require the Downpayment adjust at MIRO to get budget availability. During MIRO system shows the downpayment made to the vendor but it was not adjusted while creating vendor liability and extra budgets were consumed. If there is no extra budget
-
Insert or Update method - removed from Web Services v2.0?
Was the "insert or update" method on standard objects taken out of Web Services v2.0 for a reason? Is there an equivalent of this functionality in Web Services v2.0? Thanks, -Kevin
-
Incorrect records When load Transaction Data
Hi experts: I just loaded transactional Data. Data first came from a CSV file to PSA, then from PSA to DSO, Last DSO to Cube. Data in PSA looks correct. After data got loaded to DSO, I found so many Item Numbers are not in PSA. I deleted all the old