Users and Tablespaces

Specs:
OS: Win 2003 Sp1
Oracle 9i - rel2 (9.2.0.5.0)
I had something like 200 users and dedicated tablespaces associated to them. Eventually, I ran into a usual very natural and obvious problem of -running low on disk space. So I took a task to free some space off by deleting some tablespaces - not realising that there will be users who will have these tablespaces assigned to them as their default tablespace.
Now, having deleted these tablespaces - I need to clear these users off - so whats the best way to do it?
What will happen to these users?

Eric,
The objects owned by those users were dropped with the tablespaces.Not all objects, but all segments. If users are owners of procedures/functions..., these ones still exists.
Paul,
cascade is probably redundant,That depend, for the same reason (if functions/proc exists) :
SQL> create user testuser identified by testuser;
User created.
SQL> grant create session, create procedure to testuser;
Grant succeeded.
SQL> conn testuser/testuser;
Connected.
SQL> create or replace procedure test_proc is begin null; end;
SQL> /
Procedure created.
SQL> conn / as sysdba
Connected.
SQL> select default_tablespace from dba_users where username='TESTUSER';
DEFAULT_TABLESPACE
USERS
SQL> select segment_name from dba_segments where tablespace_name='USERS' and owner='TESTUSER';
no rows selected
SQL> drop user testuser;
drop user testuser
ERROR at line 1:
ORA-01922: CASCADE must be specified to drop 'TESTUSER'
SQL> drop user testuser cascade;
User dropped.
SQL> @OP,
You probably need to take care with a script which drop users, in case of some users are users without being schema (not owner of any objects), and for users which aren't the owner of any segments, and which you want to keep.
Nicolas.
Message was edited by:
N. Gasparotto

