PDA

View Full Version : Error running Oracle scripts



paulpot
08-02-2005, 03:20 PM
I have created an MSI installer and am having problems running the SQL scripts. During the install of the program, I keep getting errors when the scripts are ran. I first got the error that there was an invalid character so I removed the semicolons from the end of each line. However, I am still getting various error messages. The scripts runs fine again the Oracle database when there are ran from sqlplus. It seems that InstallShield is unable to interpret the scripts correctly. Or am I doing something wrong?

Below is one of the scripts that keep getting errors: I have removed the semicolons.

Any help is appreciated.

PaulaPot

CREATE SEQUENCE NEWPRODUCTTREEKEY INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQDWBATCHREG INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQSAMPLETESTS INCREMENT BY 1 START WITH 1 MAXVALUE 9999999 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQ_DW_ALERTS INCREMENT BY 1 START WITH 1 MAXVALUE 9999 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQ_DW_BATCHREG INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQ_DW_BATCH_SPECIFICATION INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQ_DW_JOBS INCREMENT BY 1 START WITH 1 MAXVALUE 9999 NOCYCLE CACHE 20 NOORDER
CREATE SEQUENCE SEQ_DW_SAMPLE INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER

hidenori
08-04-2005, 04:17 PM
InstallShield uses the "GO" statement as a batch separator. Please insert the batch separator after every CREATE SEQUENCE statement and let me know if it solves the problem.

CREATE SEQUENCE NEWPRODUCTTREEKEY INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQDWBATCHREG INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQSAMPLETESTS INCREMENT BY 1 START WITH 1 MAXVALUE 9999999 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQ_DW_ALERTS INCREMENT BY 1 START WITH 1 MAXVALUE 9999 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQ_DW_BATCHREG INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQ_DW_BATCH_SPECIFICATION INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQ_DW_JOBS INCREMENT BY 1 START WITH 1 MAXVALUE 9999 NOCYCLE CACHE 20 NOORDER
GO
CREATE SEQUENCE SEQ_DW_SAMPLE INCREMENT BY 1 START WITH 1 NOCYCLE CACHE 20 NOORDER
GO

MHolmes
11-15-2005, 11:05 AM
You mean to tell me that IS forces you to use GO as your batch seperator in Oracle? The native Oracle batch seperator is /, which, btw, does not work. It fails at the Microsoft ODBC driver.

I am hoping this is a Microsoft thing and not an InstallShield thing, because it's just shoddy not to support Oracle's native batch seperator.

hidenori
11-28-2005, 01:54 PM
The batch separator is not a SQL statement; it is a command recognized by the SQL utilities. SQL utilities interpret it as a signal that they should send the current batch of SQL statements to a database server. In InstallShield 11.5, you will be able to specify a preferred string for the batch separator.