I have an After insert or Update trigger that works correctly if I run the scripts (insert into ...) but if I update or insert a record manually directly from the data tab in sql developer the trigger does not work. it is possible to enable?
Thanks
Related
I have created a stored PL/SQL procedure on the DB which needs to delete rows with certain conditions. It is called by an ODI12c procedure, code is in the 'target code' section and is without any parameters:
BEGIN
schema.delete_from_tables;
END;
When I run it through ODI with the ODI agent, it finishes successfully in the operator, but doesn't actually delete the records.
But when I call the same procedure through ODI but with the local agent, it deletes the records; so does when I call it directly in the database.
The user through which the agent makes the connection is the same with which I log in the DB.
Autocommit is 'on', but there's also COMMIT in the stored procedure itself.
The user of the ODI master repository was also granted DELETE on all tables; the agent was restarted - no change.
As a comparison - there are other existing truncate procedures, stored in the same schema and called in the same way through the ODI agent and they work.
Any other suggestions would be helpful, thanks!
I am using liquibase 4.3.3 to insert data to H2 DB using yaml changeset. But, when I try to start the server I get table not found while inserting even though the table exists. But, if I use the generated insert statement and disable liquibase and use spring.sql.init.data-locations to specify the sql file having insert SQL statement, this works. Can you please help me out with this weird problem?
How or is there a way to automatically run my SELECT statement on a scheduled time? For example, I want my monitoring query to run every 1PM and 8PM. Since this will be done daily, can it be run automatically and just view the results from a csv/excel file or from the result tab? My tool is Oracle SQL Developer.
Usually, we schedule a database job. It can be done using DBMS_SCHEDULER (preferably, especially in latest database versions) or DBMS_JOB (simpler to use).
For example:
create a stored procedure which does the job and inserts the result into some table
schedule it to run at desired times
don't forget to store the timestamp!
any time you want, run select * from some_table to view the result
You can run them via SQLPlus and spool to file. Create a shell script with SQL Plus code in your operating system and use you OS scheduler to run it periodically. Then you can open files and view results.
I have not used oracle with EF before, so I dont know how to deal with this weird thing happening. And cant find solutions online.
When I make changes on SQLdeveloper (updates/inserts) using sql, they are shown in SQLdeveloper, but not in app using EF.
When I make changes in EF, those are shown in SQLdeveloper.
In other words the APP shows data only from EF, but on SQLdeveloper I can see both.
I have restarted the app multiple times and they are still not showing.
EDIT:
By make changes I mean any data changes. Like :
insert into table
(columns)
values(values);
And SQLdeveloper says inserted 1 row.
And when I select * from table I see the row.
In the app, when I do inspect of context.TableSET.ToList() the row is not there.
but if I do
context.TableSET.Add(tableobj);
context.SaveChanges();
I can see the row using SQLdeveloper
You need to execute the COMMIT statement after executing your changes so that it gets reflected in another session.
EF is using another session and Without COMMIT, changes are only reflected in the current session, That is why it is visible in SQL Developer and not in EF.
Cheers!!
I am trying to alter a table by adding a column, but it's giving the following error:
ALTER TABLE TUSER
ADD CREATED_BY VARCHAR2(250)
SQL Error: ORA-14411: The DDL cannot be run concurrently with other DDLs
How to unlock the resource which is causing this error?
A little old question, but found another solution.
Looks like this error also can occur due to deadlock in the table (many users working on the same table, etc.)
So you can kill sessions via then menu: Tools --> Monitor Sessions --> Choose selection.
There you should see a table with all running commands, the command, the user and more.
Right click --> Kill session.
Link to Oracle documentation
My colleague had the same problem in the Oracle SQL developer, he executed a DDL statement and the machine was taking forever. Somehow it was not reachable, and after some time it responded again. No idea what happened and my colleague called me for help.
After the machine answered again he tried to execute the same statement which returned an ORA-14411.
The solution was to just click rollback in the same prompt-frame, and after that we were able to re-execute the same statement successfully.
try this:
ALTER TABLE TUSER
RENAME TO new_TUSER;
ALTER TABLE new_TUSER
ADD (CREATED_BY VARCHAR2(250));
ALTER TABLE new_TUSER
RENAME TO TUSER;