Similar Messages

  • Finding out the source user and tablespace in a database export

    Hi folks,
    Lets say a customer gave us a export of their DB using expdp or exp, whats the best way to find out what users and tablespaces are in that export? With exp Ive used imp and created a index file but it seems a datapump export doesnt give up this information so easily. Short of going back to a customer and asking, whats the best technique?
    -Mark

    No this doesnt really give enough info. It give a hint toward the tablespace but not the user:
    $ grep "ORCH" test.sql
    sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'ORCHTST.VODACOM.CORP', inst_scn=>'53131043');
    In the above example I know the user and tablespace will contain the charaters "ORCH" in part and this only shows the one entry.

  • In weblogic server when I Setting Up a User and Tablespace for the Server M

    In weblogic server when I Setting Up a User and Tablespace for the Server Migration Leasing Table in Sql Plus I got an error. ORA-00972: identifier is too long

    Refer: How to: Grant User Access to a Report Server (Report Manager), but this gives a step-by-step procedure for
    adding users who are a part of the Domain. In your case you are trying to add users who are not a part of the domain, meaning, you are trying to create users only specific to Reporting Services, am I right?
    But Reporting Services either relies on AD to authenticate the users, or you can create a custom-authentication extension to authenticate the users.
    In your case, you might need use a custom security extension, and use that to create/delete/modify users. Check the Forms authentication Sample here:
    http://msftrsprodsamples.codeplex.com/wikipage?title=SS2008%21Security%20Extension%20Sample&referringTitle=Home
    Other references:
    Implementing a Security Extension
    How to: Configure Custom or Forms Authentication in Reporting Services
    Hope this helps
    Chaitanya( Twitter |
    Blogs )
    Any documentation bug? Tell us about it at
    Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    The next CTP for SQL Server Code Name "Denali" is coming soon.
    Sign up now to be notified of the next CTP release.

  • Total number of Users and Tablespaces in EBS

    Hi,
    I want to know how many total number of Oracle database users are there inn Oracle EBS R12, and how many number of tablespaces are there in EBS. what docx should I consult for this sort of information. Kindly send me the links of such info.
    Regards,
    Abbasi

    Hi,
    Please see these links/docs.
    Connected users
    http://forums.oracle.com/forums/search.jspa?threadID=&q=Connected+users&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Note: 131704.1 - Database Scripts Library Index
    Thanks,
    Hussein

  • New RMAN catalog in existing EMREP database - new user and tablespace?

    Hi all,
    I am FINALLY getting "with the times" and trying to get my databases to back up with RMAN. I already have a dedicated server that is running Oracle Enterprise Manager 10g Grid Control, so it already has the OMS database on it, called EMREP. I was hoping to just use this database as my RMAN catalog, is that considered good practice or not?
    So assuming this practice is considered OK, I know that I need to create a new user (which I'll just call RMAN) in this database. Would it be best to also create a separate tablespace for this user? I have no idea how big I should expect this RMAN schema to get. I'm sure it all depends on the number of databases I'm backing up, but can anyone give me some realistic size expectations that I could start with?
    Any advice/info is greatly appreciated!

    I think that the catalog is only applicable if you will have several databases to manage.
    If you he will have only one, I dont see necessity to use the catalog, therefore with backups of controlfiles only, you can to execute the tasks of backup/restore/recovery.
    But, for catalog creation information, see
    RMAN CATALOG CREATION STEP BY STEP by Joel Pérez
    RMAN ( CATALOG CREATION ) STEP BY STEP by Joel Pérez
    Message was edited by:
    ARF

  • Info about user and tablespace

    i have created a tablespaces with names TS1 and TS2
    then created a user ts1 with the default tablespace as TS1
    is there anyway by which the user can create tables in tablespace TS2.?
    ts1 user is created in tablespace TS1.....
    will he be able to create tables in TS2 even if he has admin privileges.?
    thnq

    alter user <user_name> quota unlimited on <tablespace_name>;
    alter user <user_name> quota 1M on <tablespace_name>;
    Once you define a quota either unlimited or not, the user will be able to create objects as long as it has enough privileges, you are supposed to grant at least the create table privilege to the user, otherwise, even if it has enough quota, it won't be able to create segments.
    ~ Madrid

  • User and Tablespace info

    Hi,
    I have to create some scripts to create a new and empty DB ready for a new install of our apps on a new server.
    I am easily getting the tables, views etc info from SQL Developers Export facility (without the data of course), but I have a problem where I need to define the userid and the TableSpace.
    I realise these are quite straight forward, but what I would like to know is how the original ones are defined on our current DB, as the original scripts (and info) are no longer available, and I need to make sure I create them correctly with the new scripts.
    So how do I display all the required info for a userid and for a TableSpace so that I can use this info in the create commands in the scripts ?
    It may be helpful for you to know this is my first attempt at scripting and only my 2nd attempt at and interfacing with Oracle, so I have limited knowledge in this field, hence the simple request. :)
    Any help or advice would be most appreciated.
    Cheers, George.

    942589 wrote:
    Hi,
    I have to create some scripts to create a new and empty DB ready for a new install of our apps on a new server.
    I am easily getting the tables, views etc info from SQL Developers Export facility (without the data of course), but I have a problem where I need to define the userid and the TableSpace.
    I realise these are quite straight forward, but what I would like to know is how the original ones are defined on our current DB, as the original scripts (and info) are no longer available, and I need to make sure I create them correctly with the new scripts.
    So how do I display all the required info for a userid and for a TableSpace so that I can use this info in the create commands in the scripts ?
    It may be helpful for you to know this is my first attempt at scripting and only my 2nd attempt at and interfacing with Oracle, so I have limited knowledge in this field, hence the simple request. :)
    Any help or advice would be most appreciated.
    Cheers, George.DBMS_METADATA.GET_DDL
    or just export (expdp) & import (impdp)
    Read The Fine Manuals found at http://docs.oracle.com

  • Export users , roles and tablespace definotion

    Hello,
    I would like to export (and after then import to another DB) users and roles from DB. How can I simply do this?
    And second question: how can I export tablespace definitions?
    Thanks
    SASA

    $ exp help=y
    Export: Release 8.1.7.4.0 - Production on Fri Oct 31 14:01:52 2003
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    You can let Export prompt you for parameters by entering the EXP
    command followed by your username/password:
    Example: EXP SCOTT/TIGER
    Or, you can control how Export runs by entering the EXP command followed
    by various arguments. To specify parameters, you use keywords:
    Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
    Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
    or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
    USERID must be the first parameter on the command line.
    Keyword Description (Default) Keyword Description (Default)
    USERID username/password FULL export entire file (N)
    BUFFER size of data buffer OWNER list of owner usernames
    FILE output files (EXPDAT.DMP) TABLES list of table names
    COMPRESS import into one extent (Y) RECORDLENGTH length of IO record
    GRANTS export grants (Y) INCTYPE incremental export type
    INDEXES export indexes (Y) RECORD track incr. export (Y)
    ROWS export data rows (Y) PARFILE parameter filename
    CONSTRAINTS export constraints (Y) CONSISTENT cross-table consistency
    LOG log file of screen output STATISTICS analyze objects (ESTIMATE)
    DIRECT direct path (N) TRIGGERS export triggers (Y)
    FEEDBACK display progress every x rows (0)
    FILESIZE maximum size of each dump file
    QUERY select clause used to export a subset of a table
    VOLSIZE number of bytes to write to each tape volume
    The following keywords only apply to transportable tablespaces
    TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
    TABLESPACES list of tablespaces to transport
    Export terminated successfully without warnings.

  • How can I list all users and their DEFAULT tablespace?

    How can I list all users and their DEFAULT tablespace?
    Peter

    Peter, the following short article that lists the most heavily used Oracle rdbms dictionay views might be of interest based on your question:
    How do I find information about a database object: table, index, constraint, view, etc… in Oracle ? http://www.jlcomp.demon.co.uk/faq/object_info.html
    HTH -- Mark D Powell --

  • User, Constraints and tablespaces

    Hi all!
    There is a "dispute" whether is correct or not to let the SYSTEM tablespace (oracle default) during the creation of a user and the constraints (pk) of his tables.
    There's any contro-indications?
    Thanks!
    milena

    If you mean, "Is it ever correct to let a user have the SYSTEM tablesapces as their default?" the answer is NO.
    The SYSTEM tablespace is intended for use with the data dictionary. Allowing users to build any database objects - tables, indexes, whatever - on the SYSTEM tablespace is bad for performance.
    Cheers, APC

  • Alter user default tablespace and temporary tablespace

    Hi guru,
    target : to ensure that users don't have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace
    scenario :
    user default tablespace temporary tablespace
    xxyym system system
    Question: How to alter user ?
    tq

    In a scenario, let's say you want to make USERS the default tablespace for existing users and TEMP the default temporary tablespace, you can also create the alter statements as below into one script based on the output and run it.
    select 'ALTER USER '||username||' DEFAULT TABLESPACE USERS;'  FROM DBA_USERS WHERE DEFAULT_TABLESPACE IN('SYSTEM')
    and username not in('SYS','SYSTEM');
    select 'ALTER USER '||username||' TEMPORARY TABLESPACE TEMP;'  FROM DBA_USERS WHERE TEMPORARY_TABLESPACE IN('SYSTEM');As magnus mentioned, don't forget to do this(if USERS and TEMP is what you want to go with) :
    ALTER DATABASE DEFAULT TABLESPACE USERS;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP;

  • IMPORT DATA TO USER DEFINED TABLESPACE

    I HAVE FACED A PROBLEM REGARDING IMPORT DATA IN A USER DEFINED TABLESPACE.FOR DOING THIS AT FIRST I HAVE CREATED A TABLESPACE SAY USERS ASSOCIATED WITH A DATAFILE NAME AND PATH IS 'D:\ORACLE\ORADATA\ORCL\USERS01.DBF' ITS SIZE IS 200M.IN THE SAME PATH THERE IS A TEMPORARY TABLESPACE ASSOCIATED
    WITH A DATAFILE NAMED 'D:\ORACLE\ORADATA\ORCL\TEMP01.DBF' ITS SIZE IS 80M.
    THEN ASBESCO USER CREATED IN USERS TABLESPACE THROUGH THIS SQL COMMAND.
    CREATE USER ASBESCO IDENTIFIED BY ASBESCO
         DEFAULT TABLESPACE USERS
         TEMPORARY TABLESPACE TEMP
         QUOTA UNLIMITED ON USERS
         QUOTA UNLIMITED ON TEMP;
    GRANT PRIVILAGE TO ASBESCO USER BY THIS SQL .
    GRANT CONNECT,RESOURCE,DBA TO ASBESCO;
    MY EXPORT FILE NAME IS ASBESCO.DMP WHICH IS EXPORTED FROM ANOTHER MACHINE. I WANT TO IMPORT THIS INTO MY MACHINE'S SPECIFIED TABLESPACE. ITS SIZE IS APPROX 26 MB.
    NOW I MPORT ASBESCO.DMP FILE THROUGH THIS COMMAND..
    IMP SYSTEM/<SYSTEM PASSWORD> FILE= ASBESCO.DMP FROMUSER=ASBESCO TOUSER=ASBESCO.
    AFTER SUCCESSFULL IMPORT OPERATION I HAVE SEEN ALL OBJECTS IN ASBESCO USER ARE CREATED IN SYSTEM TABLESPACE NOT USERS TABLESPACE. WHY?
    IT IS TO BE NOTED THAT I HAVE NOT MENTIONED THE DEFAULT TABLESPACE 'USERS' WHEN I CREATED MY USER OBJECTS.

    Please change to lower case letters
    If the user has UNLIMITYED tablespace privilige
    Revoke it
    If the user has a privelegs on a tablespace
    Revoke it
    Create a new tablespace and assign it to the user as Default tablespace.
    then import

  • How to find username and tablespace name indatapump import

    I have a datapump export without the logfile .I would like to import it into a db.Before starting import I would like to know the schema and tablespace which it is exported so that I can remap the schema and tablespace to some other.Is there anyway I can do this

    You can run your import command but add this:
    include=tablespace,user sqlfile=look.sql
    The file look.sql will have the create tablespace commands and the create user commands.
    Edit look.sql to see what the tablespace and user names are.
    Dean

  • Change in the oracle 11g user default tablespace

    Hi All,
    Just wanted to clarify a satiuation where i had to change the default tablespace of an user/schema ( creating a new tablespace and assigning it to the user )   and take the export (expdp) of it,  and import back to the same user will it have all the objects  which were owned by that user before .
    1. create a new tablespace abc .
    2 Assigne that tablespace to an existing user/schema ( It has a different tablespace previously)
    3. expdp 'user'
    4.impdp 'user'
    will this retain all the objects of the user ?
    Any expert suggestion is highly apprciated .
    thaniks in advance

    793075 wrote:
    Hi All,
    Just wanted to clarify a satiuation where i had to change the default tablespace of an user/schema ( creating a new tablespace and assigning it to the user )   and take the export (expdp) of it,  and import back to the same user will it have all the objects  which were owned by that user before .
    1. create a new tablespace abc .
    2 Assigne that tablespace to an existing user/schema ( It has a different tablespace previously)
    3. expdp 'user'
    4.impdp 'user'
    will this retain all the objects of the user ?
    Any expert suggestion is highly apprciated .
    thaniks in advance
    What prevents you from doing this yourself and seeing for yourself what the behavior is?   (How do you think the 'gurus' got to be 'gurus'?)
    If, after conducting your own test, you see behavior you don't understand, I'm sure someone here will help explain the behavior you observe vs the behavior you expected.

  • Move users and schemas from one instance to another

    Hi, I'm starting out in a DBA position.
    My task at the moment is to move users and schemas from one instance to another.
    We're using 9.2.0.7.
    I have concluded that the following steps are necessary to move users and schemas from one instance to another :
    1. Create the needed tablespaces.
    2. Create the users that exist in the source instance
    3. Use exp to do a full export
    4. Use imp to re-create the schemas from the output file created by exp in step 3
    Am I missing anything ?
    Thanks,
    Gabriel

    3. Use exp to do a full exportInstead of doing a FULL export just export the users you want to move and imp that in other database using FROMUSER & TOUSER parameter.
    Daljit Singh

Maybe you are looking for

  • Cannot boot to Windows 8.1 after updating to Yosemite

    I am using a MacBook Pro (Retina 13-inch Late 2013) computer, and mainly use Windows 8.1 via bootcamp on it for work. I have just updated OS X Maverick to OS X Yosemite 10.10, and now when booting and holding option, the Windows and Backup partition

  • How to populate the dropdown key values as shown in the below screen shot

    Hi i am trying to populate the drop down by key value for trader , for Trader we  have few values i need to populate the Those values in values columns . as shown in the below screen shot .

  • Incorrect Where Clause being set in Master Block

    I got a strange error the other day. I have 2 database blocks in a form and the blocks are based on views. So, lets say Block1 is based on View1 and Block2 is based on View2. Block1 and Block2 are also in a Master Detail relationship. So, Block B1 is

  • Create Tasks Due dates

    Hi All, I'm new to SharePoint, I'm having requirement of setting a Project Management tool in which the start date, end date of task to be calculated automatically based on few parameters. For example lets take a Project called Project A which has li

  • Change namespace of DCs

    Hello gurus, I have a question for you I have created into my JDI a SC with a set of DCs. Now I would like to change the value of the namespace prefix of my DCs. Do you know a way of doing that ? To try something, I have created a new product / SC /