Status of synonyms after droping tables

dear,
i have a table Emp_Ast and a synonym is created on it. what hapens to the synonym if i drop the table and recreate it by same name, will the existing synonym be valid or invalid.
thanks and regards

When dropping table, synonym will remain valid.

Similar Messages

  • How to shrink datafiles after droping table

    Hello Gurus,
    I have just dropped a big table but see that the file hasn't change..
    Could you help me to shrink a file too?
    Thanks!
    Agat

    <br>Agat,</br>
    <br>Yesterday it was the same question in this forum : Shrink tablespace ? how can i do that?</br>
    <br>Nicolas.</br>

  • Swapping synonyms between tow tables every week

    Hi AIl,
    I have two tables, A and B. I need to switch loading these tables. If we load A today, the following
    week we would have to load B.
    There is a public synonym "C" that sits on top of these two tables.
    1) To Find out which table is in use right now..
    SELECT *
    FROM ALL_SYNONYMS
    WHERE SYNONYM_NAME = "C"
    2) Truncate opposite table/Drop opposite table
    3) Load data into opposite table
    4) Validate by doing a count * on the table to check the rows loaded.
    5) Finally, switch synonym
    Can this be achieved using shell script or PL/SQL?
    Please advice.A little eheadstart would be great.
    Message was edited by:
    CrackerJack

    Speaking about partition exchange googling with partition exchange will give you plenty of results and some of the first 10 even contain examples with syntax etc.
    Speaking of possible gap after base table truncate and before finish of data loading - actually this is question to you - are you ready to accept the fact that there will be time gap (as long as your data load runs) without any data in your base table and without possibility to get correct results out of it? With partition exchange and synonym swap this gap decreases to absolute minimum and most probably is only theoretical. Also keep in mind that partition exchange needs licenced Enterprise Edition and Partitioning option. This could be quite $$$ consuming.
    Speaking about another approaches it is not clear what you do not understand? Probably you can clarify.
    Gints Plivna
    http://www.gplivna.eu

  • Creating SYNONYM for all tables who don't have one at once!

    Hello to all,
    I'm trying to create synonyms for every table who's missing one at the moment. I'm trying this code:
    declare
    cursor cur_objects is
    select obj.object_name , obj.owner
    from all_objects obj
    where owner = '&&SCHEMA_OWNER'
    AND NOT EXISTS (SELECT *
    FROM all_synonyms syn
    WHERE obj.object_name = syn.table_name)
    AND obj.object_type = 'TABLE'
    AND obj.object_name LIKE 'CI_%';
    begin
    for rec_objects in cur_objects loop
    begin
    dbms_output.put_line(rec_objects.object_name);
    execute immediate('create public synonym ' || rec_objects.object_name || ' for '
    || rec_objects.owner ||'.'||rec_objects.object_name )
    exception when others then
    null;
    end;
    end loop;
    end;
    I'm getting this error:
    ORA-06550: line 10, column 37:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    begin function package pragma procedure subtype type use
    <een ID>
    <een scheidingsteken-ID tussen dubbele aanhalingstekens> form
    current cursor
    I'm still pretty new at PL/SQL and can't get it to work. Does anyone got any tips ?
    Thnx already

    Ok now I got this error:
    RA-06550: line 17, column 1:
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    * & = - + ; < / > at in is mod remainder not rem return
    returning <een exponent (**)> <> or != or ~= >= <= <> and or
    like LIKE2_ LIKE4_ LIKEC_ between into overlaps using ||
    multiset bulk year DAY_ member SUBMULTISET_
    The symbol ";" was substituted for "EXCEPTION" to continue.

  • Can you create more tables in a document after the table of contents?

    I am writing my thesis and after my table of contents I need to put in another table which lists the figures and their page numbers and also a list of tables and their page numbers

    Be aware that the T.O.C. will only list the captions of the figures and they must not be in floating or inline textboxes.
    You can do 2 passes to get what you want. Create a TOC for the figures, export that and reimport it into Pages as text, then get rid of the TOC that forrmed that, then do another TOC for the main text.
    Peter

  • Status of PO after GR

    Hi all,
    we have release procedure - 3 level .All of them are changeblle. After GR my PO stay open althougt the delivery comleted check is there- this means that it is possible to change the quantity and price.......How can we change the status of PO after GR to be closed and quantity and value should not be changeble??
    Can sombody help me?
    Thank you in advance!

    Hi
    The Delivery complete indicator "Closes" that Purchase Order from any further Goods Receipts, and lets the purchaser know that this Order has been fulfilled.
    But because of this fields cannot be greyed out. But once delivery complete indicator is set, if you try to change PO, you wil get warning message as Message no. SE 259 -  "Final entry" indicator set. Change this mesage in error in SPRO.
    regards
    Srinivas

  • In SQ02 after joining table if we want write condition on other field how ?

    In SQ03 after joining table if we want write condition on some fields
    for filtering records then what is the procedure.

    Please check forum subject. This is not a right forum for your question. Close your thread and post it on a proper forum.
    Thanks,
    Gordon

  • Private synonym created on  table not working in function

    hi,
    I have created a private synonym on a table.
    now i am trying to create a function below is the code of the same.
    FUNCTION party_name(p_cntr_id NUMBER)
    RETURN VARCHAR2 AS
    v_cust_name VARCHAR2(100);
    v_cust_no varchar2(100);
    BEGIN
    select occ.cust_no
    into v_cust_no
    from ops_cust_cntr occ
    where occ.ID = p_cntr_id;
    SELECT party_name
    INTO v_cust_name
    FROM hz_parties -- this is the table on which synonym is created .
    WHERE party_id = v_cust_no;
    RETURN (v_cust_name);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END party_name;
    it is giving the message
    SQL> sho errors;
    Errors for FUNCTION PARTY_TEST:
    LINE/COL ERROR
    12/1 PL/SQL: SQL Statement ignored
    14/6 PL/SQL: ORA-00942: table or view does not exist
    but when i run
    SELECT party_name
    FROM hz_parties;
    it is giving me the data.
    Please advice.
    Regards
    Sudhir.

    This has nothing to do with the synonym.
    Look at this:
    SQL> create table t1 (c1 number);
    Table created.
    SQL> create synonym test_tab for t1;
    Synonym created.
    SQL> create or replace procedure p1 as
      2    l_count pls_integer;
      3  begin
      4    select count(*)
      5    into   l_count
      6    from   test_tab;
      7    dbms_output.put_line(l_count || ' records found.');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1
    0 records found.
    PL/SQL procedure successfully completed.
    SQL> I guess, you don't have the select privilege on this table.
    Remember: The privileg must be granted directly to the user who is the owner of the procedure/function/package. Privilege through a role are not valid inside the procedure/function/package.

  • Update backup status in DB6COCKPIT after a clone?

    Hi,
    we are implementing clone backups for a R/3 system running AIX/DB2.
    I wonder if it is possible to update the backup status in DB6COCKPIT after a clone, with either successful or unsuccessful runs?
    BR Morten

    Hi,
    I'll try to be a little more specific.
    We have a script initiating the clones from networker every second night.
    My wish is to be able to see result from the clone in the backup overview in DB6COCKPIT as we do today when networker back up the DB
    OK if RC=0
    Fail if RC>0
    Similar to this output you can find in the cockpit (I'm aware that I have to create the status text myself, but not how to put it there):
    Backup Timestamp    : 22.03.2007 12:41:52 (20070322124152)
    End Timestamp       : 22.03.2007 19:42:34 (20070322194234)
    Runtime             : 07:00:42
    Partition           : 0
    Backup Sequences    : 2
    Return Code         : 0
    Backup Type         : Online
    Backup Granularity  : Database
    Backup Device       : Other,A
    BR Morten

  • Query is not running after one table exceeds certain records, any limit?

    I have a production database and a reporting database. Production is on version 9.2.0.5 where as Reporting is on 9.2.0.3. I had a query which uses Gl table which grows every month. The query use to take almost same time both in Production as well as Reporting. After the table grew in last couple of months. I observed the query just hangs up in production where as it continues to run in Reporting. Is it the orcale version which makes any difference for the query not to run in prodcution when Gl table had 27 million rows as against 25 million rows a couple of months of ago? Any help is appreciated.

    user5846372 wrote:
    If I use the gl table which was populated until two months ago having less than say 25.2 million rows, the query runs in 2 minutes. If I use the current gl table having current data (total of say 27 million rows) then the query does not even run. From the current gl table if I delete about 2 million records making it 25 illkion rows then the query runs. So I was wondering whether it is the oracle version which makes this difference.Explain your logic that says that after the queries run successfully on different versions, the version difference is now somehow causing the problem - and not the fact that what did change since the last successful run was the the data volumes....
    As for "+the query does not even run+" - it does. Simply that you do not have a clue what it is doing and thus no means to diagnose the problem. And then jump to the conclusion that the version difference is somehow to blame.
    WHAT is that query doing when it seems to "hang"? (it very likely does not hang at all, and is simply very busy with I/O or being blocked from accessing a resource it needs)
    Have you looked at the events and wait states of the query? Have you looked, as Daniel already suggested, at the execution plan?
    You cannot and should not attempt to diagnose a problem, without understanding the problem. If you have no idea what the problem is, how can you simply jump to the conclusion that "+oh, it must be the version difference+"!?
    You can only solve a problem by understanding it. It is that simple. So first understand what the query is doing and why it seems to hang BEFORE you attempt to diagnose and solve it.

  • Inserting p /p after a table at the end of a document

    I am trying to allow a user to insert a paragraph after a table in an HTMLDocument. I find that the view does not allow the user to position the cursor after the table if the table is the last element in the document structure. This is the root cause of the problem and would be best solved here, however my current workaround is to look for a return being pressed in the last table cell of the table and then attempt to add a paragraph to the document structure after the table.
    This is where my current problem occurs. I seem unable to add <p></p> tags after the table without some weird things happening.
    Could someone offer the best way to add <p></p> tags after a table that has no other paragraph sections after it either using insertBefore(...) or perhaps using ElementSpecs?
    If someone could also enlighten me on how to allow the user to position the cursor after the table, this would be of much help.

    When you insert your table, insert a whitespace character... i.e. "\u00A0". This will take up space in your document to allow the caret to be placed there.

  • Ask User confirmation before droping table

    Hi,
    I need to build a script that ask user a confirmation before that he execute the script that drop a table like "Do you check the log file before droping table Y/N"
    I start to do this but it's not working well, I'm new in sql and PLsql
    accept condition prompt "Do you check all log file (Y/N)"
    DECLARE
    V varchar2(1) := 'N';
    BEGIN
    if &condition=V then
    EXECUTE IMMEDIATE 'drop table t';
    else
    dbms_output.put_line ('please check your log file');
    end if;
    END;
    Regards,

    vittel wrote:
    Hi,
    I need to build a script that ask user a confirmation before that he execute the script that drop a table like "Do you check the log file before droping table Y/N"
    I start to do this but it's not working well, I'm new in sql and PLsql
    accept condition prompt "Do you check all log file (Y/N)"
    DECLARE
    V varchar2(1) := 'N';
    BEGIN
    if &condition=V then
    EXECUTE IMMEDIATE 'drop table t';
    else
    dbms_output.put_line ('please check your log file');
    end if;
    END;
    /if the value of &condition is the single character N, then
    if &condition=V thenwill be sent to the compiler as:
    if N=V thenWhich assumes there is a variable called N.
    I think what you meant was:
    if '&condition' = V thenwhich will be sent to the compiler as
    if 'N' = V thenNote that substitution variables (like &condition) are evaluated and replaced before the PL/SQL code is compiled, so you can use substitution variables in an anonymous block, like you're doing, but you can't use them in a stored procedure to get user input at run-time.

  • [b]Recover Droped table In 8i[/b]

    I want to recover the droped table in 8i. Also I don't have any backup.
    Irfan

    I have the dump file but it is 12 hours old.
    Now your suggested method is not full fill my need.
    BCZ me have to lost the 12 hours working.r.- If your database is not in archivelog mode and being so you do not have the archives , the maximun you can do is to restore the data of that table with that dump file and you will lose data of working hours.
    Joel Pérez
    http://www.oracle.com/technology/experts

  • I have a mid 2009 13'' MBP. I got the battery replaced in Apple store, It then stopped displaying the battery status LED. After some months of use my MBP died. I got it checked in Apple verfied Service centre and was told that logic board was to blame

    I have a mid 2009 13'' MBP. I got the battery replaced in Apple store, It then stopped displaying the battery status LED.
    After some months of use my MBP died outside USA. I got it checked in Apple verfied Service centre and was told that logic board was faulty.
    After I came back to US I took my MBP to Apple store and was told that there is liquid damage in the system. My question is that if there was liquid damage why did my MBP stop displaying the battery status right after  the battery was changed secondly why didnt the apple verified Service centre tell me that there was liquid damage afterall I paid them the money for diagnosing the problem.
    Is there a process i can followup on this problem

    These are question you would need to ask that service center.
    This is a User to User forum. No Apple employees here.

  • Garbage display of table names after droping.

    Hi to all,
    i installed oracle 10g on linux and configure the server- client for the users.
    recently one of my user created a table and then droped it i found the following display after executing
    SELECT * FROM TAB;
    TNAME TABTYPE CLUSTERID
    REGIONS TABLE
    COUNTRIES TABLE
    LOCATIONS TABLE
    DEPARTMENTS TABLE
    JOBS TABLE
    EMPLOYEES TABLE
    JOB_HISTORY TABLE
    EMP_DETAILS_VIEW VIEW
    BIN$a3IEMEEXzbXgQKjAZQA42w==$0 TABLE
    BIN$a4MznbosTVHgQKjAZQAZ6Q==$0 TABLE
    10 rows selected.
    can any one tell me what exactly the last two lines are?
    also give the soloution to rectify the above problem
    thanks in advance..
    Regards,
    NIKHIL AGRAWAL

    http://www.oracle.com/technology/pub/articles/10gdba/week5_10gdba.html
    http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm
    BIN$a3IEMEEXzbXgQKjAZQA42w==$0 TABLE
    BIN$a4MznbosTVHgQKjAZQAZ6Q==$0 TABLEIt's not the problem
    Feature 10g:
    When you drop table SQL> drop table A;
    Oracle make table's dropped to recycle bin (BIN$*) .
    You can flashback tables's dropped ...
    if you don't need recycle bin... SQL> drop table A purge;
    By the way, on your case you don't see (BIN$*)... you can
    SQL> PURGE RECYCLEBIN;
    Be careful....
    Good Luck
    Edited by: Surachart (HunterX) on Jun 14, 2009 6:18 PM

Maybe you are looking for