Home » RDBMS Server » Server Utilities » wrap utility causing problems (oracle 10g)
wrap utility causing problems [message #392721] |
Thu, 19 March 2009 01:16 |
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
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Jan 11 09:14:10 CST 2025
|