Dropping all objects in a user's schema

Hi,
I want to drop all the objects in my schema. Now I'm issuing the drop command every time to drop the objects one by one. Is there any way to drop all the objects at one go without dropping the user?
Thanks,
Babu

Hi,
How about dropping the user (schema) itself and re-creating it. That would gurantee dropping all schema objects.
One problem is, you have to log in as SYS or SYSTEM or somebody with DBA privilege.
I would say, before dropping the user, prepare the 'create user' script from TOAD or DBMS_DESCRIBE or using various data dictionary views, so that we have the complete create scripts with all the roles etc etc. Then drop the user and re-create it.
Cheers

Similar Messages

  • Drop All Objects

    Hi
    We have a script for dropping all objects in an schema.
    We use it on our application schema.
    By mistake, I had logged in as SYS user id and ran the script. It generated a file called a1.sql and also ran this script. Realising the mistake, I broke the SQL session and closed the SQL session.
    How do I go about correcting the situation.
    Has the Database become inconsistent or it it recoverable ?
    Apparantely, we do not have a backup of the Database.
    Can anyone suggest a method to retrieve ?
    Mahadevan

    Hi
    If you really dropped objects under sys, I will say that your database is corrupted. Therefore it cannot be recovered without a backup.
    Chris

  • Generating .sql script for all objects of a User/Schema

    Hi All,
    What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
    We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
    Thanks
    -AKJ

    But the easiest way to do this would be to do an export with rows=N and then an import.
    You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
    Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies.

  • View all objects of a user in Oracle

    Hi,
    As I can see in sqlplus all objects that correspond to a user in a schema x.
    Thanks

    Luis_vkacito wrote:
    Hi,
    As I can see in sqlplus all objects that correspond to a user in a schema x.
    Thanksquery DBA|ALL|USER_OBJECTS
    Handle:      Luis_vkacito
    Status Level:      Newbie (5)
    Registered:      Mar 3, 2008
    Total Posts:      121
    Total Questions:      62 (47 unresolved)
    so many questions & so few answers.
    Edited by: sb92075 on Sep 6, 2011 9:10 PM

  • How to delete all objects for one user from SE80

    Hi all,
    If i want to delete the customer objects defined in the customer space Y or Z from SE80. Object of one user is defined in one package, if i want to delete the pakcage it says, it contain the subobject. So can anybody help me how to delete the customer objects from SE80.
    Your response will be highly rewared.
    Tahnks,
    Salahuddin.

    hi
    good
    i think here you want to delege the development class, if you want to delete the particular development class you have to go for se09 where after selecting the particular development class you can select the delete button.
    thanks
    mrutyun

  • Why are BC objects created in user's schema

    Server = Sun Sparc SunOS 5.8, Oracle 8.1.7.4 SID
    Client = Windows 2000, Oracle 9iDS (v9.0.2 w/Jdeveloper v9.0.3)
    Network = 100MB TCP/IP
    I have a schema with relatively large (in my mind) tables master = 225,000 records; detail = 1,200,000 records.
    I've used Jdeveloper 9i to create a business components (Java based) view of these tables.
    When I execute the view (query) and request the last record of the master table, this action takes approximately 1 hr and 40 minutes to accomplish.
    The database is in archive mode.
    The redo logs (3) on the database were 500 KB files (the default created by the DBCA). I was seeing archive files created on the order of one every 10 seconds. I increased the logfiles to be 200 MB and now appear to be getting archives once every 10 minutes.
    I've tracked it down to something taking place in the connected user's tablespace during the query.
    I created a separate tablespace (with it's own temporary tablespace) for my test user. If I did not grant unlimited tablespace to this user, the query failed because the user did not have privilege on the tablespace.
    When I granted unlimited tablespace (is there no middle ground??), the tablespace grew to 290 MB from 128 KB. After disconnecting from the query (quitting the application) the tablespace remained at 290 MB. Upon restarting the query, the used tablespace initially shrunk back to 650KB and then grew again to 290 MB. The temporary tablespace never changed or seemed to be accessed. Both times the query took about1 hr and 40 minutes
    9 objects were created in the users schema, 3 tables, 4 indexes and 2 LOBs.
    My question is why these thing s need to be created for tables that are already indexed and why they would not stay populated for quick reuse. If every one of my users create and populate these tables and indexes for each query session, Ill soon run out of disk space, to say nothing about the ridiculously poor performance.
    Have I made some basic error in the creation of my business components that cause this condition?

    It will spew out a whole lot of diagnostic output. Copy and post that diag and let me have a look at it.Here goes ...... and guess what .... this actually worked, there was no tables created in the user schema and the query only took about 3 or 4 minutes. Something quirky in the JDeveloper / tester way of doing business ???
    [00] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [01] CommonMessageBundle (language base) being initialized
    [02] Stringmanager using default locale: 'null'
    [03] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [04] Loading 5.0 IDE classes
    [05] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [06] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [07] Creating a new pool resource
    [08] BC4JDeployPlatform: LOCAL
    [09] Propertymanager: searching for file and system based properties
    [10] {{ begin Loading BC4J properties
    [11] -----------------------------------------------------------
    [12] BC4J Property jbo.default.language='en' -->(MetaObjectManager) from System Default
    [13] BC4J Property jbo.default.country='US' -->(MetaObjectManager) from System Default
    [14] BC4J Property DeployPlatform='LOCAL' -->(SessionImpl) from Client Environment
    [15] Skipping empty Property ConnectionMode from System Default
    [16] Skipping empty Property HostName from System Default
    [17] Skipping empty Property ConnectionPort from System Default
    [18] BC4J Property jbo.locking.mode='pessimistic' -->(MetaObjectManager) from System Default
    [19] Skipping empty Property ApplicationPath from System Default
    [20] BC4J Property AppModuleJndiName='ctf.database.gpl.bc.BcModule' -->(SessionImpl) from Client Environment
    [21] Skipping empty Property java.naming.security.principal from System Default
    [22] Skipping empty Property java.naming.security.credentials from System Default
    [23] Skipping empty Property jbo.user.principal from System Default
    [24] Skipping empty Property jbo.object.marshaller from System Default
    [25] BC4J Property jbo.use.pers.coll='false' -->(SessionImpl) from System Property
    [26] BC4J Property jbo.pers.max.rows.per.node='70' -->(SessionImpl) from System Default
    [27] BC4J Property jbo.pers.max.active.nodes='30' -->(SessionImpl) from System Default
    [28] Skipping empty Property jbo.pcoll.mgr from System Default
    [29] BC4J Property jbo.txn_table_name='PS_TXN' -->(SessionImpl) from System Default
    [30] BC4J Property jbo.txn_seq_name='PS_TXN_seq' -->(SessionImpl) from System Default
    [31] BC4J Property jbo.control_table_name='PCOLL_CONTROL' -->(MetaObjectManager) from System Default
    [32] BC4J Property jbo.stringmanager.factory.class='use_default' -->(SessionImpl) from System Default
    [33] BC4J Property jbo.fetch.mode='AS.NEEDED' -->(MetaObjectManager) from System Default
    [34] BC4J Property jbo.323.compatible='false' -->(MetaObjectManager) from System Default
    [35] Skipping empty Property JBODynamicObjectsPackage from System Default
    [36] BC4J Property MetaObjectContextFactory='oracle.jbo.mom.xml.DefaultMomContextFactory' -->(MetaObjectManager) from System Default
    [37] BC4J Property MetaObjectContext='oracle.jbo.mom.xml.XMLContextImpl' -->(MetaObjectManager) from System Default
    [38] BC4J Property java.naming.factory.initial='oracle.jbo.common.JboInitialContextFactory' -->(SessionImpl) from Client Environment
    [39] BC4J Property IsLazyLoadingTrue='true' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [40] BC4J Property ActivateSharedDataHandle='false' -->(MetaObjectManager) from System Default
    [41] Skipping empty Property HandleName from System Default
    [42] Skipping empty Property Factory-Substitution-List from System Default
    [43] BC4J Property jbo.project='PM_BC' -->(MetaObjectManager) from Client Environment
    [44] BC4J Property jbo.max.cursors='50' -->(MetaObjectManager) from System Default
    [45] BC4J Property jbo.dofailover='true' -->(MetaObjectManager) from System Default
    [46] BC4J Property jbo.doconnectionpooling='false' -->(MetaObjectManager) from System Default
    [47] BC4J Property jbo.recyclethreshold='10' -->(MetaObjectManager) from System Default
    [48] BC4J Property jbo.ampool.dynamicjdbccredentials='true' -->(MetaObjectManager) from System Default
    [49] BC4J Property jbo.ampool.resetnontransactionalstate='true' -->(SessionImpl) from System Default
    [50] BC4J Property jbo.ampool.sessioncookiefactoryclass='oracle.jbo.common.ampool.DefaultSessionCookieFactory' -->(MetaObjectManager) from System Default
    [51] BC4J Property jbo.ampool.connectionstrategyclass='oracle.jbo.common.ampool.DefaultConnectionStrategy' -->(MetaObjectManager) from System Default
    [52] BC4J Property jbo.ampool.maxpoolsize='2147483647' -->(MetaObjectManager) from System Default
    [53] BC4J Property jbo.ampool.initpoolsize='0' -->(MetaObjectManager) from System Default
    [54] BC4J Property jbo.ampool.monitorsleepinterval='600000' -->(MetaObjectManager) from System Default
    [55] BC4J Property jbo.ampool.minavailablesize='5' -->(MetaObjectManager) from System Default
    [56] BC4J Property jbo.ampool.maxavailablesize='25' -->(MetaObjectManager) from System Default
    [57] BC4J Property jbo.ampool.maxinactiveage='600000' -->(MetaObjectManager) from System Default
    [58] BC4J Property jbo.passivationstore='null' -->(MetaObjectManager) from System Default
    [59] BC4J Property RELEASE_MODE='Stateful' -->(MetaObjectManager) from System Default
    [60] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [61] BC4J Property PoolClassName='oracle.jbo.common.ampool.ApplicationPoolImpl'-->(MetaObjectManager) from System Default
    [62] BC4J Property jbo.maxpoolsize='2147483647' -->(MetaObjectManager) from System Default
    [63] BC4J Property jbo.initpoolsize='0' -->(MetaObjectManager) from System Default
    [64] BC4J Property jbo.poolrequesttimeout='30000' -->(MetaObjectManager) from System Default
    [65] BC4J Property jbo.poolmonitorsleepinterval='600000' -->(MetaObjectManager) from System Default
    [66] BC4J Property jbo.poolminavailablesize='5' -->(MetaObjectManager) from System Default
    [67] BC4J Property jbo.poolmaxavailablesize='25' -->(MetaObjectManager) from System Default
    [68] BC4J Property jbo.poolmaxinactiveage='600000' -->(MetaObjectManager) from System Default
    [69] BC4J Property jbo.assoc.consistent='true' -->(MetaObjectManager) from System Default
    [70] BC4J Property jbo.viewlink.consistent='false' -->(MetaObjectManager) from System Default
    [71] BC4J Property jbo.passivation.TrackInsert='true' -->(MetaObjectManager) from System Default
    [72] Skipping empty Property jbo.ViewCriteriaAdapter from System Default
    [73] BC4J Property jbo.SQLBuilder='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [74] BC4J Property jbo.ConnectionPoolManager='oracle.jbo.server.ConnectionPoolManagerImpl' -->(MetaObjectManager) from System Default
    [75] BC4J Property jbo.TypeMapEntries='Oracle' -->(MetaObjectManager) from Client Environment
    [76] Skipping empty Property jbo.sql92.JdbcDriverClass from System Default
    [77] BC4J Property jbo.jdbc.trace='false' -->(MetaObjectManager) from System Default
    [78] BC4J Property jbo.sql92.DbTimeQuery='select sysdate from dual' -->(MetaObjectManager) from System Default
    [79] BC4J Property oracle.jbo.defineColumnLength='as_chars' -->(MetaObjectManager) from System Default
    [80] Skipping empty Property jbo.tmpdir from System Default
    [81] Skipping empty Property jbo.server.internal_connection from System Default
    [82] Skipping empty Property SessionClass from System Default
    [83] Skipping empty Property TransactionFactory from System Default
    [84] BC4J Property jbo.debugoutput='console' -->(Diagnostic) from System Property
    [85] BC4J Property jbo.debug.prefix='DBG: ' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [86] BC4J Property jbo.logging.show.timing='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [87] BC4J Property jbo.logging.show.function='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [88] BC4J Property jbo.logging.show.level='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [89] BC4J Property jbo.logging.show.linecount='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [90] BC4J Property jbo.logging.trace.threshold='6' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [91] BC4J Property jbo.jdbc.driver.verbose='false' -->(Diagnostic) from System Default
    [92] BC4J Property jbo.ejb.txntimeout='1830' -->(SessionImpl) from System Default
    [93] BC4J Property jbo.ejb.txntype='global' -->(MetaObjectManager) from System Default
    [94] BC4J Property jbo.ejb.txn.disconnect_on_completion='false' -->(SessionImpl) from System Default
    [95] Skipping empty Property oracle.jbo.schema from System Default
    [96] BC4J Property jbo.xml.validation='false' -->(MetaObjectManager) from System Default
    [97] BC4J Property ord.RetrievePath='ordDeliverMedia' -->(MetaObjectManager) from System Default
    [98] BC4J Property ord.HttpMaxMemory='102400' -->(MetaObjectManager) from System Default
    [99] Skipping empty Property ord.HttpTempDir from System Default
    [100] BC4J Property ord.wmp.classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' -->(MetaObjectManager) from System Default
    [101] BC4J Property ord.qp.classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'-->(MetaObjectManager) from System Default
    [102] BC4J Property ord.rp.classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'-->(MetaObjectManager) from System Default
    [103] BC4J Property ord.wmp.codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' -->(MetaObjectManager) from System Default
    [104] BC4J Property ord.qp.codebase='http://www.apple.com/qtactivex/qtplugin.cab' -->(MetaObjectManager) from System Default
    [105] Skipping empty Property ord.rp.codebase from System Default
    [106] BC4J Property ord.wmp.plugins.page='http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&' -->(MetaObjectManager) from System Default
    [107] BC4J Property ord.qp.plugins.page='http://www.apple.com/quicktime/download/' -->(MetaObjectManager) from System Default
    [108] BC4J Property ord.rp.plugins.page='http://www.real.com/player/' -->(MetaObjectManager) from System Default
    [109] BC4J Property jbo.security.enforce='None' -->(SessionImpl) from System Default
    [110] BC4J Property jbo.security.loginmodule='oracle.security.jazn.tools.Admintool' -->(SessionImpl) from System Default
    [111] BC4J Property jbo.server.useNullDbTransaction='false' -->(SessionImpl) from System Default
    [112] Copying unknown Client property (DBconnection='jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1526)))(CONNECT_DATA=(SID=sidname)))') to session
    [113] Copying unknown Client property (password='apassword') to session
    [114] Copying unknown Client property (JDBCName='dev_oci') to session
    [115] Copying unknown Client property (user='ausername') to session
    [116] Copying unknown Client property (jbo.applicationmoduleclassname='ctf.database.gpl.bc.BcModule') to session
    [117] Copying unknown Client property (ApplicationName='ctf.database.gpl.bc.BcModule') to session
    [118] WARNING: Unused property: LC='Calling Function' found in /oracle/jbo/common/Diagnostic.properties resource
    [119] }} finished loading BC4J properties
    [120] -----------------------------------------------------------Diagnostics: (Properties (re)loaded) Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    [121] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [122] JavaVMVersion: 9.0.3.738 cdov
    [123] JavaVMVendor: Oracle Corp.
    [124] JavaVMName: OJVM Client VM
    [125] OperatingSystemName: Windows 2000
    [126] OperatingSystemVersion: 5.0
    [127] OperatingSystemUsername: MacEwan James
    [128] Jbo323Compatible Flag: false, str: false
    [129] Loading from PM_BC.jpx file
    [130] Loading from indvidual XML files
    [131] Loading the Containees for the Package 'PM_BC.PM_BC'.
    [132] Registered Oracle JDBC driver with BC4J Server
    [133] Connected to Oracle JBO Server - Version: 9.0.3.10.7
    [134] BC4J: Instrumentation disabled
    [135] Loading from /ctf/database/gpl/bc/bc.xml file
    [136] Loading from indvidual XML files
    [137] Loading the Containees for the Package 'ctf.database.gpl.bc.bc'.
    [138] Loading from /ctf/database/gpl/bc/BcModule.xml file
    [139] Loading from /ctf/database/gpl/bc/GplElementView.xml file
    [140] ViewObjectImpl's default fetch mode = 0
    [141] Loading from /ctf/database/gpl/bc/GplElement.xml file
    [142] Loading Typemap entries from oracle.jbo.common.OracleTypeMapEntries
    [143] CSMessageBundle (language base) being initialized
    [144] OracleSQLBuilder reached getInterface
    [145] Oracle SQL Builder Version 3.2.0.0.0
    [146] Loading from /ctf/database/gpl/bc/GplGroupView.xml file
    [147] Loading from /ctf/database/gpl/bc/GplGroup.xml file
    [148] Loading from /ctf/database/gpl/bc/GplPageView.xml file
    [149] Loading from /ctf/database/gpl/bc/GplPage.xml file
    [150] Loading from /ctf/database/gpl/bc/GplParamView.xml file
    [151] Loading from /ctf/database/gpl/bc/GplParam.xml file
    [152] Loading from /ctf/database/gpl/bc/GroupPageIdFkLink.xml file
    [153] Loading from /ctf/database/gpl/bc/GroupPageIdFkAssoc.xml file
    [154] Loading from /ctf/database/gpl/bc/ElementPageFkLink.xml file
    [155] Loading from /ctf/database/gpl/bc/ElementPageFkAssoc.xml file
    [156] Loading from /ctf/database/gpl/bc/ParamElmFkLink.xml file
    [157] Loading from /ctf/database/gpl/bc/ParamElmFkAssoc.xml file
    [158] Using DatabaseTransactionFactory implementation oracle.jbo.server.Database TransactionFactory
    [159] mUsePersColl is false
    [160] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    [161] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    [162] DBTransactionImpl Max Cursors is 50
    [163] Created root application module: 'ctf.database.gpl.bc.BcModule'
    [164] Locale is: 'en_US'
    [165] DefaultConnectionStrategy is establishing an application module connection
    [166] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [167] Creating a new pool resource
    [168] Trying connection/2: url='jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ahost)(PORT=1526)))(CONNECT_DATA=(SID=asid)))' info='{user=ausername, password=apassword, java.naming.security.principal=ausername, java.naming.security.credentials=ausername}' ...
    [169] Successfully logged in
    [170] JDBCDriverVersion: 9.0.1.4.0
    [171] DatabaseProductName: Oracle
    [172] DatabaseProductVersion: Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production JServer Release 8.1.7.4.0 - Production
    [173] ViewRowSetImpl's jbo.viewlink.consistent = false (0)
    [174] Column count: 21
    [175] ViewObject : Created new QUERY statement
    [176] SELECT GplPage.PAGE_ID, GplPage.PAGENAME, GplPage.HEIGHT, GplPage.WIDTH, GplPage.UNITS, GplPage.GRID_SCALE, GplPage.GRID_FLAGS, GplPage.LEFT_GRID_MARGIN, GplPage.RIGHT_GRID_MARGIN, GplPage.BOTTOM_GRID_MARGIN, GplPage.TOP_GRID_MARGIN, GplPage.NUM_MINOR_GRID, GplPage.TYPE, GplPage.ACL, GplPage.CLASS, GplPage.DATE_MOD, GplPage.NUM_ELEMENT, GplPage.LOCKED, GplPage.FLAGS FROM GPL.GPL_PAGE GplPage
    [177] Column count: 11
    [178] ViewObject close prepared statements...
    [179] ViewObject : Created new QUERY statement
    [180] SELECT GplGroup.GROUP_ID, GplGroup.LINK_ID, GplGroup.USERNAME, GplGroup.GROUPNAME, GplGroup.ACL, GplGroup.CLASS, GplGroup.PAGE_ID, GplGroup.TAIL, GplGroup.TEST, GplGroup.SEQ, GplGroup.VERSION FROM GPL.GPL_GROUP GplGroup WHERE GplGroup.PAGE_ID = :1
    [181] Binding null for 1
    [182] Column count: 11
    [183] ViewObject : Re-defining and reusing prepared Statement
    [184] Binding param 1: 2
    [185] JBOTableModel: Recvd Event=[RangeRefreshEvent: GplGroupView2 start=0 count=1]
    [186] $$added root$$ id=-2
    [187] $$added root$$ id=-73
    [188] $$added root$$ id=-2559
    [189] Column count: 11
    [190] ViewObject : Reusing defined prepared Statement
    [191] Binding param 1: 363793
    [192] JBOTableModel: Recvd Event=[RangeRefreshEvent: GplGroupView2 start=0 count=1]
    [193] Removing an unreferenced, available pool instance
    [194] ViewObject close prepared statements...
    [195] ViewObject close prepared statements...
    [196] ViewObject close prepared statements...
    [197] ViewObject close prepared statements...
    [198] ViewObject close prepared statements...
    [199] ViewObject close prepared statements...
    [200] ViewObject close prepared statements...
    [201] Clearing EO cache for ctf.database.gpl.bc.GplPage
    [202] Clearing EO cache for ctf.database.gpl.bc.GplParam
    [203] Clearing EO cache for ctf.database.gpl.bc.GplGroup
    [204] Clearing EO cache for ctf.database.gpl.bc.GplElement
    [205] Clearing EO cache for ctf.database.gpl.bc.GplPage
    [206] Clearing EO cache for ctf.database.gpl.bc.GplParam
    [207] Clearing EO cache for ctf.database.gpl.bc.GplGroup
    [208] Clearing EO cache for ctf.database.gpl.bc.GplElement
    [209] Resetting AM=BcModule
    [210] *** closing jdbc connection now **** (oracle.jdbc.driver.OracleConnection@120)
    [211] mUsePersColl is false
    [212] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    [213] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    BC4J Tester exit code(0)

  • Audit whole schema objects by multiple users or schemas in oracle 11gR2

    OS: LInux
    DB: Oracle 11gR2
    schema as many tables and DML access given to many user/schemas in oracle db.
    AUDIT ALL BY test BY ACCESS; appears to be audit records created only when changes are done using actual owner connection but not grantee..
    I need to audit all the test tables DML and DDL performed not just owner but all the grantees (grantees action should be audited only grantee do dml or ddl on test owner tables not his own tables).
    Need to audit test owner tables accessed by multiple users DML and DDL actions..
    is there any simplest way to do this and can someone please help me out?
    thanks.

    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_4007.htm#i2059073
    Please read the passage labeled 'Auditing by clause'. It answers your question.
    Kindly consult documentation before asking any question.
    Sybrand Bakker
    Senior Oracle DBA

  • Search script generator for all objects and data (!) from a user/schema ?

    Is there a way to create a script which (when run) creates all the existing
    TABLES; INDEXES, KEYS and DATA for a specified user/schema ?
    This (PL-)SQL script should contain all INSERTS for the currently existing rows of
    all the TABLEs.
    When I use e.g. export to Dumpfile I have at first find all TABLEs and components
    which I want to dump. This is rather uncomfortable.
    I just want to specify the user name similar to
    createscript user=karl@XE outfile=D:\mydata\myscript.sql
    Is this somehow possible ?

    So that I understand your requirements exactly, are you asking for your script to ...
    1/ export from database A the entire schema of a specified user
    2/ drop all objects owned by that user in database B
    3/ import the objects from database A into database B
    If so, it sounds to me that a shell script that does a schema level export as Nicholas suggested, and then drops the user from database B using the cascade keyword (e.g. drop user username cascade), recreates the user and then imports the export file into B should do the trick.
    I don't think searching for individual tables and creating the statements to recreate them is the best idea.
    Hope that helps
    Graham

  • Scrip to drop all users

    Hi,
    I want to kill all the sessions connected to the database. And I want to put it on a script so I can run it at night and drop the user and import the schema .
    Thanks

    another option is not to drop the user.
    if the user you will import has same name and password, you may drop just all objects of the user: tables, views, procs....
    you can generate the 'drop objects ' script with sql
    select 'drop '||object_type||' MYUSER."'||object_name||';' from dba_objects where owner='MYUSER'
    and object_type not in ('PACKAGE BODY','INDEX');
    {code}
    something like that...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set user preferred timezone in OBIEE for all objects.

    How to set user preferred timezone in OBIEE for all objects based on users TZ(may be from @{session.timeZone}). without changing My Account -> Preferences

    Check
    Time Zone Specification from http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#4535403
    just in case https://blogs.oracle.com/xmlpublisher/entry/how_to_keep_your_dates_from_go

  • Grant permission to all objects of a schema to apps user(Oracle 10g)

    Dear Fiiends,
    I would like to grant permission on all objects of a particular schema to apps user(Oracle 10g).How do I do it?
    (ex)grant all on <schemaname>.<objectname> to apps with grant option.
    This is the permission i want to give but i can't do it for all objects one by one so how do i do it in a single command.
    Regards,
    Arun

    You can't do it in a single command. You have to give object-by-object privileges (you could grant something like SELECT ANY TABLE, but that applies to every schema in the database and is generally a rather bad idea). You can, however, use a bit of dynamic SQL to do the job, i.e.
    FOR x IN (SELECT * FROM user_tables)
    LOOP
      EXECUTE IMMEDIATE 'GRANT ALL ON schema_name.' || x.table_name || ' TO apps WITH GRANT OPTION';
    END LOOP;You can do the same with other object types, hit DBA_TABLES rather than USER_TABLES if you don't want to run this as the object owner, etc.
    Justin

  • Grant access to all object/tables in other schemas to a user

    Is there any and simple way to grant access to all object/tables in other schemas (more than one) to a scheme/user?
    Thanks.
    Tarman.

    HI.
    grant SELECT ANY TABLE,delete any table, insert any table to user; Giving this delete,insert ANY TABLE privilege to a user can be dangerous and the use can mislead it. Its better to create a dynamic script and then grant it.
    E.g Suppose you want to give select,inert,delete,update privileges to user A on user B's object.
    sql> spool grants.sql
    sql> select 'grant select,insert,update,delete on '||owner||'.'||table_name||' to A;' from dba_tables where owner='B';
    sql>@grants.sqlHTH
    Anand

  • I want to copy all the objects from one user to another... Please help

    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    Please Explain me in detailed way
    Thank you

    SowmyRaj wrote:
    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    If all what you are interested is Scott schema than no need to use the datapump or CTAS. Run demobld.sql in your schema and it would have all the objects of Scott.
    http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html
    HTH
    Aman....

  • Export / import tablespace with all objects (datas, users, roles)

    Hi, i have a problem or question to the topic export / import tablespace.
    On the one hand, i have a database 10g (A) and on the other hand, a database 11g (B).
    On A there is a tablespace called PRO.
    Furthermore 3 Users:
    PRO_Main - contains the datas - Tablespace PRO
    PRO_Users1 with a role PRO_UROLE - Tablespace PRO
    PRO_Users2 with a role PRO_UROLE - Tablespace PRO
    Now, i want to transfer the whole tablespace PRO (included users PRO_MAIN, PRO_USER1, PRO_User2 and the role PRO_UROLE) from A to B.
    On B, I 've created the user PRO_Main and the tablespace PRO.
    On A , i execute following statement:
    expdp PRO_Main/XXX TABLESPACES=PRO DIRECTORY=backup_datapump DUMPFILE=TSpro.dmp LOGFILE=TSpro.log
    On B:
    impdp PRO_Main/XXX TABLESPACES=PRO DIRECTORY=backup_datapump DUMPFILE=TSpro.dmp LOGFILE=TSpro.log
    Result:
    The User PRO_Main was imported with all the datas.
    But i 'm missing PRO_USER1, PRO_User2 and the role PRO_UROLE...
    I assume, i 've used wrong parameters in my expd and / or impdp.
    It would be nice, if anybody can give me a hint.
    Thanks in advance.
    Best Regards,
    Frank

    When you do a TABLESPACE mode export by specifying just the tablespaces, then all that gets exported are the tables and their dependent objects. The users, roles, and the tablespace definitions themselves don't get exported.
    When you do a SCHEMA mode export by specifying the schemas, you will get the schema definitions (if the schema running the export is privied) and all of the objects that the schema owns. The schema does not own roles or tablespace definitions.
    In your case, you want to move
    1. schemas - which you already created 1 on your target database
    2. roles
    3. everything in the tablespaces owned by multiple schemas.
    There is no 1 export/import command that will do this. This is how i would do this:
    1 - move the schema definitions
    a. you can either create these manually or
    b1. expdp schemas=<your list of schemas> include=user
    b2 impdp the results from b1.
    2. move the roles
    expdp full=y include=role ...
    remember, this will include all roles. If you want to limit what gets exported, then use:
    include=role:"in ('ROLE1', 'ROLE2', ETC.)
    impdo the roles just exported
    3. move the user information
    a. If you want to move all of the schema's objects like functions, packages, etc, then you need to use a schema mode
    export
    expdp user/password schemas=a,b,c ...
    b. If you want to move only the objects in those tablespaces, then use the tablespace export
    expdp user/password tablespaces=tbs1, tbs2, ...
    c. import the dumpfile generated in step 3
    impdp user/password ...
    Hope this helps.
    Dean

  • Audit activity for all objects in a schema

    Hi,
    Is there a way to audit all DDL statements and certain DML statements (i.e. DELETE) for all objects in a particular schema? I've been going through the Oracle documentation, and there doesn't seem to be a straightforward way to do this. For example, I've figured out that I can audit all DELETEs (too broad) or DELETEs on a particular schema object (too narrow), but nothing in between.
    The "AUDIT...BY <USER>" statement looked promising, but it doesn't cover statements issued by other users with access to the schema.
    Any help greatly appreciated!

    Is there a way to audit all DDL statements and certain DML statements (i.e. DELETE) for all objects in a particular schema?You can audit all the DDLs you need and the DMLs you need.
    For example, I've figured out that I can audit all
    DELETEs (too broad) or DELETEs on a particular schema
    object (too narrow), but nothing in between.I think you need to explain more on what you need to do because your "but nothing in between" is not clear.
    Something in between ?
    SQL>AUDIT DELETE ON EMP;
    SQL>AUDIT DELETE ON EMP WHENEVER SUCCESSFUL;
    SQL>AUDIT DELETE ON EMP WHENEVER NOT SUCCESSFUL;
    SQL>AUDIT SELECT ON EMP;
    The "AUDIT...BY <USER>" statement looked promising, but it doesn't cover statements issued by other users with access to the schemaYou can audit BY ACCESS, BY PROXY, BY SESSION

Maybe you are looking for

  • Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View

    Todd, Let me try to explain you this time. I have a text field in a TiledViewBean. When I display the page, the text field html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say five times/rows with same name. The html tags look li

  • ITunes 11 Not Responding When I Try to Burn a CD

    So.. I have a Windows PC, Windows 7 64Bit. I installed the latest version of iTunes. When I insert a CD-R to burn, it immediately goes into "NOT RESPONDING" mode. Now, I don't even get that pop-up that allows me to choose CD, Data Disc or MP3 disc. T

  • How do I recover my USB files?

    I attempted to eject my USB drive and the computer said it was not done correctly. I attempted ejecting it again and it worked so I took it out. Upon removeal it dumped some random files from the USB onto my desktop. When I tried to plug it back in a

  • How can I import my .mac address book from online to my computer?

    My macbook was stolen last week, and I am now using an older iBook that we had, but I haven't been able to retrieve my mail address book from the backups I was making. I have most of the contacts in my address book when using .mac web-based email, bu

  • TS1496 my itunes freeze whe i conect the ipod

    My iTunes stop working whe i connect the ipod classic, it doesn't do anything not even synchronize and when i disconect the ipod it goes back to normal , Ineed help i cannot live withouth music p.s. I got the latest version of iTunes Message was edit