Home » RDBMS Server » Server Utilities » wrap utility causing problems (oracle 10g)
wrap utility causing problems [message #392721] Thu, 19 March 2009 01:16 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
Hi,
wrapping the code in oracle 10g causing the problems.
CREATE OR REPLACE FUNCTION VWIsExists(PARAMS VARCHAR2) RETURN INT As
	TExist	INT;
begin
	BEGIN
		EXECUTE IMMEDIATE(PARAMS) INTO TExist;
		EXCEPTION
			WHEN NO_DATA_FOUND THEN
				RETURN(0);
				NULL;
			WHEN OTHERS THEN
				RETURN(0);
				NULL;
	END;
	RETURN(TExist);
end;
/
Insert Into VWVerRev(Name,Type,Version,Revision) values('DISPOSALACTIONLOOKUP',0,'6.0','0')
/
BEGIN IF(0=VWIsExists('Select Count(TName) From tab Where TName =' ||CHR(39) || 'DISPOSALACTIONLOOKUP' || CHR(39))) THEN 
EXECUTE IMMEDIATE('CREATE Table DisposalActionLookUp
(
DisposalActionid NUMBER(10,0)	NOT NULL,
Description	 VARCHAR2(255)	NOT NULL
)'); 
END IF; 
END;
/
ALTER Table DisposalActionLookUp ADD CONSTRAINT DisposalActionLookUp_id PRIMARY KEY (DisposalActionid) 
/
Insert Into VWVerRev(Name,Type,Version,Revision) values('DOCTYPERETENTIONSETTING',0,'6.0','0')
/
BEGIN IF(0=VWIsExists('Select Count(TName) From tab Where TName =' ||CHR(39) || 'DOCTYPERETENTIONSETTING' || CHR(39))) THEN 
EXECUTE IMMEDIATE('CREATE Table DoctypeRetentionSetting
(
id  			NUMBER(10,0)		NOT NULL ,
DocTypeid 		NUMBER(10,0)  		NOT NULL ,
EnableRetention		NUMBER(10,0)		NOT NULL ,
RetentionPeriod		NUMBER(10,0)		NOT NULL ,
RetentionPeriodStartsid	NUMBER(10,0)		NOT NULL ,
DisposalActionid	NUMBER(10,0)		NOT NULL ,
MoveDocLocation		VARCHAR2(255)		NOT NULL ,
PolicyCreatedDate	VARCHAR2(35)		NOT NULL
)');
END IF;
END;
/
ALTER Table DoctypeRetentionSetting ADD CONSTRAINT FK_DisposalActionLookup_id FOREIGN Key (DisposalActionid) REFERENCES DisposalActionLookup(DisposalActionid) ON DELETE CASCADE
/
Insert Into VWVerRev(Name,Type,Version,Revision) values('ARSPROCESSEDDOCS',0,'6.0','0')
/
BEGIN IF(0=VWIsExists('Select Count(TName) From tab Where TName =' ||CHR(39) || 'ARSPROCESSEDDOCS' || CHR(39))) THEN 
EXECUTE IMMEDIATE('CREATE Table ARSProcessedDocs
(
id		NUMBER(10,0) NOT NULL , 
Docid		NUMBER(10,0) NOT NULL ,
UserName	VARCHAR2(50) NOT NULL ,
ProcessedDate	VARCHAR2(35) NOT NULL ,
SessionKey	VARCHAR2(50) NOT NULL ,
LocationName	VARCHAR2(50) NOT NULL ,
Type		NUMBER(10,0) NOT NULL
)'); 
END IF; 
END;
/
BEGIN IF(0=VWIsExists('Select Count(SEQUENCE_NAME) From user_sequences Where sequence_name=' ||CHR(39) || 'SEQ_PROCESSEDDOCS_ID' || CHR(39))) THEN 
EXECUTE IMMEDIATE('CREATE SEQUENCE SEQ_PROCESSEDDOCS_ID 
INCREMENT BY 1 
START WITH 1 
MAXVALUE 999999999
MINVALUE 1 
ORDER
CYCLE
CACHE 20');
END IF;
END;
/
BEGIN IF(1=VWIsExists('select count(column_name) from user_tab_columns where table_name=' || CHR(39) || 'DOCUMENT' || CHR(39) || ' and column_name=' || CHR(39) || 'CREATED' || CHR(39))) THEN EXECUTE IMMEDIATE('Alter Table Document Modify (Created Default TO_CHAR(SYSDATE,''yyyy-MM-dd hh24:MI:ss''))'); END IF; END;
/
BEGIN IF(1=VWIsExists('select count(column_name) from user_tab_columns where table_name=' || CHR(39) || 'DOCUMENT' || CHR(39) || ' and column_name=' || CHR(39) || 'MODIFIED' || CHR(39))) THEN EXECUTE IMMEDIATE('Alter Table Document Modify (Modified Default TO_CHAR(SYSDATE,''yyyy-MM-dd hh24:MI:ss''))'); END IF; END;
/
BEGIN IF(1=VWIsExists('select count(column_name) from user_tab_columns where table_name=' || CHR(39) || 'NODEINDEXRULES' || CHR(39) || ' and column_name=' || CHR(39) || 'CREATED' || CHR(39))) THEN EXECUTE IMMEDIATE('Alter Table NodeIndexRules Modify (Created Default TO_CHAR(SYSDATE,''yyyy-MM-dd hh24:MI:ss''))'); END IF; END;
/
BEGIN IF(1=VWIsExists('select count(column_name) from user_tab_columns where table_name=' || CHR(39) || 'CUSTOMLIST' || CHR(39) || ' and column_name=' || CHR(39) || 'CREATED' || CHR(39))) THEN EXECUTE IMMEDIATE('Alter Table CustomList Modify (Created Default TO_CHAR(SYSDATE,''yyyy-MM-dd hh24:MI:ss''))'); END IF; END;
/


i have given like wrap iname=orasript.ora oname=orasript.vww
same code working with oracle 9i but not with oracle 10g wjy?
exceptions are like
Extracting ViewWise SQL Objects:...1352
Executing ViewWise SQL Objects:...292/1352
Count(TName) ==> ORA-06550: line 1, column 12:
PLS-00905: object ROOM2020.VWISEXISTS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Executing ViewWise SQL Objects:...
Count(TName) ==> ORA-06550: line 1, column 12:
PLS-00905: object ROOM2020.VWISEXISTS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Executing ViewWise SQL Objects:...
Count(TName) ==> ORA-06550: line 1, column 12:
PLS-00905: object ROOM2020.VWISEXISTS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Executing ViewWise SQL Objects:...
Count(SEQUENCE_NAME) ==> ORA-06550: line 1, column 12:
PLS-00905: object ROOM2020.VWISEXISTS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Executing ViewWise SQL Objects:...302/1352
Count(SEQUENCE_NAME) ==> ORA-06550: line 1, column 12:
PLS-00905: object ROOM2020.VWISEXISTS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored



can anyone suggest me why it is happening in oracle 10g and not in 9i
Re: wrap utility causing problems [message #392730 is a reply to message #392721] Thu, 19 March 2009 01:53 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
Are there any third-party replacements for the Wrap utility?
Because its paining nearly i searched tis for 10 days i am unable to do it.Hope will get a perfect solution for this
Re: wrap utility causing problems [message #392751 is a reply to message #392730] Thu, 19 March 2009 03:45 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Quote:
object ROOM2020.VWISEXISTS is invalid


Check your invalid objects in 10g.
Re: wrap utility causing problems [message #392756 is a reply to message #392751] Thu, 19 March 2009 03:51 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
all the objects here are valid ones
Re: wrap utility causing problems [message #392775 is a reply to message #392721] Thu, 19 March 2009 04:47 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
With the presented code,
I cannot reproduce your case. What is the exact oracle version?
And I do not understand what you are trying to accomplish here.
None, except the function code will be wrapped, even in 9i.
Either you are not telling us the whole story
or
we are completely missing something.
Re: wrap utility causing problems [message #392830 is a reply to message #392775] Thu, 19 March 2009 07:51 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
i am using oracle 10g release 1.
Re: wrap utility causing problems [message #392873 is a reply to message #392830] Thu, 19 March 2009 09:23 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Seems you are repeating yourself from the old thread
http://www.orafaq.com/forum/m/385289/42800/#msg_385289

Unless you are answer the questions that are already asked or tried the methods suggested,
there is nothing new I can offer.
Also, you should have continued with old thread. Opening new one is just a waste of time.
Previous Topic: Trnasportable Tablespace
Next Topic: Error in Loading Data with SQLLDR in Oracle 10G
Goto Forum:
  


Current Time: Sun Apr 28 14:36:43 CDT 2024