SQL & PL/SQL :: Creation Of Package
Jan 12, 2011
Why Package has to be created as two parts
1) Package spec
2) Package Body ?
Quote:PLS-00304: cannot compile body of '<PACKAGE_NAME>' without its specification
I learned it as a Thumb of rule! But IF there is any rule for it give that URL/link for that.
View 25 Replies
ADVERTISEMENT
Jul 9, 2012
During ASM Disk Groups creation after the ASM instance creation, receive the following error: Disk Group ORAASMGROUP2 already exists. Cannot be created again
The Grid infrastructure was deinstall one time and still the same issue.
View 4 Replies
View Related
May 28, 2013
I need to find out in DB Package where this Package is installed (in which schema). The problem is this DB Package can be installed in various schemas. This means that I can't use select user from dual or system environment SYS_CONTEXT('USERENV', 'OS_USER').
What I would need is something like $$PLSQL_UNIT
View 8 Replies
View Related
Jan 15, 2012
I have a package with several procedures which raise and catch an error if a foreign key constraint has been violated. I put the the following code in my package body:
e_ouder_niet_gevonden EXCEPTION;
PRAGMA EXCEPTION_INIT(e_ouder_niet_gevonden,-2291);
Now all the procedures inside the package which catch this exception in the EXCEPTION block work fine. I would like to be able to use that exception outside of my package as well though, how would I do this?
View 4 Replies
View Related
Oct 19, 2012
Just started to learn oracle DBA. I am creating database manually.. I am facing following errors
I executed catproc.sql script it was running suddenlt oracle throwd following error.
CODEPL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Package body created.
No errors.
Package body created.
BEGIN
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'TEMP'
ORA-06512: at "SYS.DBMS_STATS", line 13210
ORA-06512: at "SYS.DBMS_STATS", line 13517
[code]...
Script detail's
CODECREATE DATABASE drprod
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/drprod/redo01.log') SIZE 100M , GROUP 2 ('/u01/app/oracle/oradata/drprod/redo02.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
[code]...
View 14 Replies
View Related
May 13, 2013
I have a quiet large table (around 140 GB) and i want to create an index on it. I was wondering, before i fire my my create index statement, i know in advance how long will it take to complete? I know after the create index is executed, we can monitor and gets some estimates from longops view. but is there any way we estimate before hand?
Also my database is in archive log mode and what would be the fastest way to create an online index?
View 5 Replies
View Related
Apr 12, 2011
i am trying to create the ASM diskgroup means it's giving the below error.
[root@racdb3 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb6
Marking disk "VOL1" as an ASM disk: [FAILED]
View 4 Replies
View Related
Apr 15, 2012
I am doing my master project on oracle Database. I need to create a PL/SQL script to create user automatecally. Name of the users i am supposed to get from some table (say pr_id of table persons).
View 4 Replies
View Related
Dec 7, 2011
how to create sequence to varchar and how see that sequence
View 2 Replies
View Related
Apr 26, 2012
I have a quick question, can we create a cursor as parametrized so that it picks up the table name as an input to the procedure, but it is not compiling.
CREATE OR REPLACE PROCEDURE CORPREPRECON.D_Q_CHECK_P (IN_TABLE_NAME IN VARCHAR2 )
IS
V_NULL_CHECK NUMBER(10) := 0;
V_BLANK_CHECK NUMBER(10) := 0;
V_LEN_CHECK NUMBER(10) := 0;
CURSOR C1 IS SELECT * FROM ||IN_TABLE_NAME;
[code]......
View 15 Replies
View Related
Apr 9, 2013
I have two tables having same name in two different databases.i have to create a new table with these two tables in a new database.
But if one table have 2 columns and another table having three columns I have to create a new table with three columns..
View 6 Replies
View Related
May 23, 2011
i had small query on external tables. i had (.csv) file outside the database. In this file, one column will be added monthly. i need to create the external table dynamically by adding the column for every month.
How the procedure can be created for this requirement.
View 9 Replies
View Related
Jun 15, 2013
I am running into an issue and trying to ascertain issue. Scenario:I have 2 MV creation scripts. The MV is supposed to get populated by connection from schema to another schema USING DB Links.Basically, SAME HOST, SAME RAC DATABASE, just separate schemas. The MV creations are just hanging. I see NO alert log mentions. I ran a SQL trace and yes,
I see: call count cpu elapsed disk query current rows------- ------ -------- ---------- ---------- ---------- ---------- ----------Parse 0 0.00 0.00 0 0 0 0Execute 1011 1.40 73.80 0 0 0 0Fetch 1010 1.08 317.57 0 0 0 1010------- ------ -------- ---------- ---------- ---------- ---------- ----------total 2021 2.49 391.38 0 0 0 1010 Misses in library cache during parse: 0Optimizer mode: ALL_ROWSParsing user id: 109 (recursive depth: 2) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to dblink 2022 0.00 0.00 SQL*Net message from dblink 2021 0.46 242.58
Understandable, but when I do a selective query, the results come back pretty much within 5 seconds.DB version is 11.2.0.3. Is there a BUG that I should know about?
Here is a snippet:
CREATE MATERIALIZED VIEW "SCHEMA"."MV_NAME_MV" USING INDEX REFRESH COMPLETE ON DEMAND AS (SELECT distinct mapguide_persons(pl.location_code) "FULL_NAME_COSTCENTER",mapguide_jobemp(pl.location_code) "TRUNCNAME_JOB",mapguide_empnum(pl.location_code) "FULLNAME_EMPNUMBER_PHONE",mapguide_english(pl.location_code)
[code]....
View 7 Replies
View Related
Apr 26, 2013
I have 30 packages to be created for a new user, i call in the execute_pkg.sql which creates all the 30 packages.
i use like this
sql> set echo on
sql> set spool execute_pkg_spool.txt
sql>@execute_pkg.sql
sql> spool off
My questions:
I find it difficult to figure out the which pkg was not created, at present the spool file is too big with the pkg code in it
create or replace package test1....
...
..
..
Warning: Package Body created with compilation errors.
i wanted the output like this
test1
Warning: Package Body created with compilation errors.
View 5 Replies
View Related
Jan 28, 2013
I have installed oracle database 11gr2 in laptop1 and installed oracle database 11gr2 in laptop2.Both the laptop's are connected to same internet connection through wifi. So my question is can i create a database link between these two databases using this wifi? give some steps in creation of a database link.
View 13 Replies
View Related
Nov 28, 2012
I am getting error while creating a trigger. I am not yet find any wrong statement. See the following code and comments.
SQL> CREATE OR REPLACE TRIGGER shclog_in before update on shclog for each row
WHEN (to_number(new.MSGTYPE) = 210)
2 3 declare
4 PRAGMA AUTONOMOUS_TRANSACTION;
5 begin
6 insert into starcas.transaction_log values(:new.PAN,
[code].......
Warning: Trigger created with compilation errors.
SQL> show error
Errors for TRIGGER SHCLOG_IN:
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/1 PL/SQL: SQL Statement ignored
4/21 PL/SQL: ORA-00942: table or view does not exist
SQL>
View 4 Replies
View Related
May 29, 2013
While i am inserting data into a specific table that table assigns empty spaces.
For example:
CREATE TABLE DEALER_MST
("DEALER_CODE" CHAR(10) NOT NULL ENABLE,
"REGION_CODE" CHAR(3),
"SUB_REGION_CODE" CHAR(3),
"DEALER_NAME" VARCHAR2(80),
[Code]....
But it is giving result as DS with 8 spaces. It assigns spaces in db automatically while fetching.
View 8 Replies
View Related
May 23, 2009
I created a table but I want to add the Unique check to it as I forgot to apply it to the table when I created it.Is it possible to make the field Unique after having created the table or do I have to drop the table and re-create it?
View 3 Replies
View Related
Aug 7, 2011
I am running Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production on RHEL5. I am busy with data pump import, from the log I can see that my import is busy with the constraints.
I am using parameter EXCLUDE=INDEX during the import and I created the index DDL's.
Now I want to manually create indexes while the import is busy.
Will this be advisable to do or what would be the impact?
View 1 Replies
View Related
May 5, 2011
I have window7 OS, I installed 4 ORACLE HOME's in WINDOWS7 machine,
two ORACLE_HOME is for 10.2.0.3
two ORACLE_HOME is for 11.2.0.2
My intension is to configure DATAGAURD on 10g,11g But while configuring Listeners it creating problems like as of my knowledge we have set exicutable path in envronmental veriables.
creation of Listener for 10.2.0.3 ( first ORACLE_HOME)
but while creating listerner for 10.2.0.3( seconde ORACLE_HOME)
LISTENER created but it's showing ORACLE_HOME of FIRST ORACLE_HOME
as i know we need to set parameters
SET ORACLE_HOME=
SET ORACLE_SID=
is there any setting Required before configuring LISTENER for SECOND ORACLE_HOME? and for 11g
View 3 Replies
View Related
Oct 15, 2012
I am looking for a way to monitor the creation of new datafiles / tempfiles.Let's say I am creating a new datafile of 8GB in size, and it takes a few minutes to create.
I have looked at v$session_longops, and several other system views, but cannot find any that indicate how the file creation is progressing.
I want to be able to display something simple, such as "72% complete".
View 1 Replies
View Related
Mar 19, 2012
A am new in RAC configuration.I configuring RAC with ASM diskgroup with the external redundency. So now i am facing problem to mount the ASM diskgroup. I am giving the the RAC configuration description below.
1. using two node rac1 and rac2
2. asm disk configuration 3 drive
/dev/raw/raw1
/dev/raw/raw2
/dev/raw/raw3
on both node
3. and i am using vmware to configure the both node asmdisk group
after configuring the os level and oracle clustring , i run dbca to configure asm disk group..so in the create disk screen i have found my previous create 3 disks
/dev/raw/raw1
/dev/raw/raw2
/dev/raw/raw3
so first two disks
/dev/raw/raw1
/dev/raw/raw2
i named it "dg1" then press ok , when i pressed ok a warring is appear that is "could not mount the diskgroup on remote node on rac2 using the connection service rac2:1521:+ASM2. Ensure that the listener is running on this node and the asm instance is registred to the listener. Receive the following error:
ORA-15032 : not all alterations performed
ORA-15063 : ASM discovered insufficient number of disk for diskgroup "DG1"
as the same way i create another diskgroup "fg" for flash recovery area using disk /dev/raw/raw3
so after creating the two diskgroup i saw the two diskgroup is appere in the "diskgroup appere screen" an saw that only one diskgroup is mounted but not second node i.e. rac2 diskgroup is not mounted . What should i do no .
View 2 Replies
View Related
Feb 25, 2012
i am trying to create table inside function where in after creating table when am trying to access the table with select statement oracle is throwing error 'Table/view doesnot exist -00942', below is the code snippet
create or replace function example (mkey in varchar2) return varchar2
is
g_key varchar2(100);
l_tbl_ntext exception;
pragma exception_init(l_tbl_ntext , -942);
begin
begin
execute immediate 'select * from example1';
exception
when l_tbl_ntext then
null;
end;
execute immediate 'create table example1(skey varchar2, g_key varchar2) storage(buffer_pool, keep)';
end example;
/
select * from example;
View 8 Replies
View Related
May 15, 2012
I am having a template file (only .dbt file) to create the database instance.I Kept it in $ORACLE_HOME/assistant/dbca/template/,after running DBCA it was loaded with details mentioned in it ,but at the second last step when i try to see initialization parameters control file ,datafile and tablespace detail was not mentioned.when it started database creation ,got hanged on 5% completion showing failure in processing system parameters. Is it the right way to create database using DBCA?what should I do to create database using template?
View 1 Replies
View Related
Feb 24, 2007
the relationship on my script.What I want to do is make it possible to assign many courses to a student.But I have read a few books on foreign keys and primary keys, and I still dont get how to go on doing this....
This is how the table creation with the keys looks right now...
CREATE TABLE CAMPUS (
CAMPUSID NUMBER(4) NOT NULL,
NAME VARCHAR2(80) NOT NULL,
CONSTRAINT CAMPUS_PK PRIMARY KEY (CAMPUSID));
[code]...
View 3 Replies
View Related
Aug 17, 2010
I need to create a temp table within a stored procedure. I want to apply some logic on the table, and then delete it when it is completed in runtime -- all inside the stored procedure.
View 13 Replies
View Related
Nov 28, 2010
I have a requirement to create the table monthly.The tablename will be the o/p of the following select query.
select 'TBR_AND_SECURITY_DEPOSIT'||TO_CHAR(sysdate, 'Monyy') from dual
I am trying to create the table for creating the backup of the existing table TBR_AND_SECURITY_DEPOSIT.
create table (select 'TBR_AND_SECURITY_DEPOSIT'||TO_CHAR(sysdate, 'Monyy') from dual) select * from TBR_AND_SECURITY_DEPOSIT
but it is throwing error as invalid table name.
View 2 Replies
View Related
May 6, 2010
I want to create a table, whose first column , patient_id, should be a sequence.
View 9 Replies
View Related
Jan 25, 2013
How to create the sequence which gives following values
1
0
1
0
1
0
when we excite the following query , it has to give the above results
select seq.nextval from dual
View 5 Replies
View Related
Aug 22, 2011
is it Possible to Assign the Sequence Name During the Table Creation.
View 1 Replies
View Related