Creation of table space in SQLPlus

How to create a tablespace thro' SQLPlus (command) - Using 10gR2 on windows
Thax Shabar

Shabar,
sql> create tablespace mytablespace datafile '/location_to_datafile/mytest_dat01.dbf' size 256M autoextend on next 128 M maxsize unlimited;
or
sql> create tablespace mytablespace datafile '/location_to_datafile/mytest_dat01.dbf' size 256M autoextend on next 128 M maxsize 8192M;  -- grow upto 8GBRegards
Edited by: OrionNet on Mar 4, 2009 12:05 AM

Similar Messages

  • BRtools table space creation error

    hi,
    Iam trying to create new table space in my R/3 system. When i went to brtools - space management sytem throwing error owner failed.I tried with all users to login like ( <SID>adm,administrator etc ...)even then same problem.Could you please suggest how to create table space with what login id
    Error:
    Main options for creation of tablespace in database WA6
    1 - Tablespace name (tablespace) ......... [PSAPECDATA]
    2 - Tablespace contents (contents) ....... [data]
    3 - Segment space management (space) ..... [auto]
    4 - SAP owner of tablespace (owner) ...... [EC5ADM]
    5 - Data type in tablespace (data) ....... [both]
    6 # Joined index/table tablespace (join) . []
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    c
    BR0280I BRSPACE time stamp: 2006-06-14 21.08.45
    BR0663I Your choice: 'c'
    BR0259I Program execution will be continued...
    BR0824E Owner EC5ADM not found in database or not SAP owner
    BR0691E Checking input value for 'owner' failed
    BR0669I Cannot continue due to previous warnings or errors - you can go back to
    repeat the last action
    BR0280I BRSPACE time stamp: 2006-06-14 21.08.45
    BR0671I Enter 'b[ack]' to go back, 's[top]' to abort:
    Please suggest.
    - Cheers

    Login as ora<sid> and run brtools. Tablespace owner will be SAP<SID> or SAPR3 depends upon your version.
    Thanks
    Prince

  • Capacity Planning for Creation of Table

    Hello Guys,
    I just need some advise here.
    I have been told to work out the space needed for the creation of a table.
    The table in question would have three columns with datatypes [num(10), varchar(10),date] and would be loaded with 100,000 rows. How do I go about it.
    Thanks in Advance

    Try with something like this, may help you.
    Prerreqs: parameter OPTIMIZER_MODE != RULE.
    grant to execute DBMS_SPACE
    DDL Table creation:
    CREATE TABLE SAMPLE
    ID               NUMBER(9),
    NAME             VARCHAR(50),
    CREATE_DATE_TIME DATE,
    MOD_DATE_TIME    DATE,
    USER_ID          VARCHAR(15)
    set serveroutput on
    declare
       calc_used_bytes  NUMBER;
       calc_alloc_bytes NUMBER;
       cols             sys.create_table_cost_columns;
    begin
       cols := sys.create_table_cost_columns
               sys.create_table_cost_colinfo('NUMBER',   9),
               sys.create_table_cost_colinfo('VARCHAR2', 50),
               sys.create_table_cost_colinfo('VARCHAR2', 15),
               sys.create_table_cost_colinfo('DATE',     NULL),
               sys.create_table_cost_colinfo('DATE',     NULL)
       DBMS_SPACE.CREATE_TABLE_COST (
           tablespace_name => 'USERS',
           --avg_row_size    => 100,   quitar comentario para 11g
           row_count       => 5000,
           pct_free        => 10,
           used_bytes      => calc_used_bytes,
           alloc_bytes     => calc_alloc_bytes
       dbms_output.put_line('Used      (M): '||round(calc_used_bytes/(1024*1024)));
       dbms_output.put_line('Allocated (M): '||round(calc_alloc_bytes/(1024*1024)));
    end;
    /More info: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_space.htm#i1003180
    Regards.
    johnxjean
    Edited by: johnxjean on 18-Mar-2011 09:43
    Edited by: johnxjean on 18-Mar-2011 09:44

  • Unable to increase table space

    Hi,
    i am getting this error on sap apoo 3.1 ides sytem
    ORA-001653 Unable to increase table space PSAPEL46DD #
    Can any one tell me who do i increase the tables space step by step
    Thanks
    Priya

    Hi,
    You can do it in couple of ways,ie either with sapdba or brtools.
    execute sapdba or brtools and follow the menu options(its quite straight forward)
    or you can do it through sqlplus with the command
    ALTER TABLESPACE PSAPEL46DD  ADD DATAFILE '/path of the file ' size xxxM;
    Regards,
    Cherry

  • Significance of Initial (intial_extent)parameter while creation of table

    Hi All,
    I am designing a new schema for my 10g database and I am in process of creation of tablespaces and tables.
    My Tablespace are extent management local autoallocate and auto segment space management.
    With “segment space management Auto”, I understand that I don’t have to define storage clause in tablespace and freelist will be taken care by bitmap
    My question is
    while creation of tables what’s the significance of Intial (intial_extent in user_tables) parameter.?
    Do I need to consider this parameter while defining large and small tables?
    Is this not controlled by “auto segment space management.” Parameter of tablespace.?

    While it is unlikely to make a measurable impact on anything in practice, it is almost always preferable in theory, assuming perfect knowledge of the system, to have a few different tablespaces with different uniform extent sizes and to put each object in the appropriate tablespace for its size (i.e. giant tables in the tablespace with giant extent sizes, tiny tables in the tablespace with tiny extent sizes, etc.). The problem with this, however, is that you very rarely have perfect knowledge in advance about object sizes and growth and size patterns are likely to evolve over the life of the system, so you can suck up a great deal of DBA and developer time gathering and maintaining this sort of information as well as responding to changes over time (i.e. moving objects from one tablespace to another as their usage patterns change). For most systems, the potential benefit to having a perfect setup, rather than putting everything in an AUTOALLOCATE tablespace, is far smaller than the cost of actually doing so.
    Unless you have some reason to believe that your application is in the minority where squeezing the last bit of storage efficiency is worth the hassle, I'd tend to suggest throwing everything in an AUTOALLOCATE tablespace.
    Justin

  • Can't add new datafile into a table space?

    Hi, Oraclers,
    I am learning Oracle. I found one problem: I can't add new datafile to an existing
    table space. I tried to add via OEM and SQLPlus. None of them works.
    I can see that the datafile, say ras01.dbf, is in my hard drive. But I can't see
    it via OEM datafile.
    Also, this datafile creating procedure has never stopped. In SQLPlus, after I
    submitte ths statement, after 7 days, this sql statement is still running. The
    same thing happened in OEM.
    The sql statement is:
    ALTER TABLESPACE "RASBLK"
    ADD
    DATAFILE
    'H:\ORACLE\PRODUCT\10.1.0\ORADATA\NMDATA\RAKBLK35.DBF' SIZE
    26214400K REUSE AUTOEXTEND
    ON NEXT 2048M MAXSIZE 30720M
    Oracle is 10g V10.1.0.2.0
    os is Window Server 2003 Service Pack 1.
    What's the problem?
    Thanks,
    Message was edited by:
    shinington

    so you have definitely tried to use a Winlows Server with NTFS for a 1TB++ Database ?
    I never heard of that and I wouldn't even dare to dream of that, but as stated above theoretically (that is: according to MS) this should work.
    But surely your process has crossed some internal limitations, at least that is what it looks like.
    I guess you must go to your %ORACLE_BASE%\admin\%SID%\bdump or udump directories to eventually find a trace file there.
    recommendation is: move to some kind of bigger system (Solaris,AIX).

  • When do i need to create table spaces ?

    hi all,
    i know that any database has one table space and one data file at first creation , but
    when do i need to create another table space or data file ? do i need that when oracle tells me that there is no space anymore or what ?
    thanks

    newbi_egy wrote:
    hi all,
    i know that any database has one table space and one data file at first creation , but
    when do i need to create another table space or data file ? do i need that when oracle tells me that there is no space anymore or what ? In oracle database, the concept of storage segregation is done by two ways, using the schema and using the tablespace. So assume that you have two applications . One is used for HR related work and another is used for Finance and both kind of data is stored in one single database only. So how would you maintain such requirement? There are two ways to do it. One, you make two different schemas for each of the application and call them, for example HR schema and Fin schema. Now, you can create objects related to each of the application in it's own schema and store it in may be a single tablespace, Users. But this is going to be a little problematic like what would happen if you have lost the data file of that tablespace? You would be losing the data related to both the applications. So the better option would be to use two different tablespaces and store the data related to each application in both of them.
    Understand that tablespace is a logical structure only. The only thing that's physical is going to be those data files which are stored under the tablespace. So if you are just running out of space in a data file of a tablespace, you do not need to create another tablespace. Take it like this that if you are running out of space for your family in the house, you can either make a new house for them or you can even build a new floor for them. Which one would be easier to manage, the new floor since a lot of ground work is already done for you. And that's what is the case if you have run out of the space in the data file. For this,you can simply create a new datafile(building a new floor) or even extend the existing one(construct a new room in the same floor, if you have space) . But creating a new tablespace won't be something that you should be doing for the reason of space being exhausted IMO.
    Aman....

  • Getting error message while creating encrypted table space

    I have created an oracle wallet and while creating table space I am getting the following error..
    Please provide me some thougts on this
    Wallet status is below
    file    /usr/tp/sys/oracle/admin/ofss41d2/wallet    OPEN
    the tablespace creation syntax is
    CREATE TABLESPACE corxpr_app_dat DATAFILE '/data/oracle/oradata/ofss41d2/corxpr_app_dat.dbf' SIZE 10M AUTOEXTEND   ON ENCRYPTION USING 'AES256' DEFAULT STORAGE(ENCRYPT);
    The error is
    Error starting at line 7 in command:
    CREATE TABLESPACE corxpr_app_dat DATAFILE '/data/oracle/oradata/ofss41d2/corxpr_app_dat.dbf' SIZE 10M AUTOEXTEND   ON ENCRYPTION USING 'AES256' DEFAULT STORAGE(ENCRYPT)
    Error at Command Line:7 Column:0
    Error report:
    SQL Error: ORA-28374: typed master key not found in wallet
    I am using Oracle 11.2.0.3.0

    Hello Bharati,
             you need to give the value of the constant by selecting from the source parameter.Hope this answer helps you.
    Assigning Points = Thanks in SDN
    Thanks & Regards
       Jai

  • Table space not getting cleaned after using free method (permanent delete)

    Hi ,
    We are using the free method of the LIB OBJ, to permanently delete the objects. As per documentation, the ContentGarbageCollectionAgent will be cleaning the database which runs in a scheduled mode. But the log of that ContentGargabageCollectionAsgent shows, all zero for objects without reference, objects cleared,etc. I.e the table space remains the same before and after deleteing all the contents in the cmsdk database. But the agent is running as per the schedule but just comes out doing nothing.
    Can anbody put some light on this issue.
    thanks
    Raj.

    Hi Matt,
    Thanks for replying. It's been a very long time waiting for you ;)
    ---"Are you running the 9.2.0.1, 9.2.0.2, or 9.2.0.3 version of the Database?"
    we are using 9.2.0.1
    ---"If you installed the CM SDK schema in the "users" tablespace ......."
    Yes we are using USERS tablespace for our Development.
    I ran the query. The result is:
    SYSTEM MANUAL NOT AFFECTED
    USERS MANUAL NOT AFFECTED
    CTXSYS_DATA MANUAL NOT AFFECTED
    CMSDK1_DATA MANUAL NOT AFFECTED
    (USERS belongs to develpoment cmsdk schema. And CMSDK1 for Prod CMSDK schema)
    From the results I see only "Manual", but still I don't see the tablespace size being coming down. Both table space sizes (USER and CMSDK1) always grows higher and higher.
    Also to let you know, We use ORACLE EM Console (Standalone) application to see the oracle databse information online. Will there be any thing to do with the tool we use to see the table space sizes. We make sure we always refresh it before making a note.
    So is there anything else I can see. Once I saw the ContentGarbageCollection agent to free 1025 objects and deleted 0 objects. But I don't see any change in the table space size. I am little confused b/w freed and deleted.
    thanks once again for your response Matt.
    -Raj.

  • What is difference between table space and shchema

    what is difference between table space and shchema ?

    784633 wrote:
    so each user has it own space of tables - schema ?yes, but let's clarify a bit ....
    The "schema" is the collection of all objects owned by a particular user. So if user SCOTT creates two tables, EMP and DEPT, and a view EMP_RPT, and a procedure GET_MY_EMP, those objects (tables, views, procedures) collectively make up the SCOTT schema.
    Those objects will be physically stored in a tablespace.
    A tablespace is a named collection of data files. So tablespace USERS will be made up of one or more data files. A specific datafile can belong to one and only one tablespace. If a tablespace has more than one data file, oracle will manage those files as a collection invisible to the application - much like the OS or disk subsystem handles striping across multiple physical disks.
    A specific object in the SCOTT schema can exist in only one tablespace, but not all objects of the schema have to be in the same tablespace. Likewise a tablespace can contain objects from multiple schemas.
    and can one user to access tables of other users?As others have said - FRED can access tables belonging to SCOTT as long has SCOTT has granted that access to FRED.

  • Space in bytes used by a single index in given table space

    Hi All,
    How can i find a table space used by index in bytes
    Eg:
    suppose i have a table space USERS and i have a table say customer . one index defined on table customer called CUSTOMER_UQ and mapped to table to table space USERS . How can i find the bytes used by object CUSTOMER_UQ in table space USERS.
    Thanks

    The used space in Karthik's example is the number of bytes actually used by entries in the index, not the amount of space allocated to the index itself.
    To find out how much space in disk is allocated to the index you can use (as the owner of the index) something like:
    SELECT bytes FROM user_segments
    WHERE segment_name = <index name>You could also use all_segments or dba_segments if you have access as another user, but you would also need to specify the owner name.
    John

  • Problem regarding the creation of Table using CSS.

    Hi ,
    Here I have a Problem regarding the creation of Table using CSS.
    In My Application i have a table with multiple rows(Rows are Dynamically added to the table).First i am setting the table with the following properties:
    width:900px;
    height : auto,
    Overflow : visible,
    Max-height: : 200px.
    If I use above properties,I'm getting a table with 5 or 6 rows(height upto 200px).After that i am getting the Vertical ScrollBar.
    The problem is when a table has many columns, Vertical and Horizontal Scrolls are coming at the time of setting the table. The table height is not Increasing dynamically.
    How can i use "height" property in CSS? (I want the table height to be increased when the columns are more.)
    Thanks & Regards
    Madhavi

    Hey humble user. Errr I'm trying to understand what ur trying to do. U want to create a section of a region destructively from an existing region right? If so select the option convert to new region (opt-comm-R or selecting it by right clicking). Check your audio bin to make sure. Whats the "merge" function? Are u refering to the glue tool?

  • Reg: Creation of Table Types

    Hi All,
    I have a small question regaridng the creation of Table type.
    Let us suppose I am creating Table type for a custom table zsample which is having 5 fields. I am generally creating a structure similar to custom table and using that structure as line type for the table type. Let us suppose if there are any changes in the custom table like change in the order of fields or if new fields are added the table type will give dump.
    My question is If I use the custom table itself as a line type, will there be any effect in the performance or some thing or I can go ahead and use it..
    Thanks,
    Ravee

    What dump are you expecting ???
    It is idea behind the creation with reference to get structures and tables which always look like
    the tables they refer to.
    I can not see a possibilty for a dump as long as you create only an internal table.
    A dump could appear, if the internal table is later used to update another db-table. But there it should be clear that the structure of an internal should be created with reference to the tables which they change.
    Siegfried

  • Creation of tables using JDBC or SQLJ in webdynpro application

    Hi,
    I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
    Whwn I tried creating a table using JDBC I encountered the following exception.
    com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
    SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
    Does this mean that creating tables is not supported?
    Can anyone help me in this matter?
    Thanks in advance,
    regards
    ~Pradeep Shetty

    Hi Pradeep,
    Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
    However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
    Hope that helps!
    Vladimir

  • MDM Java API (Creation of table)

    Hi,
    can anyone help me for  creation of tables in repository using MDM java API .
    Can u Provide sample code for this.
    Edited by: Srikanth Josyula on Jun 26, 2008 8:52 AM

    Hi Srikanth,
    Check with this code.It may be useful.
    createflattable.java
    Created on June 25, 2008, 5:08 PM
    To change this template, choose Tools | Options and locate the template under
    the Source Creation and Management node. Right-click the template and choose
    Open. You can then make changes to the template in the Source Editor.
    package tabletype;
    import com.sap.mdm.commands.AuthenticateRepositorySessionCommand;
    import com.sap.mdm.commands.CommandException;
    import com.sap.mdm.commands.CreateRepositorySessionCommand;
    import com.sap.mdm.commands.GetRepositoryRegionListCommand;
    import com.sap.mdm.data.MultilingualString;
    import com.sap.mdm.data.RegionProperties;
    import com.sap.mdm.data.RegionalString;
    import com.sap.mdm.net.ConnectionException;
    import com.sap.mdm.net.ConnectionPool;
    import com.sap.mdm.net.ConnectionPoolFactory;
    import com.sap.mdm.schema.TableProperties;
    import com.sap.mdm.schema.commands.CreateTableCommand;
    import com.sap.mdm.schema.commands.GetFieldListCommand;
    import com.sap.mdm.schema.commands.GetTableListCommand;
    import com.sap.*;
    import com.sap.mdm.server.DBMSType;
    import com.sap.mdm.server.RepositoryIdentifier;
    import java.util.Locale;
    public class createflattable {
        /** Creates a new instance of createflattable */
        public createflattable() {
            private static MultilingualString createMultilingualString(RegionProperties[] regionPropertiesList, String baseString)
            MultilingualString mlString = new MultilingualString();
            for (int i = 0; i < regionPropertiesList.length; i++)
                Locale locale = regionPropertiesList<i>.getLocale();
                //Locale locale = regionPropertiesList<i>.getLocale();
                String regionCode = regionPropertiesList<i>.getRegionCode();
                String string = baseString + "_" + locale.getLanguage() + "_" + locale.getCountry();
                RegionalString regionalstring = new RegionalString(string, regionCode);
                mlString.set(regionalstring);
            return mlString;
        private static TableProperties createFlatTable(RegionProperties[] regionPropertiesList)
            //MultilingualString tableName = createMultilingualString(regionPropertiesList, "NewTable" + System.currentTimeMillis());
    MultilingualString tableName = createMultilingualString(regionPropertiesList, "first"+System.currentTimeMillis());
    System.out.println("table is" +tableName);
            TableProperties table = new TableProperties(TableProperties.FLAT);       
            table.setName(tableName);
            table.setCode("NewCode" + System.currentTimeMillis());
            table.setKeyMappable(true);
            table.setDescription("");
            return table;
          public static void main(String[] args) {
                // System Name
         String tag = "";
        ConnectionPool connections = null;
    try {
        connections = ConnectionPoolFactory.getInstance(tag);
    catch (ConnectionException e)
    e.printStackTrace();
    return;
    //////////////// specify the repository to use
    //RepositoryName
    String repositoryName = "";
    //DataBase Name
    String dbmsName = "";
    RepositoryIdentifier  reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.MS_SQL);
    /////// create a repository session
    CreateRepositorySessionCommand sessionCommand = new CreateRepositorySessionCommand(connections);
    sessionCommand.setRepositoryIdentifier(reposId);
    try {
    sessionCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    System.out.println("Currently connected to "+reposId);
    String sessionId = sessionCommand.getRepositorySession();
    /////////// authenticate the repository session
    String userName = "";
    String userPassword = "";
    AuthenticateRepositorySessionCommand authCommand = new AuthenticateRepositorySessionCommand(connections);
    authCommand.setSession(sessionId);
    authCommand.setUserName(userName);
    authCommand.setUserPassword(userPassword);
    try {
    authCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    //////////////////// retrieve the list of tables
    GetTableListCommand tableListCommand = new GetTableListCommand(connections);
    tableListCommand.setSession(sessionId);
    try {
    tableListCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    // get change stamp
      // this is required when we make any kind of changes to the repository
         int changeStamp = tableListCommand.getChangeStamp();
         //////get repository regionlist
    //A command for retrieving the list of regions supported by the repository.
          // retrieve the available regions (languages) for the repository
          // we need this to set up the table name for each region
      GetRepositoryRegionListCommand gm =  new GetRepositoryRegionListCommand(connections);
       gm.setRepositoryIdentifier(reposId);
            try {
               gm.execute();
            catch (CommandException e) {
                e.printStackTrace();
                return;
       //   RegionProperties[] rs = gm.getRegions();
    RegionProperties[] regionPropertiesList = gm.getRegions();
          TableProperties newtable = createFlatTable(regionPropertiesList);
          CreateTableCommand c = new CreateTableCommand (connections);
            c.setSession(sessionId);
          c.setTable(newtable);
       c.setInChangeStamp(changeStamp);
            try {
                 c.execute();
                System.out.println("sdf");
            catch (CommandException e) {
                e.printStackTrace();
                return;

Maybe you are looking for