Tablespace names and SQLPLUS

Hi,
I need to know if there is a way to name tablespace names in a SQLPLUS command line statement.
For example:
sqlplus <user_name>/<password>@<service> <tablespace_name> <index_tablespace_name>
Can this be done in one statement?
Please post a reply to this discussion and also send me email if you have the answer or need clarification of what the problem.
Thanks,
Joe

Tablespace information is not required at login time (or its a new feature and I dont know about it). If you are logging in to the database all you need is the username, password and the connect string. A user is assigned a default tablespace, that will hold data for any objects the user creates and does not specify storage information while creating those objects, and a temporary tablespace which will be used for sorting etc., but these tablespaces are assigned to a user when the DBA creates the user.
Hope this answers your question.

Similar Messages

  • How to find the tablespace name and schema name from a dump file

    Good day to all,
    I recived a dump file from a client with oracle 11g, and I need do get the tablespace and schema name from the dump file. How can I do that?
    Thanks.
    Flávio Melo
    Edited by: 933141 on 09/05/2012 07:41

    user12038066 wrote:
    Use imp utility, it generates DDL for both tables and indexes. So you will get tablespace info for both.
    Use impdp utility, it generates DDL for indexes only. So you will miss tablesapce info for tables.
    Haven't found a workaround for impdp utility. Anyone knows?Are you sure you are using the impdp utility correctly? Because if you do, then sqlfile should have all gory details.

  • TIPS(22) : EXPORTING TABLES BASED ON TABLESPACE NAME

    제품 : ORACLE SERVER
    작성날짜 : 1996-11-12
    TIPS(22) : Exporting tables based on Tablespace name
    ====================================================
    This script allows the user to enter the tablespace name and creates a list
    of tables in exp format. Additional choices allow the export of over-extended
    tables or tables over a certain size.
    rem list.sql
    rem Give list of tables depending on parameters
    set termout on linesize 75 pagesize 0 verify off feedback off
    clear buffer
    clear columns
    prompt
    prompt This script will create list.out, which can be used
    prompt to give export tables parameter file
    prompt
    accept Segment_Name Prompt 'Enter Seg Name : '
    accept owner Prompt 'Enter Seg Owner : '
    accept tsname prompt 'Enter TableSpace Name : '
    accept min_extents Prompt 'Enter Minimum num of exts : '
    accept min_size Prompt 'Enter Minimum seg size(M) : '
    prompt
    accept expchoice Prompt 'Is this list for exports ? : '
    col srt noprint
    SPOOL list.out
    -- start bit
    select 0 srt, decode(upper('&expchoice'),'Y','tables=(','')
    from dual
    union
    -- data bit without end segment
    select 1 srt, segment_name||decode(upper('&expchoice'),'Y',',','')
    from dba_segments
    where segment_type = 'TABLE'
    and segment_name like upper('&&Segment_Name%')
    and owner like upper('&&owner%')
    and tablespace_name like upper('&&tsname%')
    and extents >= (&&min_extents + 0)
    and bytes >= (&&min_size + 0) * (1024*1024)
    minus
    -- remove last one (with ',' after the name)
    select 1 srt, max(segment_name)||decode(upper('&expchoice'),'Y',',','')
    from dba_segments
    where segment_type = 'TABLE'
    and segment_name like upper('&&Segment_Name%')
    and owner like upper('&&owner%')
    and tablespace_name like upper('&&tsname%')
    and extents >= (&&min_extents + 0)
    and bytes >= (&&min_size + 0) * (1024*1024)
    union
    -- data bit with end segment
    select 3 srt, max(segment_name)||decode(upper('&expchoice'),'Y',')','')
    from dba_segments
    where segment_type = 'TABLE'
    and segment_name like upper('&&Segment_Name%')
    and owner like upper('&&owner%')
    and tablespace_name like upper('&&tsname%')
    and extents >= (&&min_extents + 0)
    and bytes >= (&&min_size + 0) * (1024*1024)
    order by 1,2
    spool off
    set heading on
    ****************************************************************

    Hi,
    You will have to use dynamic sql to create your second cursor.
    DECLARE
         v_sql_query VARCHAR2(400);
         TYPE cur_typ IS REF CURSOR;
         c1 cur_typ;
         mYRec MyTable%rowtype;
    BEGIN
         v_sql_query := 'select * from MyTable';
         OPEN c1 FOR v_sql_query;
              LOOP
              FETCH c1 INTO mYRec;
                   EXIT WHEN c1%NOTFOUND;
                   EXIT WHEN c1%NOTFOUND IS NULL;
    /*processing here*/
              END LOOP;
         CLOSE c1;
    END;
    Regards

  • 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

  • Bypass user name and password prompt for sqlplus on Windows

    Hi folks,
    I had oracle 10g installed on my Windows XP SP2 system and everytime I use sqlplus, it prompts for user name and password. Some folks wrote some Unix shell scripts which invokes "sqlplus" without giving it user name and password, and these scripts are running fine on Solaris. So I would like to make these script to work on my Windows box as well. But obviously, it asks me user name and password every time. Since it is a shell script, sqlplus << EOT .... EOT will fail right away with : Fatal NI connect error 12560, blah blah blah...
    So my question is how to make sqlplus bypass the user name and password questions.
    Thanks,

    No sqlplus /nolog does not connect you to the database, you still need to connect to the database.
    c:\sql>sqlplus /nolog
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Feb 21 15:19:16 2007
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    idle> select * from dual;
    SP2-0640: Not connected
    idle> connect test/test
    Connected.
    test@ORCL> select * from dual;
    D
    X
    Elapsed: 00:00:00.01
    test@ORCL>

  • What is the default user name and password for oracle databse 10g

    Hi: gurus, I just recently installed the oracle 10g personal edition and trying to log on to the enterprise manger, but can't figure it out the user name and password, can some one help me and tell me what is the default user name and password to logon to the oracle instance. BTW during the installation I choose two passowrds one for the schema and one for the global database orcl. I wonder will I be using one of these passwords. Still I don't have any clue for the "User Name".
    thanks

    system/manager and sys/change_on_install are still valid default passwords when database is manually created. If DBCA was used, passwords will be those defined at creation time inside DBCA.
    In case passwords have been forgotten, those can be reset:
    From an OS commnad prompt, set ORACLE_SID, ORACLE_HOME and PATH environment variables, just to make sure you are pointing to the right Oracle Home installation, and issue:
    OS> sqlplus / as sysdba
    SQL> alter user sys identified by yourNewSysPassword;
    SQL> alter user system identified by yourNewSystemPassword;
    And you're done with it.
    HR Madrid

  • Tablespace Name in 11.5.10.2

    Hi group,
    We are working on an environment with 11.5.10.2 Ebusiness Suite application version and 10.2.0.3 database version where there are more than 600 tablespaces with Segment Space Management "Manual".
    Now, I want to rellocate large segments to a different tablespace where Segment Space Auto will be used.
    So my question is, is there any problem if a move these segments to a different tablespace?
    For example: GL_JE_LINES table = 50 Gbytes from GLD to GL_JE_LINES_DATA tablespace name.
    I am not sure if it can cause any problem.
    Any advice or help will be really appreciated.
    Thanks in advance.
    Francisco

    I think rather going this way, you should use oracle supported OATM tablespace model that will take care your need.
    Thanks

  • Can we rename Oracle username & tablespace name in 11g R2

    - We have Oracle tablespace name "TULIP"
    - We have Oracle username "TULIP"
    Default tablespace for use TULIP is TULIP.
    - Now can we rename tablespace TULIP to TULIP_NEW ?
    - Now can we rename username TULIP to TULIP_NEW ?
    Can this be done online when the database is running ?
    If NOT please give me the steps involved.
    Thanks
    Bristol

    Yes you can rename a tablespace.
    ALTER TABLESPACE <tablespace_x> RENAME TO <tablespace_y>;As far as renaming the schema there is no command for that. One approach would be to export the data and re-import using the REMAP_SCHEMA (for Data Pump) option.

  • Tablespace name taking too much size

    Hi all,
    As I have posted alot threads regrading to get free space from a tablespace.
    My problem is, we are using oracle 10g infrastructure and MT for messaging services.One of the tablespace name "IAS_META" is taking too much size and data in the table space is not valuable for us and i want to remove all the data. Please guide how can I do it and what will be the best procedure do it ASAP.
    Thanks in Advance.

    Hi Aijaz,
    I too having the same problem i want to get free space from IAS_META tablespace let me tell you i have 1 OAS R 2 (10.1.2) with Oracle Infrastructure i have deployed wireless application on OAS which is syncronized with Oracle Infrastructure & now IAS_META is totaly full and i want to get free space from this tablespace Please let me know how i will get
    Thanks,
    Waheed

  • Oracle e business suite user name and password to login oracle bi?

    Hi,
    it is possible to use oracle e bussiness suite user name and password to login oracle BI PUBLISHER SERVER.??
    we are using 11.1.1.6.0 OBIEE and R12 (12.0.6) e business suite.

    SAURAV KUMAR SINGH wrote:
    During Oracle Installation i have given SID : RD1 & Password :admin@1234
    ... insert BUZZER sound here ...
    Using "@" in a password for a DB User is not supported at all (allthough it works).
    I did so myself once and I think it was possible to get a connection utilize quotes,
    but I do not remember which ones in what way.
    Could have been like
    sqlplus "sapsr3/admin@1234"
    but not very sure any more.
    My be toy around with this, but more easy is to use brtools and change the
    password to contain only valid oracle letters.
    The problem with "@" is, that it delimits the SQLNET Connect identifier.
    Volker
    Oh, and for executing brtools, do not provide a user at all or only "-u /"
    This should do a sysdba connect.
    Edited by: Volker Borowski on Jan 30, 2012 7:25 PM

  • Old db2 tablespace names in HR SP22 error log

    Hi all,
    We are applying HR support packages on a test box.  This test instance is a copy of our production ERP instance.  The copy was done using a backup/restore off the PRD database.
    We get an error when applying SAPKE60020 because it is trying to create a table in a tablespace that does not exist.  The tablespaces it is trying to access are of the pattern PRD#STABD, PRD#POOLD etc.   PRD is copied to TST.
    I have updated tables TADB6, TSDB6 and IADB6 and changed PRD to TST for all tablespaces.  At the OS level if I run a "db2 list tablespaces" all the names show up as TST#<tablespacename>.
    I am not sure why it is trying to access PRD#<tablespace>.  Is there someplace else I need to make a change from the old name?
    Thanks,
    Kevin

    Hi Kevin,
    no I am running out of ideas. As Dirk mentioned the tablespace names are only maintained in tables TADB6, IADB6 and TSDB6. The SAP DDIC assembles CREATE TABLE statements for new tables using those table entries.
    If you have changed all entries with the old SID in these tables and if you haven made sure that no old entries are buffered in the SAP table buffers ( $SYNC )
    , the SAP DDIC should not generate CREATE TABLE statements for new tables containing the old tablespace names any more.
    For existing tables that need to be converted the SAP DDIC reads out the current tablespace location from SYSCAT.TABLES and stores them into table DDSTORAGE before the table is dropped. For recreating the tables the DDIC then uses the DDSTORAGE entries. If no DDSTORAGE entries exist DDIC again falls back to TADB6, IADB6 and TSDB6.
    If no table conversion is running table DDSTORAGE is usually empty.
    Regards
                  Frank

  • Invalid User Name and Password in RCU

    I am trying to install SOA 11g in my machine (Windows 7 64 Bit).
    I have successfully installed the following
    1. JDK (Java 6 Update 45)
    2. Oracle XE 10g Database
    3. Weblogic Server
    While installing RCU, I am facing issue with Invalid User Name and Password. <<Attaching File = RCU_Error.jpg>>
    I am able to connect to database using sqlplus (for XE) with user = system. <<Attaching File = sqlplus.jpg>>
    Can anyone help on this?

    Hi Banerjee,
    SOA 11g is not certified or supported with DB 10.2.0.1 so request you to either upgrade the DB to 10.2.0.4 or use 11g DB.
    Regards,
    Prakash.

  • Sysdba's name and pwd

    Does anybody know who is sysdba and sysdba's name and password?
    I only know you can login this way: sqlplus system/pwd as
    sysdba, does sysdba is a seperate user from system, sys or
    internal?

    SYSDBA and SYSOPER are not userids but privileges.
    You should set up a password file using the password utility,
    and setting the REMOTE_LOGIN_PASSWORD_FILE=EXCLUSIVE. You
    should then be able to grant SYSOPER and SYSDBA privileges to
    other users.
    To see the list of privileged users:
    SELECT * FROM v$pwfile_users
    I am not sure if everybody can log on as SYSDBA until the
    password file is set up.

  • How do I obtain column names and types?

    I am using Visual Studio C++ to connect and query an Oracle database using SQL commands. My code works, but I don't fully understand it because I'm new to Oracle and it is modified example code.
    I need to obtain column names and types for a known table. The "Describe" SQL command fails when I call ->Execute, claiming this is an invalid SQL statement, although the same statement works when sent directly via sqlplus.
    I need column names and types, but they don't have to come through Describe.

    Hi,
    Desc isn't really a SQL command. Rather its a command specific to Oracle. Thats why it will work in SQLPlus and not anywhere else. If you want the column information for a table you can user either the user_tab_columns or all_tab_columns, depending on which schema the table is in. The query would look like:
    select * from all_tab_columns where table_name = 'BONUS'
    Sanjay

  • Need user name and password to install on new computer...

    I just switched from PC to Apple, and when I try to install my Contribute 2.0, I'm being asked for a User Name and Password. Unfortunately, I'm not aware of what the user name and password might be. How can I get them so that I can complete the installation process? Your help is greatly appreciated.
    Thanks!

    SAURAV KUMAR SINGH wrote:
    During Oracle Installation i have given SID : RD1 & Password :admin@1234
    ... insert BUZZER sound here ...
    Using "@" in a password for a DB User is not supported at all (allthough it works).
    I did so myself once and I think it was possible to get a connection utilize quotes,
    but I do not remember which ones in what way.
    Could have been like
    sqlplus "sapsr3/admin@1234"
    but not very sure any more.
    My be toy around with this, but more easy is to use brtools and change the
    password to contain only valid oracle letters.
    The problem with "@" is, that it delimits the SQLNET Connect identifier.
    Volker
    Oh, and for executing brtools, do not provide a user at all or only "-u /"
    This should do a sysdba connect.
    Edited by: Volker Borowski on Jan 30, 2012 7:25 PM

Maybe you are looking for