How to remove tables, views, index installed during installation

Here is the statement I'm using for a college class to show the content of the catalog. However when ran it outputs 1346 lines of data of which 90% are files loaded during installtion.
select substr(object_name, 1, 20), object_type, status
from user_objects
SPOOL OFF
Partial results of SQL statement.
SUBSTR(OBJECT_NAME,1 OBJECT_TYPE STATUS
MGMT_JOB_CALLBACKS TABLE VALID
PK_MGMT_JOB_CALLBACK INDEX VALID
MGMT_JOB_QUEUES TABLE VALID
PK_JOB_QUEUE INDEX VALID
MGMT_JOB_BLACKOUT_AS TABLE VALID
PK_MGMT_JOB_BLACKOUT INDEX VALID
MGMT_JOB_SEQUENCE SEQUENCE VALID
MGMT_PERFORMANCE_NAM TABLE VALID
MGMT_PERFORMANCE_NAM INDEX VALID
MGMT_SYSTEM_ERROR_LO TABLE VALID
MGMT_SYSTEM_PERFORMA TABLE VALID
How can I wipe the database clean so that only my data is there?
Thanks

You can come up with a script as follows, which is an example.
declare
cursor cursor1 is select owner,object_name,object_type from dba_objects where owner=' user560741';
ddlsql varchar2(100);
begin
for cur1_rec in cursor1 loop
if (cur1_rec.object_type like 'TABLE') then
ddlsql:='drop ' || cur1_rec.object_type || ' ' || cur1_rec.owner||'.'||cur1_rec.object_name ||' cascade constraint';
else
ddlsql:='drop ' || cur1_rec.object_type || ' ' || cur1_rec.owner||'.'||cur1_rec.object_name;
end if;
begin
     execute immediate ddlsql;
exception
when others then
     ddlsql:='';
end;
end loop;
end;
/

Similar Messages

  • Database objects Tables, Views, Indexes not expand in Connections navigator

    In SQL Developer tool when I clicked on any database object: Tables, Views, Indexes, Packages, Procedures, Functions, and Triggers none of them expands in Connections navigator so I am not able to see all tables, Views, Indexes in this schema objects.
    Please advise
    Thanks a lot
    Vincent

    If the user you're connecting with is not the owner of the objects, you can access them through the Other Users node.
    Hope that helps,
    K.

  • How to create table view with reference table

    Hi experts,
    How to create table view with reference table in SE11, plz gve me stp by stp procedure.
    pints grnded for hlp.

    Hi
    Go to Tcode se11 choose view and enter the name and create a popup opens up choose database view option
    enter the description
    On the left hand side choose the table name.
    Click on view fields tab and choose your table fields.Here you can choose which fields you want in your view.
    Save and then activate.
    Hope this helps.
    Regards,
    Harish

  • How to create table view

    Dear Experts,
    how to create table view for single table? and once I create table view I have to create Generic data source so plz provide me the step to create it.
    Please search the forum before posting a thread
    Edited by: Pravender on May 6, 2011 11:18 AM

    Hi,
                         There is big advantage of creating a view for single table rather than RSO2.
                My scenario is like this  : My table VBAK has 113 fields i want only 9 fields from them.
                         RSO2: By doing generic extraction with RSO2 it will fetch all 113 fields from the table VBAK.So,it'll definitely degrades the performance . For transferring 9 fields why we have to fetch all 113 fields.
                         VIEW: By using view we can specify some fields in view fields.So, only those 9 fields will be fetched from table.  In this extract structure contains 9 field transferring 9 fields.Then we can create generic extraction using this view.
    Regards
    satya.

  • Grant access to create/alter/drop/ to tables, view, index

    Using (Transact-sql) SQL query analyser 8.00.2039
    Objective: To delete/drop the schema on every run of database setup (i mean drop the schema and build it on every run).
    I have done the following to accomplish the same ...
    Logged in as sa ... i did the following
    use master
    exec sp_addlogin 'sas'
    exec sp_adduser 'sas'
    create database ss
    use ss
    exec sp_grantdbaccess 'sas', 'ss'
    i am having issues with the grant command in the above version.
    i want to grant create table, create index, create view, alter table, drop view, drop index, drop table to the user sas
    When i ran the command
    grant create table, create index, create view, alter table, drop view, drop index, drop table to sas
    i got
    Server: Msg 165, Level 16, State 6, Line 1
    Privilege CREATE INDEX may not be granted or revoked.
    Server: Msg 165, Level 16, State 1, Line 1
    Privilege ALTER TABLE may not be granted or revoked.
    Server: Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'delete'.
    If the grant worked, i thought of creating the schema like
    create schema epp authorization sas
    Then for removing the schema (as there is no drop schema command for the version mentioned above)
    i would have done this,
    use master
    exec sp_revokedbaccess 'sas'
    alter database ss set single_user with rollback immediate
    drop database ss
    exec sp_droplogin 'sas'
    I referred the online book but not of much help on this.
    Is this is the correct way to drop/delete a schema on every run of database setup
    pls. offer your suggestions

    Terminology.
    When you write “schema” I will guess that you mean ‘database ‘rather than a security schema within a database.
    User.
    A user is an object that belongs to a database. In your create code you added the user sas to the master database. If you want to add that user to the ss database you have to create the ss database first, then USE database ss; before you sp_adduser. If you are using SQL Server 2005 use CREATE User not sp_adduser.
    To DROP a database you DROP the database. All the objects in the database including its users are dropped with it. The Logins belong to the server and they can be dropped before or after you drop the database though if you drop a Login and don’t drop a database that has that Login as a User you orphan the User.

  • How to partition tables and indexes in this scenario?

    So our situation is pretty simple. We have 3 tables.
    A, B and C
    the model is A->>B->>C
    Currently A, B and C are range partitioned on a key created_date however it's typical that only C is every qualfied with created date. There is a foreign key from B -> A and C -> B
    we have many queries where the data is identified by state that is indexed currently non partitioned on columns in A ... there are also indexes on the foreign keys that get from C -> B -> A. Again these are non partitioned indexes at this time.
    It is typical that we qualify A on either account or user or both. There are indexes (non partitioned) on these
    We have a problem now because many of the queries use leading wildcards ie. account like '%ACCOUNT' etc. This often results in large full table scans. Our solution has been to remove the leading wildcard but this isn't always possible.
    We are wondering how we can benefit from partitioning and or sub partitioning table A. since it's partitioned on created_date but rarely qualify by that.
    We are also wondering where and how we can benefit from either global partitioned index or local partitioned indexes on tables A. We suspect that the index on the foreign key from C to B could be a local partitioned index.
    I am also wondering what impact pushing the state from A that's used to qualify A down to C would have any advantage.
    C is the table that currently we qualify with the partition key so I figure if you also pushed down the state from A that's used to qualify the set of C's we want based on the set of B's we want based on the set of A thru qualfying on columns within A.
    If we push down some of those values to C and simply use C when filtering I'm wondering what the plans will look like compared to having to work all the way up from the bottom to the top before it begins qualifying A.
    Edited by: steffi on Jan 14, 2011 11:36 PM

    We are wondering how we can benefit from partitioning and or sub partitioning table A. since it's partitioned on >created_date but rarely qualify by that. Very good question. Why did you partition on it? You will never have INSERTS on these partitions, but maybe deletes and updates? The only advantage (I can think of) would be to set these partitions in a read only tablespace to ease backup... but that's a weired reason.
    we have many queries where the data is identified by state that is indexed currently non partitioned on columns in >A ... there are also indexes on the foreign keys that get from C -> B -> A. Again these are non partitioned indexes at >this time.Of course. Why should they be partitioned by Create_date?
    It is typical that we qualify A on either account or user or both. There are indexes (non partitioned) on these
    We have a problem now because many of the queries use leading wildcards ie. account like '%ACCOUNT' etc. This >often results in large full table scans. Our solution has been to remove the leading wildcard but this isn't always possible.I would suspect full index scan. Isn't it?
    We are also wondering where and how we can benefit from either global partitioned index or local partitioned >indexes on tables A. We suspect that the index on the foreign key from C to B could be a local partitioned index.As A is not accessed by any partition, why should C and B profit? You should look to partition by the key you are using to access. But, you are looking to tune your SQLs where the access is like '%ACCOUNT' on A. Then when there is a match. ORACLE joins via your index and nested loop (right?) to B and C.
    I am also wondering what impact pushing the state from A that's used to qualify A down to C would have any >advantage.Why should it. It just makes the table and indexes larger => more IO.
    C is the table that currently we qualify with the partition key so I figure if you also pushed down the state from A >that's used to qualify the set of C's we want based on the set of B's we want based on the set of A thru qualfying >on columns within A.If the access from A to C would be .. AND A.CREATE_DATE =C.CREATE_DATE and c.key like '%what I want%' which does not qualifify for a FK ;-) then, as that could be resulting in a partition scan, you could "profit". But, I'm sure that's not your model.
    If we push down some of those values to C and simply use C when filtering I'm wondering what the plans will look >like compared to having to work all the way up from the bottom to the top before it begins qualifying A.So you want to denormalize A,B,C and into one table? With the same access is like '%ACCOUNT' you would get a full scan on an index as before, just the objects would be larger due to redundance and harder to maintain. In the end you would have a bad and slower design.
    Maybe you explain what the problem is.
    Full index scan can not be avoided, but that can be made faster by e.g. parallel query, and then the join to B and C should be a "snip" if you just identify a small subset of rows in these tables.

  • How to remove win 8 and install win 7 in bootcamp

    I want to completely remove win 8 and install win 7 in bootcamp. I followed the steps in bootcamp assistant and it appears to remove the win 8 partition. However when starting a new win 7 bootcamp partition and installation setup still thinks win 8 is being used. how do I get it to recognize the win 7 now being installed from the usb drive? This is on an iMac 27 late 2012 with OS x 10.10.1

    Hi Janesdf,
    Welcome to Lenovo Community!
    As per the query we understood that you are looking for Windows downgrade on your Ideapad N580.
    Before doing any changes in the system HDD partition or with Windows OS, I suggest you to create the system recovery media and then you can downgrade the OS. But you require Windows 7 recovery media.
    Hope this helps.
    Best regards,
    Hemanth Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How to access tables/views of an external database provider..

    After much trouble I finally managed to setup a second Database Provider that doesn't display the "0 out of 0 connections are good" error by filling in the "Configuration Class" field with "intradoc.server.DbProviderConfig".
    But now the problem is actually accessing the tables/views in my newly configured external database provider...
    In the Configuration Manager applet when I try to add a new Table or View it only lists the tables contained in the schema of the SystemDatabase database provider (the original one), I've tried running Queries via components trying stuff like SELECT * FROM provider_name.table_name and other similar but obviously it doesn't work...
    So... with that said, I just want to know how I access tables or views in my "supposedly" well conected (15 out of 15 connections are good, no errors on the Test Query) Oracle external Database Provider - After searching I was unable to find any information regading any post-provider-setup actions in the Content Server documentation - Does anyone know how to do this?
    On a side note, if the database is SQLServer instead of Oracle, with the same configuration and apparently no errors on the database side (other clients access it well) the Query Test of the new database provider returns the following error:
    "The provider 'TestSqlSrv' is in error. Unable to create database connection for JDBC:ODBC:SqlSrv. Unable to create result set for query 'select * from dummy'. Invalid Fetch Size Unable to create result set for query 'select * from dummy'. Invalid Fetch Size java.sql.SQLException: Invalid Fetch Size".But I won't even go there yet.... for now I would settle with just knowing how to reference information in the Oracle external database provider...
    Message was edited by:
    user602700

    if you are able to, pick up Bex Huff's book the Definitive Guite to Stellent Content Server Development (amazon link: http://www.amazon.com/Definitive-Stellent-Content-Server-Development/dp/1590596846/ref=sr_1_1?ie=UTF8&s=books&qid=1196365101&sr=8-1)
    chapter 11 is all about this.

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • How to create table(s)/indexes on a new database from an existing database

    Hello all - I need some help in finishing a task, quick response is really appreciated
    So, I have a new database that needs creation of tables including indexes and objects for two different tablespaces called CDS1 and CSD2. I have created these tablespaces and datafiles associated with them. I need some help just to create these tables and indexes from an existing database without copying any of its contents. How can I achieve this, these are 2 different servers at different locations. Can somebody give me step by step instruction - would greatly appreciate it !
    Thanks,
    Vikas

    9876543210 wrote:
    Hello all - I need some help in finishing a task, quick response is really appreciated
    So, I have a new database that needs creation of tables including indexes and objects for two different tablespaces called CDS1 and CSD2. I have created these tablespaces and datafiles associated with them. I need some help just to create these tables and indexes from an existing database without copying any of its contents. How can I achieve this, these are 2 different servers at different locations. Can somebody give me step by step instruction - would greatly appreciate it !
    Thanks,
    Vikas
    exp help=yes
    exp username/password rows=no
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Import problem of tables/views not installed

    Hello,
    need urgent advice to the below error encountered whiel trying to import database using imp. receive tables/views does not exist/not installed. grateful for advice/solution.
    Thanks
    >>
    Username: sys
    Password:
    Connected to: Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production
    PL/SQL Release 8.0.4.0.0 - Production
    IMP-00003: ORACLE error 942 encountered
    ORA-00942: table or view does not exist
    IMP-00021: operating system error - error code (dec 2, hex 0x2)
    IMP-00023: Import views not installed, please notify your DBA
    IMP-00000: Import terminated unsuccessfully
    $ exit
    script done on Fri Aug 10 08:07:37 2001
    null

    import utility script may not be existing in full or the version of import utility that is needed to import from that perticular export not exists at all.
    In other words you should check which version of export file you are trying to import ?
    for example if you are trying an import on oracle version 7.3.4. you need to have same version of oracle to import. If not you should run relevant catexp.sql files before you import.
    if still confused contact in this forum again.

  • How to remove team viewer

    Team viewer just showed up on my imac. How do I remove it. I cannot drag it to the trash

    Hi Gopal ,
    i am giving answer for 1s t question ..
    How to remove or diable the personalize link ..
    GO to Content admin -->Portal content
    click on search .
    and seach for eu_role
    u can get standard role .. open the object ..
    Just remove the Portal personalization workset and save it ..
    Regards,

  • Include a custom Excel Template into installer and get it installed during installation

    Hi
    I ve developed a code for acquiring data and writng into an excel file.Now I want to  create an installer, I want to keep a custom template of the excel file as part of the installed so that During installation of the file it will get installed on C drive-> My Document.How I can Do it?
    Thanks for your time
    Augustin
    Certified LabVIEW Associate Developer
    Solved!
    Go to Solution.

    Please find the attached procedure.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Procedure.doc ‏344 KB

  • How To solve the error FJS 0012 during installation IDES4.7

    Hi,
    I got an error FJS00012 during installation of  IDES4.7. How to solve the problem? is there any way to solve the problem..... please suggest me.... and send a mail to [email protected]..
    regards
    Sankar

    Please post the relevant parts of the logfile, I don'T think, someone here knows all the error messages out of his head..
    Markus

  • How to remove 3D view in Maps?

    How do I remove the 3D view from Maps so that it STOPS accidentally switching to the extremely pathetic and annoying 3D view EVERY TIME I try to zoom in?!

    I want to REMOVE the 3D option so it NEVER switches to 3D again.  That button switches it between normal view and 3D view only. My issue is Every time I try to zoom, it switches to 3d view instead of zooming.  I have to keep hitting that button to switch it back over and over and over again.   it is so annoying!  Does anyone else have this problem?  Anybody else use the zoom function in Maps?

Maybe you are looking for

  • ABAP Mapping for Error handling in Proxy to JDBC

    Hi All, I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool) I am following the below steps, step 1 - In message mapping a UDF is created to catch errors and store them in a var

  • SAP Netweaver 7.2 developer edition installing

    Hi guys, I'm a functional consultant and really interested in learning some basics developments stuff in SAP. So I'm trying to install SAP Netweaver 7.2 developer edition, and when I checked the prerequisites in sapins and error came about environmen

  • How to cause POJO data control to use custom base ViewObject class

    ADF 11.1.1.4 We have a POJO data control that displays data in a table.  We can filter the table using the column filters and this performs in-memory filter.   If an exception occurs I see that it is using a ViewObject for the in-memory filtering bec

  • How do I get a song into the iTunes store?

    I am a musician and wish to make a song available on iTunes. How do I do this, and waht is the fastest possible way to do it? thanks, Geoff

  • How to calculate selected hierarchy only

    Hello, I have simple planning application (Hyperion 11.1.2) with all mandatory dimensions. *"Entity" dimension looks like this:* COMPANY_1 COSTCENTRE_1_1 PRODUCTIONLINE_1_1_1 PRODUCTIONLINE_1_1_2 PRODUCTIONLINE_1_1_3 COSTCENTRE_1_2 PRODUCTIONLINE_1_2