Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem adding database schema , eroor : not connected

legolas_wAug 19 2006 — edited Aug 25 2006
Thank you for reading my post
I download the demo sample from oracle soa web site . and i am trying to follow the tutorial to
create the database schema, to make this step complete
I create oracle_home and oracle_SID variables (Windows OS )
then
I open an sqlplus session (sys/pass as sysdba) and to make sure that i am
connected i execute

select * from V$database ;

it works

then i execute :

select * from hr.jobx

it works file.


it mean that i am connected to database.

but when i execute @build.sql i get the following errors , can some one help me ?
i should say that after i execute the @build.sql i can not execute any command because it says that SP2-0640:Not connected
SQL> @build.sql
old   1: DROP USER &&1 CASCADE
new   1: DROP USER SOADEMO CASCADE
DROP USER SOADEMO CASCADE
          *
ERROR at line 1:
ORA-01918: user 'SOADEMO' does not exist


SP2-0734: unknown command beginning "DEFAULT TA..." - rest of line ignored.
SP2-0734: unknown command beginning "TEMPORARY ..." - rest of line ignored.
SP2-0734: unknown command beginning "QUOTA UNLI..." - rest of line ignored.
SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
SP2-0734: unknown command beginning ", create p..." - rest of line ignored.
SP2-0734: unknown command beginning ", create s..." - rest of line ignored.
SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ", create v..." - rest of line ignored.
SP2-0734: unknown command beginning ", create s..." - rest of line ignored.
SP2-0734: unknown command beginning ", alter se..." - rest of line ignored.
SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ", create m..." - rest of line ignored.
SP2-0734: unknown command beginning ", query re..." - rest of line ignored.
SP2-0734: unknown command beginning ", create d..." - rest of line ignored.
SP2-0734: unknown command beginning ", create a..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ", alter us..." - rest of line ignored.
SP2-0734: unknown command beginning ", resumabl..." - rest of line ignored.
SP2-0734: unknown command beginning ", ALTER AN..." - rest of line ignored.
SP2-0734: unknown command beginning ", DROP ANY..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ", LOCK ANY..." - rest of line ignored.
SP2-0734: unknown command beginning ", CREATE A..." - rest of line ignored.
SP2-0734: unknown command beginning ", SELECT A..." - rest of line ignored.
SP2-0042: unknown command "TO &&1" - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ", execute_..." - rest of line ignored.
SP2-0042: unknown command "TO &&1" - rest of line ignored.
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
drop table 'ITEMS'
SP2-0640: Not connected
drop table 'ADDRESS'
SP2-0640: Not connected
drop table 'CUSTOMER'
SP2-0640: Not connected
drop table 'ORDERS'
SP2-0640: Not connected
drop table 'PRODUCT'
SP2-0640: Not connected
drop table 'CUSTOMER_ADDRESS'
SP2-0640: Not connected
drop sequence 'EJB_SEQ_ID_GEN'
SP2-0640: Not connected
drop sequence 'ADDRESS_EJB_SEQ_ID_GEN'
SP2-0640: Not connected
drop sequence 'ORDER_SEQ_ID_GEN'
SP2-0640: Not connected
drop table 'SSN'
SP2-0640: Not connected
SP2-0640: Not connected
create table 'ITEMS'
SP2-0640: Not connected
create table 'ADDRESS'
SP2-0640: Not connected
create table 'CUSTOMER'
SP2-0640: Not connected
create table 'CUSTOMER_ADDRESS'
SP2-0640: Not connected
create table 'ORDERS'
SP2-0640: Not connected
create table 'PRODUCT'
SP2-0640: Not connected
create primary key constraint on 'ITEMS'
SP2-0640: Not connected
create primary key constraint on 'ADDRESS'
SP2-0640: Not connected
create primary key constraint on 'CUSTOMER'
SP2-0640: Not connected
create primary key constraint on 'ORDERS'
SP2-0640: Not connected
create primary key constraint on 'PRODUCT'
SP2-0640: Not connected
create foreign key constraint on 'ITEMS'
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
create foreign key constraint on 'ORDERS'
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
What OBJECTS were created?
SP2-0734: unknown command beginning ",object_na..." - rest of line ignored.
SP2-0734: unknown command beginning "from       user..." - rest of line ignored.

SP2-0734: unknown command beginning "order by 1..." - rest of line ignored.
Are there any INVALID OBJECTS?
SP2-0734: unknown command beginning ",object_na..." - rest of line ignored.
SP2-0734: unknown command beginning "from       user..." - rest of line ignored.

SP2-0734: unknown command beginning "where      sta..." - rest of line ignored.

Comments

21205
Answer
Welcome to the forum!

You can't pass the complete row
you can pass individual column values, so it would be something like
create or replace trigger logTrigger after update on test_table for each row
begin
   logProcedure(:old.col1, :new.col1);
end;
Marked as Answer by herzal · Sep 27 2020
21205
or something like this
create or replace trigger logTrigger after update on test_table for each row
declare
   old_row test_table%rowtype;
   new_row test_table%rowtype;
begin
   old_row.col1 := :old.col1;
   ....
   new_row.col1 := :new.col1;

   logProcedure(old_row, new_row);
end;
herzal
wow, that was quick o_O

thanks for your reply.

I'll explain my problem: we have more than 300 tables and every insert/update/delete should be logged, so I need more than 300 triggers. I want to avoid that the trigger has to be rewritten every time the structure of the table changes. So I thouht I use a trigger and a log-procedure. The only things the trigger does are checking if the log-procedure is up2date, recreating the log-procedure if necessary, and calling the log-procedure with :old and :new as parameters.

But since that doesn't work: any suggestions how to solve that?

thanks for your help =) (sitting here with my stop watch)
21205
Before writing your own implementation, check auditing.


sorry for the delay, but I had to run out do some groceries, feed the cat and debug some applications...
;)

Edited by: Alex Nuijten on Aug 13, 2009 1:03 PM
21205
maybe something like http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm#sthref1769
herzal
thanks your your help, Alex =) but auditing is no option. I think I will end up using a DDL-trigger that recreates the log-triggers and then the log-triggers do the logging.
21205
doing it with DDL triggers might proof quite tricky.
It would be pretty straight forward to write your own generator to create these triggers. Or take a look at codegen, a utility to generate source code.
http://codegen.inside.quest.com/index.jspa
herzal
thanks, I will have a look ;)
1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 22 2006
Added on Aug 19 2006
2 comments
9,183 views