Problem in Creating a table with Default Tablespace

Hi All,
1) Can anybody plz tell me the syntax to move a table from one tablespace to another.
2) Also, plz tell me the Syntax of when creating a table specifying the tablespace name also.
Regards

1) Alter table <table_name> move tablespace <tablespace_name>
2) example of create table is given below
CREATE TABLE emp123
( employee_id NUMBER(6)
TABLESPACE <tablespace_name>
STORAGE (INITIAL 600
NEXT 600
MINEXTENTS 2
MAXEXTENTS 100 );
Read following doc for more details
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
Cheer,
Virag

Similar Messages

  • ORA-00600 problem when create XMLType table with registerd schema

    Hi,
    I am using Oracle9i Enterprise Edition Release 9.2.0.4.0 on RedHat Linux 7.2
    I found a problem when I create table with registered schema with follow content:
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="body.content">
              <xs:complexType>
                   <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="p"/>
                        <xs:element ref="hl2"/>
                        <xs:element ref="nitf-table"/>
                        <xs:element ref="ol"/>
                   </xs:choice>
                   <xs:attribute name="id" type="xs:ID"/>
              </xs:complexType>
         </xs:element>
    Does Oracle not support element reference to other element with dot?
    For instance, body -> body.content
    Thanks for your attention.

    Sorry, amendment on the schema
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="body.head" minOccurs="0"/>
                        <xs:element ref="body.content" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="body.end" minOccurs="0"/>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>

  • Create new user with default tablespace

    I have created a new tablespace, now i want to create new user but i cannot mention default tablespace and temporary tablespace for the new user.
    how to do this in oracle xe ???

    That's right. Additionally, you can use assistant to perform this task. In the near future you may want to have the SQL Reference handy: http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
    As well as the specific XE Reference manuals: http://www.oracle.com/pls/xe102/homepage?remark=tahiti
    HR Madrid

  • Problem creating a table with a subquery and a dblink

    Hello!!
    I have a little problem. When I create a table with a subquery and a dblink, for example:
    CREATE TABLE EXAMPLE2 AS SELECT * FROM EXAMPLE1@DBLINK
    the table definition is changed. Fields with a type of CHAR or VARCHAR2 are created with a size three times bigger than the original table in the remote database. Field of type DATE and NUMBER are not changed. For example if the original table, in the database 1, has a field of type CHAR(1) it is create in the local database with a type of CHAR(3), and a VARCHAR2(5) field is created with VARCHAR2(15).
    Database 1 has a WE8DEC character set.
    Database 2 has a AL32UTF8 character set.
    Could it be related to the difference in character sets?
    What can I do to make Oracle use the same table definition when creating a table in this way?
    Thanks!!

    That is related to character sets, and probably necessary if you want all the data in the remote table to be able to fit in the new table.
    When you declare a column VARCHAR2(5), by default, you're allocating 5 bytes of storage. In a single-byte character set, which I believe WE8DEC is, that also happens to equate to 5 characters. In a multi-byte character set like AL32UTF8, though, 1 character may require up to 3 bytes of storage, so you'd need to allocate 15 bytes to store that data. That's what's going on here.
    You could still store all the data if you create the table locally by explicitly requesting 5 characters of storage by declaring the column VARCHAR2(5 CHAR). You could also set the NLS_LENGTH_SEMANTICS parameter to CHAR rather than BYTE before creating the table, but I believe that both of these will only apply when you're explicitly defining columns as part of your CREATE TABLE. I don't believe either will apply to CTAS statements.
    Justin

  • Not able to create a table with more than 64 fields in dictionary

    Hi,
    I have created a java dictionary in Netweaver Developer studio. I have to create a table with more than 64 fields in it. I was able to create the table in dictionary, but when i tried to build it, I am getting an error message as "more than 64 fields are not allowed". If i create the table with 64 fields or below 64 fields, i can build the dictionary and deploy it.
    That is, when i create a table with more than 64 fieds, I am not able to compile the dictionary, But if i reduce the fields to 64 or below, i can compile the dictionary.
    Kindly help me to solve the problem.
    Regards,
    Sudheesh

    Hi,
    Sudheesh,as far as I am aware creating of fields in the table actually depends on the total width of table that can be used for various Vendors.
    So I actually tried out creating a table with too many fields,and I am reproducing the errors which I have obtained -
    <i>Error               Dictionary Generation: <b>DB2:checkWidth TMP_1: total width of table (198198 bytes) greater than allowed maximum (32696 bytes)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>DB4:Table TMP_1: fixed length: 198366 (32767).</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>DB6:checkWidth TMP_1: total width of table (297200) including row overhead is greater than the allowed maximum for 16K tablespaces .</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>MSSQL:checkWidth TMP_1: total width(198215) greater than allowed maximum (8060)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>SAPDB:checkWidth TMP_1: total width(198297) greater than allowed maximum (8088)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: Table TMP_1 is not generated     TMP_1.dtdbtable     TestDictionary/src/packages     </i>
    I hope you can understand what the errors state.I am trying to create a table whose total width(sum of width all columns) is greater than the maximum allowed for various Vendors,such as DB2,MSSQL,SAPDB etc.
    I hope this answer helps you create your table suitably
    Regards,
    Harish
    (Please award points if this answer has been usefull)

  • How to create a table with auto number?

    I want to create a table with a column default to increasing integer. The first thought came up to me is to use sequence. I find in google the following create statement create table etl_stats1 (run_time date,arr_rows int,lid int default nextval('etl_req'));get ORA-04044: procedure, function, package, or type is not allowed here.
    There are threads metioned using trigger to do the job. But does what not support default to a sequence, it appears such a nature way.

    You need to create a sequence and a trigger:
    SQL> create table etl_stats1 (run_time date,arr_rows int,lid int)
      2  /
    Table created.
    SQL> create sequence etl_seq;
    Sequence created.
    SQL> create or replace
      2    trigger etl_stats1_bir
      3    before insert
      4    on etl_stats1
      5    for each row
      6    begin
      7        select etl_seq.nextval into :new.lid from dual;
      8  end;
      9  /
    Trigger created.
    SQL> insert into etl_stats1 (run_time,arr_rows) values(sysdate,99)
      2  /
    1 row created.
    SQL> select * from etl_stats1
      2  /
    RUN_TIME   ARR_ROWS        LID
    15:38:41         99          1
    SQL> SY.

  • How to create a table with table maintanence

    Hi Friends,
    I want to create a table with the following fields.
    1. MANDT
    2. BUDAT
    3. WAERS
    4. KURSF
    And i need to maintain the table (User will maintain the table... like they'll add items to it)
    What are all the steps i should follow ???
    Thanks in advance.
    Cheers
    R.Kripa.

    I have solved the problem ..
    Sailatha thanks anyway
    The problem i faced was;
    I created the table ...... with all the fields as keys ..
    When i executed TCODE SM30 (Maintain Table) it said ... "View/table can be only maintained with  resrictions " and hence then it dint allow  me to maintain ... ;-(
    So then i changed the "Maintanence"  status to "Display/Maintance" allowed.
    thats how my problem of maintaining the table solved!!!
    Thanks
    Cheers
    R.Kripa.

  • Dynamically creating oracle table with csv file as source

    Hi,
    We have a requirment..TO create a dynamic external table.. Whenever the data or number of columns change in the CSV file the table should be replaced with current data and current number of columns...as we are naive experienced people in oracle please give us a clear solution.. We have tried with a code already ..But getting some errors. Code given below..
    thank you
    we have executed this code by changing the schema name and table name ..Remaining everything same ...
    Assume the following:
    - Oracle User and Schema name is ALLEXPERTS
    - Database name is EXPERTS
    - The directory object is file_dir
    - CSV file directory is /export/home/log
    - The csv file name is ALLEXPERTS_CSV.log
    - The table name is all_experts_tbl
    1. Create a directory object in Oracle. The directory will point to the directory where the file located.
    conn sys/{password}@EXPERTS as sysdba;
    CREATE OR REPLACE DIRECTORY file_dir AS '/export/home/log';
    2. Grant the directory privilege to the user
    GRANT READ ON DIRECTORY file_dir TO ALLEXPERTS;
    3. Create the table
    Connect as ALLEXPERTS user
    create table ALLEXPERTS.all_experts_tbl
    (txt_line varchar2(512))
    organization external
    (type ORACLE_LOADER
    default directory file_dir
    access parameters (records delimited by newline
    fields
    (txt_line char(512)))
    location ('ALLEXPERTS_CSV.log')
    This will create a table that links the data to a file. Now you can treat this file as a regular table where you can use SELECT statement to retrieve the data.
    PL/SQL to create the data (PSEUDO code)
    CREATE OR REPLACE PROCEDURE new_proc IS
    -- Setup the cursor
    CURSOR c_main IS SELECT *
    FROM allexperts.all_experts_tbl;
    CURSOR c_first_row IS ALLEXPERTS_CSV.logSELECT *
    FROM allexperts.all_experts_tbl
    WHERE ROWNUM = 1;
    -- Declare Variable
    l_delimiter_count NUMBER;
    l_temp_counter NUMBER:=1;
    l_current_row VARCHAR2(100);
    l_create_statements VARCHAR2(1000);
    BEGIN
    -- Get the first row
    -- Open the c_first_row and fetch the data into l_current_row
    -- Count the number of delimiter l_current_row and set the l_delimiter_count
    OPEN c_first_row;
    FETCH c_first_row INTO l_current_row;
    CLOSE c_first_row;
    l_delimiter_count := number of delimiter in l_current_row;
    -- Create the table with the right number of columns
    l_create_statements := 'CREATE TABLE csv_table ( ';
    WHILE l_temp_counter <= l_delimiter_count
    LOOP
    l_create_statement := l_create_statement || 'COL' || l_temp_counter || ' VARCHAR2(100)'
    l_temp_counter := l_temp_counter + 1;
    IF l_temp_counter <=l_delimiter_count THEN
    l_create_statement := l_create_statement || ',';
    END IF;
    END;
    l_create_statement := l_create_statement || ')';
    EXECUTE IMMEDIATE l_create_statement;
    -- Open the c_main to parse all the rows and insert into the table
    WHILE rec IN c_main
    LOOP
    -- Loop thru all the records and parse them
    -- Insert the data into the table created above
    END LOOP;

    The initial table is showing errors and the procedure is created with compilation errors
    After executing the create table i am getting the following errors
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "identifier": expecting one of: "badfile,
    byteordermark, characterset, column, data, delimited, discardfile,
    disable_directory_link_check, exit, fields, fixed, load, logfile, language,
    nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string,
    skip, territory, varia"
    KUP-01008: the bad identifier was: deli
    KUP-01007: at line 1 column 9
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

  • I got problems in creating a table using java

    ok here's what i want to happen, i have a table named tblField that has 3 columns.
    These 3 columns are:
    1. field_ID
    2. field_Desc
    3. field_Fruit
    The table tblField returns 7 rows in which the values of field_Fruit are:
    1. apple
    2. banana
    3. orange
    4. watermelon
    5. pineapple
    6. mango
    7. lemon
    what i want to do is I want to create a new table named tblNewTable that will get the 7 values of field_Fruit and be the columns of the new table tblNewTable.
    So the result would be: I have this new table named tblNewTable and the column names are:
    1. apple
    2. banana
    3. orange
    4. watermelon
    5. pineapple
    6. mango
    7. lemon
    btw i already know how to create a table with hardcoded values.
    An example of create statement is shown below:
    CREATE TABLE [dbo].[tblNewTable] ({[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL)For the problem posted above, the first thing i should do is to get all the values of field_Fruit first and put them all in a vector. After that, i should use the create statement using the vector to return all the values of field_Fruit. I tried to do the code below but it doesnt wrk:
    int x = 0;
    CREATE TABLE [dbo].[tblNewTable] (while(x < vFieldFruitVector.size()){ {[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL x = x + 1;})vFieldFruitVector is the vector/values of field_Fruit.
    anyone who can help me solve my problem? thanks in advance! :)

    Unless you are using some special tag library or something, SQL is not, as far as I've ever seen, going to handle while loops within the statements. You want to create the table, then you have to create the CREATE statement string
    String c = "CREATE TABLE [dbo].[tblNewTable] (";
    for(int x = 0; x < vFieldFruitVector.size(); x++) {
       c += vFieldFruitVector.get(x) + " char 50 COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL";
    c += ")";
    int res = stmt.executeUpdate(c);

  • Problem in creating Maintenance Order with multiple operations

    Hello all,
    I am facing problem while creating Maintenance Order with multiple operations and sub-operations. I am using BAPI : BAPI_ALM_ORDER_MAINTAIN.
    For single operation it is working fine,but i am unable to create MO with multiple operations and sub-operations.
    Please, provide me the inputs required,
    I have used methods :
    ORDER        CREATE,
    OPERATION CREATE
    and SAVE.
    Regards,
    Siddhartha

    Hi,
    The FM you are using is a perfect one. This FM is bit tricky to use. You need to perfectly pass the Reference number field. which links various input table parameters of this FM.
    Thanks & Regards,
    Navneeth K.

  • Pages won't allow me to create a table with just one row.

    I'm trying to create a one row, two colum table in Pages. I have no problem with the columns. But I cannot create the table with just one row. Two rows apppears to be the minimum. Any ideas??

    In Pages 5.2, click the equal sign at bottom-left of table and reduce the row count to one.

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • How to create a table with varied number of columns?

    I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
    If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
    Can I do it? How? Thanka a lot.

    Why did you create a new thread for this?
    How to create a table with varied number of columns?

  • How to create a table with strings active by boolean button

    Good morning.
    I have a problem to create a table and did not find any topic in the forum who could help me solve this problem.
    I need to create an alarm table.
    That is, every time an alarm was activated (boolean button), the table will show the time,date and where that alarm occurred.
    For example, when the garage alarm is activated, it will to table:
    Date // Time //  Garage // Presence ON
    And so on, when the alarm is activated the room:
    Date // Time // Room // Presence ON
    If anyone can help, I'd appreciate it enough.
    Thank you.
    Solved!
    Go to Solution.

    Giuliano06 wrote:
    So I can show the alarm, but when the button is not selected, it is sending null value (blank string) for the table through the shift register.
    Also, when I select for example the 2 bedroom, he is moved to another column in the table and not just below the last alarm obtained.
    My VI is attached case someone might have an idea.
    your constantly polling the value to your table, ofcoarse this vi is designed according to the mechanical action of the boolean switch...
    Attachments:
    Sensors table.vi ‏10 KB

  • How to create a table with more tan 20 columns

    I created a A4 landscape document to make a calendar for the next year.
    To add the date information I need to insert a table with 32 columns (name of month + 31 days). It should be possible to create a table with a over all width of 29.7 cm (consisting of 1 column of 4.9 cm and 31 columns with 0.8 cm)?
    Remark: Yet reduced all indention's (? German: Einzug) and other spacers and the size of used font of the table.

    Hello Till,
    unfortunatly Pages connot create a table with more than 20 columns. This is no question of size or place.
    But you can create two tables, set the most right border of the fist table to "no line" and align the second table (with the other 12 columns) at the right side of the first table. Now you have "one" table with 32 columns.
    I have done this with my driving book (Fahrtenbuch, um es korrekt zu schreiben and it works fine.
    Frank.

Maybe you are looking for

  • Printing to acrobat pdf from other application in Leopard

    Hi, I've upgraded to Leopard and to Adobe CS3. Whenever I want to print from any application to Acrobat pdf (for instance from Word 04), the acrobat printer pauses and the pdf is not created. Is this one of the known issues that will be fixed when Ad

  • 1935 error PSE 11 on Windows 7 64bit

    Cannot install PSE 11 on new computer. Windows 7 64-bit. I have the license.

  • Cost of  interoperations times

    hi expert, my condition is, i create one routing for FG and input standard queue time for each operation. when i create production order with this routing and calculate for cost. i think time i input should include in costing but  system not include

  • Database authentication with 9i web reports

    My apologies if this has been answered already or is an elementary question. I couldn't find the answer to it with a search. Simply put, how do you authenticate to the database with a JSP web report which uses the RW taglib? I've got my report ready

  • JTextField array

    I�m using an array of jTextFields within a pane and I want to know which of this jTextFields was edited. I used the getSource method but I cannot interpret the data since I don�t get the index of the jTextField.