PL/SQL :: How To Find Source Code Of The Table

Sep 4, 2013

i have a existing table called table_1 to did some changes to it, but i need to do a source search to find where all  in the code that we reference this code to ensure that there is not a variable declaration that sets this to a specific number. how do i do a source search. i alter a existing column (overbook_max) to number(2) tonumber (3)

View 8 Replies


ADVERTISEMENT

SQL & PL/SQL :: HTML Source Code Inserted Into Table As CLOB

Sep 24, 2010

I got html source code inserted into the table as CLOB (or BLOB). And I would like to search a some word from that.When I find a some value I can write this one into the column.It would be easy if this code is xml but isnt.

View 12 Replies View Related

SQL & PL/SQL :: Compare SVN Source Code With Production Code In Database

May 30, 2012

I have to compare my SVN source code (packages, views etc) with the production code in the database like views etc (actually we are not sure that what we have in the svn is the final version of production code, we have objects created in the production database, but we don't have latest scripts for that. we have to deploy the svn code in the UNIX box).

So here the comparison is between the OS files and the database objects.

I thought I would get scripts of all the packages, views etc from the production database by using DBMS_METADATA or some utility and save the code in OS files then compare one svn file with OS file manually by using some comparison tools e.g toad provide one comparison tool.

View 5 Replies View Related

Backup Of Source Code?

Oct 15, 2009

I would like to backup all source code (packages, procedures, functions, etc) every day automatically. Is there a built-in feature of Oracle to do this, I've been going through the Toad IDE and its getting to be too time consuming.

I assume I could use the export command, but not entirely sure what to specify.

I would like to backup a few tables along all code and set something in place (trigger maybe?) to send me an email when a modification is made to the production code environment.

View 2 Replies View Related

SQL & PL/SQL :: Same Source Code Giving Different Results

Sep 23, 2013

While I was debugging the code of already existing application (Oracle apps fnd_global package), I copied a package to make changes in it.

It was strange that with Original package fnd_global I am getting below error when I call it over database link:

"ORA-20001: Oracle error -20001: ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction
has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN').
has been detected in fnd_global.set_nls."

PACKAGE CALLS ARE AS FOLLOWS:

Database 1 (Oracle Apps LSH module)
CUSTOM procedure to call CDR_PUB_API_GVA
has CDR_PUB_API_GVA
INITIALIZATION BLOCK OF CDR_PUB_API_GVA CALLS Fnd_Global.apps_initialize (when copied to fnd_global1, then it's call don't throw any error)

Database 2 (External application)
has dblink to Database1
calls custom procedure over dblink

While the copied package is not throwing any error (I copied fnd_global to fnd_globa1).

View 8 Replies View Related

Dynamic Wrapping Of Source Code In Oracle

Feb 3, 2008

I want to wrap the source code in oracle, i am able to do it using wrapping utility (through DOS prompt command i.e wrap iname= inputfilename.sql oname=outputfilename.plb).

Other option is using DBMS_DDL package as follows
*********************************************
DECLARE
l_source DBMS_SQL.VARCHAR2A;
l_wrap DBMS_SQL.VARCHAR2A;

[Code]....

This above will replaces the original function source code with wrapped code, but here they are concatinating the code manually.

My requirement is i will get the source code (text) from user_source view in a cursor and line by line code will get in a loop. I am sending that output to above function dynamically , but it raising this error.

ORA-24230: input to DBMS_DDL.WRAP is not a legal PL/SQL unit.

View 2 Replies View Related

SQL & PL/SQL :: Source Code In Different Cases In Utf8 Or Unicode

Jun 7, 2012

How to write code in unicode/utf8 and used non-english variable written in different cases?The compiler is supposed to be case-insensitive. I just wonder how it handles case insensitivity for unicode or ut8 encoding.

View 7 Replies View Related

Forms :: Export Source Code Of Object?

Jul 1, 2010

i build a form to get the source code of an object from the database and export the result into a text file but i face a problem I cannot get more than 780 line of code because i have a package with 24080 line and i have to put all this line in the text file

I attached the form

I know that the problem with the size

CM: removed unnecessary colour coding - it doesn't make it easier to read you know.

View 7 Replies View Related

Create Trigger To Execute A Stored Procedure During Source Code Compile?

Nov 9, 2009

I would like to create a trigger that will execute a stored procedure when a package/function/procedure is compiled. I tried creating an update trigger on user_objects, but it statues aI cannot create that trigger tyoe on views.

View 1 Replies View Related

SQL & PL/SQL :: Regular Expression To Find Commits In All Oracle Source?

Oct 14, 2013

I would like to write a select that would return all places in DB that are commiting transaction.

E.g. package for testing:

CREATE OR REPLACE PACKAGE test.TEST_COMMIT AS
PROCEDURE THE_ONLY_COMMIT_IN_DB ;
END TEST_COMMIT;--not a match
CREATE OR REPLACE PACKAGE BODY test.TEST_COMMIT AS

[code]....

The select should return 4 rows with --ok.

SELECT *
FROM ALL_SOURCE ASO
WHERE
REGEXP_LIKE(ASO.TEXT,'commit(s*);','i' )
AND name = 'TEST_COMMIT'

View 18 Replies View Related

PL/SQL :: How To Find Who Modified Package Code At Last

May 13, 2013

how to find who modified a package code at last? I can only find the latest modified date with USER_OBJECTS.

View 3 Replies View Related

ODP.NET :: Cannot Find Oracle Data Source In Entity Data Model Wizard

Dec 19, 2012

I'm trying to add edmx file in my project for first time. I want to choose the oracle provider ODP.net but cannot find Oracle in the data source list. I have oracle 11g installed , odp and odt installed and can access it from the solution as well. I saw the Oracle listed under data source when I tried to connect the solution to the database through server explorer. The solution is connected to Oracle database through ODP.

View 8 Replies View Related

Find Total Of All Active People For Each Region Code

Jun 18, 2012

I would like to run a query that counts by case_manager, number of distinct app_id's that have a status ='AC' in a select number of programs. All of the fields are in the same table.I want it to look like this:

Case MgrA DYYOY
Jane13420
John3452
Alice1233

Fields are case_manager, status, applicant, and program table reg...I can do the count command to find the total of all active people for each region code. What I want it for the breakdown by program the people are in.

My query for that is:
SELECT case_manager, Count (*)
from reg
where status='AC'
Group by case_manager
order by case_manager
and I get this:
Case ManagerCount *
Jane46
John 14
Alice9

View 1 Replies View Related

OPatch Commands Are Failing With Error Code 255 And Not Able To Find OUI Jars

Aug 21, 2013

I'm trying to apply a patch using opatch but I'm getting this error:

"OPatch was not able to find OUI jars to load them runtime. Please provide valid oui location using 'oui_loc' option. OPatch failed with error code 255". 

Oracle is 11.2.0.3 x64 on Windows Server 2008R2 x64. The PATH variable have

%ORACLE_HOME%OPatch, %ORACLE_HOME%OPatchjlib, %ORACLE_HOME%in in it. 

The only OPatch command that is working and not throwing the error  is the "opatch version" command. 

OPatch Version: 11.2.0.3.5 OPatch succeeded. 

No luck on finding issue resolution or documentation on MOS. I cannot find any documentation about the "oui_loc" option. 

View 10 Replies View Related

SQL & PL/SQL :: Inserting Data In Target Table From Source Table

Nov 22, 2012

I need to insert data in Table A from Table B where most of the fields are identical and might some of the fields will be more in Table A.

ex: Table A: a,b,c,d,e,f
Table B: a.b,c,g,h

How to insert this using user_tab_columns in cursor and if I am giving the i/P as my table names . This needs to be configurable and reusable rather i mention all the fields in my logic.

View 4 Replies View Related

SQL & PL/SQL :: MAX DATE - Getting Records Out Of Source Table

Sep 28, 2011

Below is my requirement,

Source Table: SRC

COL1 DATE_CREATED CREATED_BY
1 27-SEP-2011 GURU
1 28-SEP-2011 SANKAR

Target Table:TGT

COl1 DATE_CREATED CREATED_BY
1 28-SEP-2011 SANKAR

I need to take the MAX of date_created record and store it in target.

I tried,

select max(date_created), col1, created_by from src
group by col1, created_by,date_created

Which is giving me 2 records which i don't want. How to get only one record out of that source table?

View 2 Replies View Related

SQL & PL/SQL :: Insert Into Target Table And Delete From Source

Jan 2, 2013

We have a requirement to archive and purge the tables dynamically based on the control table input. For that we have to design a control table to gather the necessary information and passed to generate the queries.

I have designed the table as below.But in this case I am not able to handle the parent and child relation ship.

Suppose one table needs to be archived and purged and that table is parent table and it is having 2 child tables, so first required data will be inserted into target table and delete from source parent and child tables. so before deleting from parent we have to delete data from all 2 child tables.

Suppose one table needs to be purged and that table is parent table and it is having 5 child tables, so before deleting from parent we have to delete data from all 5 child tables.

To handle this scenario how can I design my control table.

For archive and purge the query like this.
INSERT INTO towner_name.ttable_name
(SELECT * FROM sowner_name.stable_name WHERE condition_column<=(sysdate-30));
DELETE FROM sowner_name.stable_name WHERE condition_column<=(sysdate-30);

for purge the quey is like this.
DELETE FROM sowner_name.stable_name WHERE condition_column<=(sysdate-30);

This is my control table and I have 300 tables list to archive and purge.

CID SOWNER_NAME STABLE_NAME TOWNER_NAME TTABLE_NAME CONDITION_COLUMN PERIOD UNIT TYPE
1 wedb_au OFFER_HEADER wedb_au OFFER_HEADER LAST_DATE 30 D A
1 wedb_sa OFFER_CUSTOMER wedb_sa OFFER_CUSTOMER LAST_DATE 60 D A
1 wedb_au OFFER_SERVICE LAST_DATE 1 Y P
1 wedb_us OFFER_CUSTOMER LAST_DATE 90 D P
1 wedb_cn OFFER_CARDS UPDATE_DT 2 Y P
2 wedb_au ORDER_HEAD wedb_au ORDER_HEAD LAST_DATE 120 D A
2 wedb_us ORDER_CUSTOMER wedb_us ORDER_CUSTOMER LAST_DATE 150 D A
2 wedb_sa ORDER_HEAD wedb_sa ORDER_HEAD CREATION_DT 1 Y A
3 wedb_us DELIVERY_HEAD wedb_us DELIVERY_HEAD UPDATE_DT 50 D A
3 wedb_au DELIVERY_CARDS wedb_au DELIVERY_CARDS UPDATE_DT 200 D A
3 wedb_au DELIVERY_SERVICE wedb_au DELIVERY_SERVICE LAST_DT 100 D A

WHERE TYPE=P means insert and delete
TYPE=A means only delete

wedb_au.OFFER_HEADER is Parent Table.
child tables for wedb_au.OFFER_HEADER are wedb_au.OFFER_SERVICE,wedb_au.OFFER_BODY,wedb_au.OFFER_EMAIL,OFFER_TAX.
wedb_au.OFFER_SERVICE is child table and parent for this table is wedb_au.OFFER_HEADER
wedb_sa.OFFER_CUSTOMER Stand alone table no relationship
wedb_us.OFFER_CUSTOMER Stand alone table no relationship
[code].......

View 2 Replies View Related

SQL & PL/SQL :: Transfer Partition Of Table From Source To Target DB?

Apr 6, 2011

I currently try to transfer a partition of a table from a source to a target DB. For first test purposes I take both SYS users to avaoid privilege problems. I created below procedure from code fragments out of the net.The partition CSS_201001 from table CTRL_SETTLED_SHIPMENTS shall be transferred (I tried both with already existing partition and non existing on target destination), but I always get the following error at DBMS_DATAPUMP.OPEN:

Exception breakpoint occurred at line -1 of DBMS_SYS_ERROR.pls.
$Oracle.EXCEPTION_ORA_39001:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3043
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4769
ORA-06512: at "SYS.TEST_DP", line 20
ORA-06512: at line 2

Listing:

create or replace
procedure test_dp is
-- Handle -- unique identifier for the datapump job
my_handle number;
ind NUMBER; -- Loop index
percent_done NUMBER; -- Percentage of job complete

[code].....

View 7 Replies View Related

SQL & PL/SQL :: Table Comparison - Loaded Data From Source To Destination

Apr 29, 2013

i have 2 tables in two different sources.

I have loaded data from source to destination.

some rows are missed while loading.

i want to know the missing rows

View 11 Replies View Related

SQL & PL/SQL :: Inserting Records Into Target Table From Three Source Tables?

Dec 14, 2012

I am trying to insert records into target table from three source tables by using function in a package and I am getting error as follows.

SQL> create or replace
2 PACKAGE
casadm.sis_load_cpl_sis_reb_pgm_hist
3 IS
4 /**********************************************************************
******************

[code]....

ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'FN_LOAD1T_CPL_SIS_REB_PGM_HIST' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

View 16 Replies View Related

Replication :: Table Data Modification From Source To Destination Database

Jan 11, 2011

I want to replicate single table data/modification from source db to destination DB.procedure or steps how to create replication between source and dest db for single table.

View 18 Replies View Related

Reports & Discoverer :: Bar Code Reader Will Readout Code

Feb 12, 2009

I have no knowledge about Barcode. The problem is an issue of Loyalty Cards of a Hotel and Restaurant to various customers and then these cards will be presented by the customers time to time in the Hotel as well as Restaurant. The Owner of the Hotel and Restaurant wants to generate separate barcode for each card and when this card will be presented then the bar code reader will readout the code and the system will calculate the amount of discount/rebate. Because if the data entry operator enter the code of the card through key board the it will be a chance of leakage or misuse of that card.

View 8 Replies View Related

SQL & PL/SQL :: Oracle 10g - Update Records In Target Table Based On Records Coming In From Source

Jun 1, 2010

I am trying to update records in the target table based on the records coming in from source. For instance, if the incoming record is present in the target table I would update them in the target else I would simply insert. I have over one million records in my source while my target has 46 million records. The target table is partitioned based on calendar key. I implement this whole logic using Informatica. Looking at the informatica session log I find that the informatica code is perfectly fine but its in the update part it takes long time (more than 5 days to update one million records). find the TARGET TABLE query and the UPDATE query as below.

TARGET TABLE:
CREATE TABLE OPERATIONS.DENIAL_REGRET_FACT
(
CALENDAR_KEY INTEGER NOT NULL,
DAY_TIME_KEY INTEGER NOT NULL,
SITE_KEY NUMBER NOT NULL,
RESERVATION_AGENT_KEY INTEGER NOT NULL,
LOSS_CODE VARCHAR2(30) NOT NULL,
PROP_ID VARCHAR2(5) NOT NULL,
[code].....

View 9 Replies View Related

SQL & PL/SQL :: Code To Update Table In 11g

Jul 17, 2013

I have a table extended_values_Test, with the following structure:

CREATE TABLE extended_values_Test
(
MATRL_NUM VARCHAR2(18 BYTE),
PRI_SHIP_LOC CHAR(4 BYTE) NOT NULL,
PLANT CHAR(4 BYTE) NOT NULL,
STD_COST NUMBER,
SNAPSHOT_DATE CHAR(8 BYTE)
)

Snapshot_date is last working date of that month, and is recorded only once in the table for a matrl_num & plant combination.

Inserting records in the table:
Refer to insert_extended_values.sql
Note: This is just a sample table , having records for only two matrl_num.

after inserting records , you can see the records are for two different matrl_num's. For each matrl_num , we can have multiple values of plant and for each plant we can have different value of std_Cost(eg:matrl_num='0023173556').

Moreover for each matrl_num , I have some records in each month , based on the number of plants(with std_cost). Std_cost for a plant is updated in the table whenever there is a change in it from the previous value.In case of no change in value of std_cost over previous month's value , we have 'Null' std_cost for that matrl_num, plant & month(next month).

I want to update these 'Null' values with latest(last month's 'not null' - std_cost) std_cost for that matrl_num and plant. Such change in std_cost can occur multiple times , so we need to update the 'Null' std_cost till the time we have encountered a change in std_cost and so on.

View 14 Replies View Related

SQL & PL/SQL :: Code To Create Heirarchy Table

Aug 21, 2013

I am trying to load one parent-child hierarchy table. I have a table XXX, which contains the columns containing parent, child , level and many more columns in it. Now I need to use the table XXX to load my parent-child hierarchy table. How can I perform this using SQL.

For eg :

XXX
----
Child Parent col1 col2
aaa bbb 123 345
ccc bbb 3456 786
bbb ddd 123 2345

I tried using the DML script generated in OBIEE for Parent/child heirarchy, but not sure the script is taking huge amout of time.

Heirarchy table
---------------
Child Parent
aaa bbb
ccc bbb
bbb ddd

View 4 Replies View Related

SQL & PL/SQL :: Code To Insert Into BLOB Table

Jul 6, 2012

I've searched for code but I didn't found any code which insert into table BLOB without using a specific Directory . my table is

create table ASSETS
(
v_id NUMBER not null,
v_name VARCHAR2(100),
v_content BLOB
)

I want to insert a JPG file.

View 15 Replies View Related

SQL & PL/SQL :: Type In Code To Make Few Tables Then Run Code

Feb 13, 2012

I downloaded oracle sql developer, i type my code into a worksheet but if i use the run statement option, it asks me to make a connection. I dont want to make a connection, just test the data locally.However, even if I do try and make a connection, i get ora-12560 error (local connection).

I just want to type up some data to make some table and test to retrieve or manipulate the data. I'll use any program, command line or gui.

View 7 Replies View Related

SQL & PL/SQL :: Export Of Table Data To Excel Through Code?

Jan 20, 2012

code for:

Export table data to excel file in Oracle PL/SQL.

View 3 Replies View Related

SQL & PL/SQL :: Code To Load Data From Text To Table

Oct 14, 2012

What is the best way to load the data from text file to the table in PL/SQL .How can i write a program for that ?

-data is separated by ',' in text file for each columns in table

View 19 Replies View Related

How To Extract DDL Of Table / Package / Procedure Using SQL Code

Jan 5, 2007

how to extract the ddl of a table/package/procedure using SQL Code?

I found a method, but it's only supported from Oracle9i and obove, im using Oracle8i

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved