Dropping tables in a specified user where in i dont know the SYS privilege

Hi,
I have 10 users with each user containing about 120 tables, but i want to drop all the tables without dropping the users and im working on a testing database where in i only have access to ALL_USERS...
Can anyone help me in this regard......
Thanks
- Sri

Ok, I'll try to be clearer.
in SQL*Plus, first enter the line:
sql> spool drop_tables.sql;
then enter the query as above. This should output a load of lines which read 'drop table owner.table_name; and the last line will be row count.
Then issue the command:
sql> spool off;
you should then see that a file has been created on your filesystem called drop_tables.sql. Take a look inside and it will contain lots of 'drop table' commands.
return to SQL*Plus and run that script:
mysql> @drop_tables.sql
when you are SURE that you are happy with what has been dropped, issue the COMMIT;
if you are not happy, issue a ROLLBACKl
regards
James

Similar Messages

  • The current user username has not been granted the ADVISOR privilege despite having it !

    Hi,
    I'm trying to follow ML note 2499931.1 'Using Dbms_Advisor.Tune_Mview To Optimize Materialized Views For Fast Refresh' and am receiving an error suggesting the user4 does Not have the Advisor privilege
    despite the fact that it does. What am I missing ?
    Every note I've found so far suggests granting the privilege is the fix.
    I have and continue to receive the error.
    Version 11.2.0.3 on Redhat 5
    select * from dba_sys_privs where grantee = 'SOAUSER';
    GRANTEE                        PRIVILEGE                                ADM
    SOAUSER                        CREATE MATERIALIZED VIEW                 NO
    SOAUSER                        CREATE VIEW                              NO
    SOAUSER                        CREATE PUBLIC SYNONYM                    NO
    SOAUSER                        SELECT ANY DICTIONARY                    NO
    SOAUSER                        ON COMMIT REFRESH                        NO
    SOAUSER                        CREATE ANY DIRECTORY                     NO
    SOAUSER                        CREATE DATABASE LINK                     NO
    SOAUSER                        SELECT ANY TABLE                         NO
    SOAUSER                        ADVISOR                                  NO
    SOAUSER                        UNLIMITED TABLESPACE                     NO
    SOAUSER                        CREATE SESSION                           NO
    Error at line 2
    ORA-13616: The current user SOAUSER has not been granted the ADVISOR privilege.
    ORA-06512: at "SYS.PRVT_ADVISOR", line 4869
    ORA-06512: at "SYS.DBMS_ADVISOR", line 1969
    ORA-06512: at "SYS.PRVT_TUNE_MVIEW", line 490
    ORA-06512: at "SYS.PRVT_TUNE_MVIEW", line 970
    ORA-06512: at "SYS.DBMS_ADVISOR", line 739
    ORA-06512: at line 3
    Thanks in Advance
    Ken

    Sorry, but the code I was receiving the error message for is essentially   the same as the example in the note. Assumed people would have access to the note.
    The statement is:
    variable foo varchar2(20);
    declare foo varchar2(20) := 'ken_foo';
    begin
    dbms_advisor.tune_mview(:foo,
    'create materialized view ken_foo
    as
    select 
    papf.rowid R_papf,
    paaf.rowid R_paaf,
    gcc.rowid R_gcc,
    papf.employee_number,
    gcc.segment4 cost_center
    from hr.per_all_people_f@atc_pp_to_ebs_atcllc papf,
         hr.per_all_assignments_f@atc_pp_to_ebs_atcllc paaf,
         gl.gl_code_combinations@atc_pp_to_ebs_atcllc gcc
    where papf.person_id = paaf.person_id
    --and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    --and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
    and paaf.default_code_comb_id = gcc.code_combination_id');
    end;
    Per another forum the answer appears to be that sys didn’t have the advisor privilege.
    Granted advisor to sys and ran the statement again as soauser and no error.
    Thanks
    Ken

  • HT201441 i dont know the previous user of this phone and i'm stuck on the iphone icloud activation process

    i dont know the previous user of this iphone and i'm stuck on the iphone icloud activation process.
    what should i do?

    radhikaven wrote:
    i bought this phone in 2013 from dubai and used till last year june. I dropped the phone and got a problem with display as well as earpiece.
    Later the phone was having a carrier network issue. Was showing searching. i restored the phone to factory settings and when i tried to set up the phone, its showing that the phone cant be activated at this moment, please try again later.
    If your phone was bought second-hand (used) - something you haven't made clear - and it was Activation Locked by the previous owner (this wouldn't show up until you upgraded or reset it) then only he can unlock it. If you can't contact him to do so then you will not be able to use the phone. You can tell if this is the case because it will be asking for an Apple ID (which it will display partially) which is not yours.
    On the other hand if this was a new phone then you may have hit a temporary outage in the activation server and you should wait a bit then try again.

  • HT5621 i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    Without the previous owner's Apple ID and Password, you will not be able to activate the iPad.

  • When we got our computer it all ready had 2 user names on it Administrator and Teacher and we dont know the passwords for them.

    When we got our computer it all ready had 2 user names on it Administrator and Teacher and we dont know the passwords for them.

    Assuming you have been able to set yourself up as an Administrator so far, you can just go into Applications>System Preferences>Users & Groups and delete the other three accounts by highlighting them one at a time in the left hand column and clicking the "Minus" symbol at the bottom of the column.
    If you have NOT been able to set yourself up as an Administrator also so far, then the following article should help:
          http://www.macworld.com/article/1164599/reset_password_lion.html
    Hope this helps

  • First time user. How do I know the person to whom I sent my files saw them? Only my name/email is in

    First time user. How do I know the person to whom I sent my files saw them? Only my name/email is in the Reply.

    Are you using Workspaces or another Adobe product/service?  How are you sending the files?

  • When trying to download it pops up with a window saying with current user i may not be able to do everything and is asking for administrater password or continue with current user? when i click current user it does nothing and i dont know the password

    when trying to download it pops up with a window saying with current user i may not be able to do everything and is asking for administrater password or continue with current user? when i click current user it does nothing and i dont know the password
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Not from your end. Click here and ask the iTunes Store staff for assistance.
    (126716)

  • I encrypted iphone backup by mistake ( didnt realize the box was checked). I dont know the password to disable the encryption. How do i fix this? How can i delete the backup , where do i find it?

    I encrypted iphone backup by mistake ( didnt realize the box was checked). I dont know the password to disable the encryption. How do i fix this? How can i delete the backup , where do i find it?

    In iTunes click on edit then preferences then on the devices tab and the backups are there.  Select the one you want to delete then delete it

  • My iphone 4s is 2nd ...then i format..the phone want old user id...how can i used that iphone back because i dont know the id?

    My iphone 4s is 2nd ...then i format..the phone want old user id...how can i used that iphone back because i dont know the id?

    There is no other solution - as you have already been told, if you don't have that user id and you cannot contact the previous owner of that id for the phone, then there is absolutely nothing that you can do.  You have a useless brick that you can't use.
    Nothing else to do.

  • Dont know the admin password, cant get into single user mode

    I have recently bought a PowerMac G4 with a dual core 1.25GhZ processor on a car boot. I do not know the admin password, and i cant get in to single user mode. What to do?! Seems like it has Open Firmware Password Protection, what ever that is, and i have the discs and tried disabling it, but to do that you need the admin password. It's and endless loop! Help me please, i have no idea what to do now...

    Disabling the Open Firmware Password
    Open Firmware password protection can be bypassed if the user changes the physical memory configuration of the machine and then resets the PRAM three times (by holding down Command, Option, P, and R keys during system startup). 
    An Open Firmware password will provide some protection, however, it can be reset if a user has physical access to the machine and can change the physical memory configuration of the machine.
    Mac OS X
    Security Configuration
    For Version 10.4 or Later
    Second Edition

  • User SYS haven't the SYS privileges !?!

    Hello Folks;
    I installed a new database in my Oracle 11g database :
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining
    and Real Application Testing options
      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ".I created the database with this SQL script :
    CREATE DATABASE DBTEST
       USER SYS IDENTIFIED BY sys
       USER SYSTEM IDENTIFIED BY system
       LOGFILE GROUP 1 ('/data5/oradata/DBTEST/redo01.log') SIZE 100M,
               GROUP 2 ('/data5/oradata/DBTEST/redo02.log') SIZE 100M,
               GROUP 3 ('/data5/oradata/DBTEST/redo03.log') SIZE 100M
       MAXLOGFILES 5
       MAXLOGMEMBERS 5
       MAXLOGHISTORY 1
       MAXDATAFILES 100
       CHARACTER SET US7ASCII
       NATIONAL CHARACTER SET AL16UTF16
       EXTENT MANAGEMENT LOCAL
       DATAFILE '/data5/oradata/DBTEST/system01.dbf' SIZE 325M REUSE
       SYSAUX DATAFILE '/data5/oradata/DBTEST/sysaux01.dbf' SIZE 325M REUSE
       DEFAULT TABLESPACE users
          DATAFILE '/data5/oradata/DBTEST/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
       DEFAULT TEMPORARY TABLESPACE tempts1
          TEMPFILE '/data5/oradata/DBTEST/temp01.dbf' SIZE 20M REUSE
       UNDO TABLESPACE undotbs
          DATAFILE '/data5/oradata/DBTEST/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;The database is OK when I do shutdown immediate and startup pfile=...
    But when I'm connected with sys i can't see the dba_* tables !!! :
    SQL> select * from v$instance;
    INSTANCE_NUMBER INSTANCE_NAME
    HOST_NAME
    VERSION           STARTUP_ STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT
    LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO
                  1 DBTEST
    fr-tou-vm-orcl01
    11.2.0.3.0        21/08/12 OPEN         NO           1 STOPPED
    ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO
    SQL> select * from dba_objects;
    select * from dba_objects
    ERROR at line 1:
    ORA-00942: Table ou vue inexistanteAny ideas ?!? Thank you for your knowledge.
    Edited by: Moostiq on 21 août 2012 16:01

    And when I try to recreate the catalog (with sys user) I get an issue and i'm kick out sqlplus :
    SQL>  @$ORACLE_HOME/rdbms/admin/catproc.sql
    DOC>######################################################################
    DOC>######################################################################
    DOC>    The following PL/SQL block will cause an ORA-20000 error and
    DOC>    terminate the current SQLPLUS session if the user is not SYS.
    DOC>    Disconnect and reconnect with AS SYSDBA.
    DOC>######################################################################
    DOC>######################################################################
    DOC>#
    DECLARE
    ERROR at line 1:
    ORA-06553: PLS-213: package STANDARD not accessible
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining
    and Real Application Testing options
    [oracle@fr-tou-vm-orcl01 ~]$What's the matter ?!?
    Edited by: Moostiq on 21 août 2012 16:07

  • What should i do my iphone4s dosent have warranty but it  drop calls i bought it 4 months ago i dont know what to do because i dont have the recipet either

    plz help me i wasted $700 on a iphone4s i bought it on no contract,  i worked so hard for the money i would really appreciate if you guys could help me out it drops calls and it reboots itself after every half an hour

    Where did you buy it without a warranty?
    Try entering the serial number here: https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • Is there a way where in i can know the total page of report?

    guys, i would like to know the total page of the report, i am using vb6 calling the report using RDC .
    below is the code why i am on a hurry to know the total page of the report.  i just want to add a loop that will process until a number of total hasn't been reach.
        '   picImage is your report picture object name.
        If Dir("C:\Photos\182483\182483-" & oSectionGH.ReportObjects(2).Value & ".jpg") <> "" Then  
            'Replace Your Picture Path Value
            Set oSectionGH.ReportObjects.Item("picture1").FormattedPicture = LoadPicture("C:\Photos\182483\182483-" & oSectionGH.ReportObjects(2).Value & ".jpg", vbLPCustom, vbLPColor)
        Else
            'Fill Blank Picture
            Set oSectionGH.ReportObjects.Item("picture1").FormattedPicture = LoadPicture("C:\Photos\182483\" & "blank.jpg", vbLPCustom, vbLPColor)
        End If
        Set oSectionGH = Nothing
    as you can see. i want the vb6 go to the last line "Set oSectionGH = Nothing" as soon as the loop reached the total page.  i will much more thankful, if you could modify this code for me and include the loop process.
    thanks in advance..

    Hi;
    I think we are not sure what it is you are trying to do. Could you explain a bit more what you are looking to accomplish? Do you want a specific image to appear on different pages, or something else?
    Regards,
    Jonathan

  • HT5625 please i need a help, a cant afford to buy new iphone, i bought pairly used in the market here in khartoum Sudan, mistakenly i reset it where i realised that i cannot use it again because it was linked to an apple id, and i dont know the person.

    please i need a help about how to use my iphone again, i bought pairly used, mistakenly i reset it and then i realised that it was linked to another persons id and password which i dont know or how to contact the person, and still i cant evan see the full email adress of the person which i think i could have contact him directly. so does that means i can no more longer use the phone again? please i need help, am a student from khartoum sudan.

    profuhassan wrote:
    please i need a help about how to use my iphone again, i bought pairly used, mistakenly i reset it and then i realised that it was linked to another persons id and password which i dont know or how to contact the person, and still i cant evan see the full email adress of the person which i think i could have contact him directly. so does that means i can no more longer use the phone again? please i need help, am a student from khartoum sudan.
    That is correct, you now have a paperweight.  Unless you can get a hold of the orignal owner.

  • I have a situation where I find my restrictions have been turned on and I dont know the passcode to unlock them. Is there a solution that doesnt risk all the data on my phone?

    Hello,
        I recently purchased an Iphone 5s, 16 GB, version7.1.2, , model ME305LL/A.  I've been having some issues however. 
    It appears someone has entered a passcode for "restrictions". I do not recall ever having engaged this feature and the
    only proof I have of that is I am unable to find the passcode! There are 379 photos on this phone which I would like to keep. But
    I am unable to backup my device because of the restrictions being turned on. I do not want to lose the data. Any suggestions would be appreciated.

    I did try to get help by going into the local Apple store.  However, I was told that the only way to get it working again, now that I am locked out it, is to get on itunes and do a complete factory reset. This of course would fix the locked out issue but I would loose all the pics. 

Maybe you are looking for