This discussion is archived
5 Replies Latest reply: Mar 9, 2013 5:32 AM by EdStevens RSS

unable to update database after delete table content

995374 Newbie
Currently Being Moderated
hi....
for my project...using myeclipse10& oracle10g ...i am importing _.dmp file_...& /as sysdba create new user as avi/avi ....But whenever i try to delete record from table in sql it is deleted and after commit....it will not reflect in **my project database where all data is as it is** so plz tell me how to delete data in sql that reflect in my project database also....
plzzzz give solution
  • 1. Re: unable to update database after delete table content
    606331 Explorer
    Currently Being Moderated
    Hi,

    try like below as like example provided....

    SQL> conn dummy/dummy
    Connected.
    SQL> create table temp as select * from all_objects;

    Table created.

    SQL> select count(*) from temp;

    COUNT(*)
    ----------
    49703

    SQL> delete from temp where mod(object_id,2) = 0;

    24815 rows deleted.

    SQL> commit;

    Commit complete.

    SQL> select count(*) from temp;

    COUNT(*)
    ----------
    24888

    SQL>


    thanks,
    DBC,
    Sr DBA.
  • 2. Re: unable to update database after delete table content
    John Stegeman Oracle ACE
    Currently Being Moderated
    plzzzz give solution
    First suggestion is to solve the major problem you have of bees in your keyboard.

    After you do that...

    Why would you expect that deleting data from one database is going to delete data in some other completely unrelated database (which your project database is)? If you want the things kept in sync, you have a few options:

    1). use something like dataguard (which doesn't seem to fit your use case, based on what I can glean from your disjointed posting)

    2). Refresh your project database from the main database on a regular basis (either by backup/restore or expdp/impdp)

    3). Post something that explains what you are trying to do and why so we can give you some proper assistance.
  • 3. Re: unable to update database after delete table content
    EdStevens Guru
    Currently Being Moderated
    992371 wrote:
    hi....
    for my project...using myeclipse10& oracle10g ...i am importing _.dmp file_...& /as sysdba create new user as avi/avi ....But whenever i try to delete record from table in sql it is deleted and after commit....it will not reflect in **my project database where all data is as it is** so plz tell me how to delete data in sql that reflect in my project database also....
    plzzzz give solution
    [url https://forums.oracle.com/forums/thread.jspa?messageID=10895315&#10895315]duplicate post
  • 4. Re: unable to update database after delete table content
    995374 Newbie
    Currently Being Moderated
    sir,
    just i want to edit data in my tables....i tried to delet succesfully...& commit....but it wont reflect in orignal database when i run once again
  • 5. Re: unable to update database after delete table content
    EdStevens Guru
    Currently Being Moderated
    992371 wrote:
    sir,
    just i want to edit data in my tables....i tried to delet succesfully...& commit....but it wont reflect in orignal database when i run once again
    Well, as has been pointed out in both threads you have on this issue, it appears that you are dealing with two databases, you are making changes in one of them, and expecting the change to somehow be reflected in the other. Please explain just how you expect that to work, or else explain how my understanding of the situation is NOT what you are doing.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points