Florent Guiliani | 7 Dec 2005 14:53

Re: inital_insert.sql and Oracle

Florent Guiliani a écrit :

>
> current_timestamp doesn't exist, Oracle use instead sysdate.

after replaced all current_timestamp with sysdate, others statments are 
invalids because some right-quote are missing.
Here is the patch in attachment.

Florent,

--- initial_insert.sql.orig	Wed Dec  7 14:52:34 2005
+++ initial_insert.sql	Wed Dec  7 14:52:45 2005
 <at>  <at>  -240,456 +240,480  <at>  <at> 
 INSERT INTO valid
     (name, create_by, create_time, change_by, change_time)
     VALUES
-    ('valid', 1, current_timestamp, 1, current_timestamp);
+    ('valid', 1, sysdate, 1, sysdate);
 INSERT INTO valid
     (name, create_by, create_time, change_by, change_time)
     VALUES
-    ('invalid', 1, current_timestamp, 1, current_timestamp);
+    ('invalid', 1, sysdate, 1, sysdate);
 INSERT INTO valid
     (name, create_by, create_time, change_by, change_time)
     VALUES
-    ('invalid-temporarily', 1, current_timestamp, 1, current_timestamp);
(Continue reading)

Martin Edenhofer | 7 Dec 2005 15:04

Re: inital_insert.sql and Oracle

Hi Florent,

Florent Guiliani schrieb:

>> current_timestamp doesn't exist, Oracle use instead sysdate.
> 
> 
> after replaced all current_timestamp with sysdate, others statments are 
> invalids because some right-quote are missing.
> Here is the patch in attachment.

No. It works fine for me. Just use it like:

shell> cat scripts/database/otrs-schema.oracle.sql | sqlplus "user/pw"
shell> cat cripts/database/initial_insert.sql | sqlplus "user/pw"

> Florent,

  -Martin
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Florent Guiliani | 7 Dec 2005 15:12

Re: inital_insert.sql and Oracle

Martin Edenhofer a écrit :

> Hi Florent,
>
> Florent Guiliani schrieb:
>
>>> current_timestamp doesn't exist, Oracle use instead sysdate.
>>
>>
>>
>> after replaced all current_timestamp with sysdate, others statments 
>> are invalids because some right-quote are missing.
>> Here is the patch in attachment.
>
>
> No. It works fine for me. Just use it like:
>
> shell> cat scripts/database/otrs-schema.oracle.sql | sqlplus "user/pw"
> shell> cat cripts/database/initial_insert.sql | sqlplus "user/pw"

I'm using Oracle 8.1.7.4 and current_timestamp or initial_insert.sql are 
not working :(

Another defect in otrs-schema-post.oracle.sql:
ALTER TABLE valid ADD CONSTRAINT fk_valid_create_by_id FOREIGN KEY 
(create_by) REFERENCES system_user(id);

This statments failed because after initial_insert.sql, the table 
system_user contains the Admin user and his ID is 3 not 1.

(Continue reading)

Martin Edenhofer | 7 Dec 2005 15:21

Re: inital_insert.sql and Oracle

Hi Florent,

Florent Guiliani schrieb:
>> No. It works fine for me. Just use it like:
>>
>> shell> cat scripts/database/otrs-schema.oracle.sql | sqlplus "user/pw"
>> shell> cat cripts/database/initial_insert.sql | sqlplus "user/pw"
> 
> I'm using Oracle 8.1.7.4 and current_timestamp or initial_insert.sql are 
> not working :(

So you have to upgrade orcale. :)

> Another defect in otrs-schema-post.oracle.sql:
> ALTER TABLE valid ADD CONSTRAINT fk_valid_create_by_id FOREIGN KEY 
> (create_by) REFERENCES system_user(id);
> 
> This statments failed because after initial_insert.sql, the table 
> system_user contains the Admin user and his ID is 3 not 1.

No. On a fresh inital setup the trigger starts with 1. So the default 
admin id is 1 (because it's the first created user).

  -=> You have to reset your trigger counter.

> Florent,

   Martin

((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing
(Continue reading)

Florent Guiliani | 7 Dec 2005 15:27

Re: inital_insert.sql and Oracle

Martin Edenhofer a écrit :

>> I'm using Oracle 8.1.7.4 and current_timestamp or initial_insert.sql 
>> are not working :(
>
>
> So you have to upgrade orcale. :)

Thank you for your help but I must use 8.1.7.4 for others applications, 
so I will use PostgreSQL for OTRS.

You should update documentation, Oracle 9i is the minimum.

>
> No. On a fresh inital setup the trigger starts with 1. So the default 
> admin id is 1 (because it's the first created user).

>
>  -=> You have to reset your trigger counter.

Exactly, It's my fault sorry :(

Florent,

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

(Continue reading)

Martin Edenhofer | 7 Dec 2005 16:10

Re: inital_insert.sql and Oracle

Hi Florent,

Florent Guiliani schrieb:
>>> I'm using Oracle 8.1.7.4 and current_timestamp or initial_insert.sql 
>>> are not working :(
>>
>>
>> So you have to upgrade orcale. :)
> 
> Thank you for your help but I must use 8.1.7.4 for others applications, 
> so I will use PostgreSQL for OTRS.
> 
> You should update documentation, Oracle 9i is the minimum.

Yes. We'll do that.

PS: There is also a FAQ article howto setup OTRS on postgresql.

   -> http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ID=53

> Florent,

   Martin

((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing
   Fon: +49 (0) 9421 1862 760 :: Fax: +49 (0) 9421 1862 769
     http://www.otrs.com/ :: Communication with success!
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
(Continue reading)

Florent Guiliani | 7 Dec 2005 15:19

Re: inital_insert.sql and Oracle

Florent Guiliani a écrit :

> I'm using Oracle 8.1.7.4 and current_timestamp or initial_insert.sql 
> are not working :(
>
> Another defect in otrs-schema-post.oracle.sql:
> ALTER TABLE valid ADD CONSTRAINT fk_valid_create_by_id FOREIGN KEY 
> (create_by) REFERENCES system_user(id);
>
> This statments failed because after initial_insert.sql, the table 
> system_user contains the Admin user and his ID is 3 not 1.

Perhaps this failure is due to my many attemps to execute the script... 
never mind I will update system_user manuelly...

But if OTRS is using current_timestamp so OTRS is not supporting Oracle 8 ?

Florent,

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev


Gmane