Subject | Problem with scripts |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2002-02-18T14:27:10Z |
Hi!
I want to run following script in IBO4.2Fp TIB_SCript (I'm hacking ISC4)
CREATE TABLE USERS2 (
USER_NAME USER_NAME,
SYS_USER_NAME USER_NAME,
GROUP_NAME USER_NAME,
UID UID,
GID GID,
PASSWD PASSWD,
PRIVILEGE PRIVILEGE,
COMMENT COMMENT,
FIRST_NAME NAME_PART,
MIDDLE_NAME NAME_PART,
LAST_NAME NAME_PART,
FULL_NAME COMPUTED BY (first_name || _UNICODE_FSS ' ' || middle_name || _UNICODE_FSS ' ' || last_name ));
INSERT INTO USERS2
(USER_NAME, SYS_USER_NAME, GROUP_NAME, UID, GID, PASSWD, PRIVILEGE, COMMENT, FIRST_NAME, MIDDLE_NAME, LAST_NAME)
SELECT
USER_NAME, SYS_USER_NAME, GROUP_NAME, UID, GID, PASSWD, PRIVILEGE, COMMENT, FIRST_NAME, MIDDLE_NAME, LAST_NAME
FROM USERS;
COMMIT;
DROP TABLE USERS;
CREATE UNIQUE INDEX USER_NAME_INDEX2 ON USERS2(USER_NAME);
.. and I get error "USERS2 not found". When I include commit after CREATE TABLE, it seems to be working ok, except I can't access my databases (and ISC4) anymore - the ISC4 is screwed up.
When I run the same script using IBAdmin it works perfectly and ISC4 is also OK.
What can be differents?
Riho-Rene Ellermaa
senior programmer
Hansabank
I want to run following script in IBO4.2Fp TIB_SCript (I'm hacking ISC4)
CREATE TABLE USERS2 (
USER_NAME USER_NAME,
SYS_USER_NAME USER_NAME,
GROUP_NAME USER_NAME,
UID UID,
GID GID,
PASSWD PASSWD,
PRIVILEGE PRIVILEGE,
COMMENT COMMENT,
FIRST_NAME NAME_PART,
MIDDLE_NAME NAME_PART,
LAST_NAME NAME_PART,
FULL_NAME COMPUTED BY (first_name || _UNICODE_FSS ' ' || middle_name || _UNICODE_FSS ' ' || last_name ));
INSERT INTO USERS2
(USER_NAME, SYS_USER_NAME, GROUP_NAME, UID, GID, PASSWD, PRIVILEGE, COMMENT, FIRST_NAME, MIDDLE_NAME, LAST_NAME)
SELECT
USER_NAME, SYS_USER_NAME, GROUP_NAME, UID, GID, PASSWD, PRIVILEGE, COMMENT, FIRST_NAME, MIDDLE_NAME, LAST_NAME
FROM USERS;
COMMIT;
DROP TABLE USERS;
CREATE UNIQUE INDEX USER_NAME_INDEX2 ON USERS2(USER_NAME);
.. and I get error "USERS2 not found". When I include commit after CREATE TABLE, it seems to be working ok, except I can't access my databases (and ISC4) anymore - the ISC4 is screwed up.
When I run the same script using IBAdmin it works perfectly and ISC4 is also OK.
What can be differents?
Riho-Rene Ellermaa
senior programmer
Hansabank