Home » RDBMS Server » Server Utilities » importing packages...!
importing packages...! [message #135010] Mon, 29 August 2005 07:59 Go to next message
balavignesh
Messages: 180
Registered: March 2005
Senior Member
hai all,

we need to import some packages from the export dump taken.the dump has 6 files of 2g each. is there any way to import only the needed packages from the export dump..? or we need to import the entire export dump...? plz help out...!

regards
bala
Re: importing packages...! [message #135012 is a reply to message #135010] Mon, 29 August 2005 08:10 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
during import use
SHOW=y LOG=somefile.log

Import will not actually done. Instead , the DDL of all objects are dumped.
This somefile.log the will have the DDL for the package you want.
Extract that ddl and recreate the package in target.

Re: importing packages...! [message #135053 is a reply to message #135010] Mon, 29 August 2005 11:58 Go to previous messageGo to next message
balavignesh
Messages: 180
Registered: March 2005
Senior Member
hai mahesh,

thanks a lot.

while recreating package it was successfull but when creating the package body it gives that the "package body created with compilation errors as warning".how to resolve this..?

the following is the PL/SQL code
--------------------------------
create PACKAGE BODY pack_user AS
PROCEDURE PROC_SETUSERGRP(nGrpid LOOKUP_USERGRPS.grpid%TYPE,
sGrpname LOOKUP_USERGRPS.grpname%TYPE,
sActive LOOKUP_USERGRPS.active%TYPE)
IS
BEGIN
IF nGrpid IS NULL THEN
INSERT INTO Lookup_UserGrps VALUES (SEQ_LOOKUP_USERGRPS.NextVal, sGrpNam
e, PACK_UTILITY.f_getcurpracid, sActive);

ELSE
UPDATE Lookup_UserGrps SET Active = sActive WHERE Grpid = nGrpid;
END IF;
END;

END pack_user;

-----------------------------------------

help out..

bala
Re: importing packages...! [message #135054 is a reply to message #135053] Mon, 29 August 2005 12:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
and what are the errors?

copy the source code into something.sql
execute something.sql in sqlplus
it should say
'package body created with compilation errors'
now issue show errors.
Re: importing packages...! [message #135055 is a reply to message #135054] Mon, 29 August 2005 12:16 Go to previous messageGo to next message
balavignesh
Messages: 180
Registered: March 2005
Senior Member
SQL> show errors
Errors for PACKAGE BODY PACK_USER:

LINE/COL ERROR
-------- -----------------------------------------------------------------
8/9 PL/SQL: SQL Statement ignored
8/82 PL/SQL: ORA-00917: missing comma


Re: importing packages...! [message #135056 is a reply to message #135055] Mon, 29 August 2005 12:25 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>8/82 PL/SQL: ORA-00917: missing comma
You know what it means.
right?


May be this a mistake with your editor?
>> IF nGrpid IS NULL THEN
>>INSERT INTO Lookup_UserGrps VALUES (SEQ_LOOKUP_USERGRPS.NextVal, sGrpNam
>>e,
PACK_UTILITY.f_getcurpracid, sActive);

it is supposed to be
IF nGrpid IS NULL THEN
INSERT INTO Lookup_UserGrps VALUES (SEQ_LOOKUP_USERGRPS.NextVal, sGrpName, PACK_UTILITY.f_getcurpracid, sActive);

[Updated on: Mon, 29 August 2005 12:25]

Report message to a moderator

Re: importing packages...! [message #135058 is a reply to message #135056] Mon, 29 August 2005 12:52 Go to previous messageGo to next message
balavignesh
Messages: 180
Registered: March 2005
Senior Member
even after correcting it blows........!

create PACKAGE BODY pack_user AS
PACKAGE BODY pack_user IS
PROCEDURE PROC_SETUSERGRP(nGrpid LOOKUP_USERGRPS.grpid%TYPE,
sGrpname LOOKUP_USERGRPS.grpname%TYPE,
sActive LOOKUP_USERGRPS.active%TYPE)
IS
BEGIN
IF nGrpid IS NULL THEN
INSERT INTO Lookup_UserGrps VALUES (168,sGrpName,651,sActive);

ELSE
UPDATE Lookup_UserGrps SET Active = sActive WHERE Grpid = nGrpid;
END IF;
END;

-- Enter further code below as specified in the Package spec.
END pack_user;

-----------
LINE/COL ERROR
-------- -----------------------------------------------------------------
17/4 PLS-00103: Encountered the symbol "end-of-file" when expecting
one of the following:
begin end function package pragma procedure form
Re: importing packages...! [message #135059 is a reply to message #135058] Mon, 29 August 2005 12:59 Go to previous message
balavignesh
Messages: 180
Registered: March 2005
Senior Member
hai mahesh,

thanks a lot ...!

i could able to create the package body with out errors...!

bala
Previous Topic: How to import from a different instance
Next Topic: how to import .dmp into oracle 9i
Goto Forum:
  


Current Time: Thu Jul 04 06:11:15 CDT 2024