Question about creating new tables using SQL script in WebLogic Server

Hi,
I am new to WebLogic and I am following a book Java EE Development with Eclipse published by PACKT Publishing to learn
Java EE.  I have installed Oracle Enterprise Pack for Eclipse on the PC and I am able to log into the WebLogic Server Administration Console
and set up a Data Source.  However the next step is to create tables for the database.  The book says that the tables can be created using
SQL script run from the SQL command line.
I cannot see any way of inputting SQL script into the WebLogic Server Admistration Console.  Aslo there is no SQL Command line in DOS.
Thanks  for your help.
Brian.

Sounds like you are to run the scripts provided by a tutorial to create the tables, right?  In that case, you may need to install an Oracle client to connect to your database.  The client is automatically installed with the database, so if you have access to the server that hosts the database, you should be able to run SQLplus from there.
As far as I know, there is no way to run a script from the Admin Console.  I could be wrong, however.

Similar Messages

  • Create temporary Tables using SQL

    Hello,
    I'm wondering if SAP allows the creation of new Tables without SDK objects,
    I want to create temporary tables using SQL scripts an compile them when an specific addon is connected and erase them when the addon disconnects,
    Do you think this is allowed?.
    thanks,
    Gabriela

    You could always have a second DB to create your temp tables in.  This is the way I've done this, as well as created my own views and stored procedures in it.  No updating of the primary table necessary.  The way I named things was:
    Company_DB - Company Database
    Company_DB-Extern - My own stuff
    Then, in sap, you can just do [Company_DB-Extern]..Object to call it, or you do the same from withing your project.

  • How to create new table using pertioned table

    hi,
    i am using a partitioned table , now i want to craet a new table with same structure of my existing partitioned table.
    so can i use this syntax
    create table abc_new as
    select * from my_partitioned_table
    where 1=2;
    if i use this syntax would it make same structure of my existing partitioned table ?
    and
    when
    we use syntax like
    create table abc_new as
    select * from my_partitioned_table
    where 1=2;
    so would it make also indexing on new table to if old table exists ? if not so how can we create that indexing too at time of running this syntax ?
    reagrds

    No.
    Although the command would create a new table with the same column names and datatypes, it would NOT be a partitioned table. You must explicitly specify the PARTITION BY clause and Partition definitions when creating the table.
    Similarly, index definitions are not copied automatically. You must explicitly run the CREATE INDEX statements (which you can generate from the source using DBMS_METADATA.GET_DDL or using any other tools/utilities).
    (However, if you use Export-Import -- e.g. importing to another schema or to another database, it would create a partitoned table with the same name and with the same index definitions).
    Hemant K Chitale

  • Procedure to create new table using existing metadata

    Hi All,
    THis is what I want to achieve,
    I want to create procedure which will take a input parameter as name of a table lets say 'EMP',
    and this procedure will check whether that table exist or not?
    if exist then
    it will create a new table with name appending _dummy to existing table name (ex: new table will be EMP_DUMMY) ,
    and new table should have the same table structure ,index and constraint imposed on EMP table.
    NB: It should not be created using as select like create table EMP_DUMMY as select * from EMP where condition=false;
    Can any one please help me how to achieve this?

    Hi,
    you can use the DBMS_METADATA package
    declare
    cddl clob;
    ctable  varchar2(80):='EMP';
    cowner  varchar2(80):='HR';
    begin
    cddl:=dbms_metadata.get_ddl ('TABLE',ctable,cowner);
    cddl:=replace(cddl, 'CREATE TABLE "'||cowner||'"."'||ctable||'"','CREATE TABLE "'||cowner||'"."'||ctable||'_DUMMY"');
    dbms_output.put_line(substr(cddl,1,1200));
    execute immediate dbms_lob.substr(cddl,least(dbms_lob.getlength(cddl),32000));
    cddl:=dbms_metadata.get_dependent_ddl ('INDEX',ctable,cowner);
    cddl:=replace(cddl,'ON "'||cowner||'"."'||ctable,'ON "'||cowner||'"."'||ctable||'_DUMMY');
    execute immediate dbms_lob.substr(cddl,least(dbms_lob.getlength(cddl),32000));
    end;but you'll need to adapt (ex: existing contraint name etc)

  • Create new table using LABSQL

    Hi, how can i create and delete a table in MS Access using labSQL?

    Do you have Databse Connectivity Toolkit or SQL Toolkit?
    Here are some examples you can look at:
    The attached VI (in AccSQL.zip) creates a table and inserts data. It demonstrates the use of Access syntax. It requires LabVIEW Database Connectivity Toolset.
    Inserting Data in LabVIEW from Table Create Using Access 97 SQL Toolkit Syntax
    SQL Toolkit for G Reference Manual
    You should also look under SQL examples that ship with the toolkit.
    Zvezdana S.
    Attachments:
    AccSQL.zip ‏19 KB

  • Question about creating new warehouse

    for what reason that we need to move inventory to new warehouse when we find replacement for the old one,why didn't we change warehouse name of old one directly?

    Hi,
    When you already have material in your old warehouse system doesn't allow you change the name directly.. N this is sap's Std procedure.. So, for this you have shift the material first then make changed or create new one and then take back material.
    Regards
    Priyanka.P

  • Question about creating new objects

    When creating a DocumentBuilderFactory Object, why is the code written like this:
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();as opposed to
    DocumentBuilderFactory docBuilderFactory = new DocumentBuilderFactory();???

    Factory classes like this are typically abstract classes which do little more than define an interface and the getInstance() methods. The class that getInstance() will actually instanciate will be a concrete implementation from a particular implementation of the DOM parser. This pattern allows whatever implementation happens to have been supplied to be automatically be used without your code having to concern itself.
    The concrete factory will then create concrete implementations of the various interfaces like DOMPaser, using the implementations in the actual library.

  • SQL Developer import from Excel or CSV not creating new table

    I am sure I have done this with previous version of SQL Developer. I am now running 1.5.4 with patches update from 5/27/2009. I am running on Windows XP. When I start the import wizard I get to the point were the varify button appears. I click Verify. Everything is successful. The next button is grayed out. The send to worksheet is not checked. I press the finish button and the new table is not created.
    I don't get any error message. I refresh my table list and the new table is not created. I can create new tables using SQL Developer so I don't think it can be a privelege problem. I know I did this a few weeks ago. I am not sure what version of SQL Developer I was running. But I have updated to the latest and greatest since then.

    I wanted to import and use my table data from MS Excel 2010 in SQL developer Version 3.1.05.
    I was told that SQL does not import .xls data. For that reason, I was searching for a script which Import data from excel to SQL developer. I tried many different forums DBS blogs. Then eventually I found the solution inside the SQL developer itself.
    In your Editor window, There would be options like,
    1. Columns | Data | Constraints |Grants | Sta...... "so on"
    2. In second row, you can find a drop box with certain table options. Select the last option "Import Data"
    THERE YOU GO.
    do accordingly to your need and you will get the data as well its scripts.
    I hope this would help you all. Thanks. :-)

  • Write to ERP Tables on HANA DB using SQL script

    Hello All,
    We are using HANA as our primary database for ABAP system and trying to feed the data to ABAP tables using SQL script and experiencing authorization errors . Please see below for more details.
    Scenario.
    I am getting no authorised error when i try to write some data to Z* tables using SQL script in HANA studio.But I am able to create new tables in the same schema.
    As shown above Query1: SAPSR1 is the schema which contains underline ABAP tables. ZGSA is existing table and now i am trying to insert new rows into it.
    Query 2&3: Creating new tables in SAPSR1 works fine.
    Can you please suggest me whether it is right approach or i need to have RFC to update these table from some other tool/app?.
    Thanks in advance,
    Naresh

    Hi Naresh,
    Obi Wan would now probably say: "this is not the functionality you're looking for".
    Even though you are working with Z-tables you really don't want to start messing with those from outside the context of the NetWeaver system.
    Instead you want to keep the control over all tables in the NetWeaver schema completely  to the SAP<sid> user and NetWeaver.
    For your data loading scenario, just write a simple ABAP report with native sql or an AMDP to do the copying of the data for you.
    Don't spread your code across the landscape and don't loosen access restrictions on your schema.
    - Lars

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can I create a new table using strcuture of another existing table ????

    hello all -
    If I need to create table as the duplicate table for another table. I donot need data from that table, as I am going to populate date later on.
    So all need is the structure, constraints of the table to create a new table.
    create table new_temp as
    select * from old_temp;
    above command creates a table with the data, what if I donot want the data, only the defination.
    Any help woud really appreciated.
    Thanks
    Rama

    but create table as select..
    CAN'T create constraint on new table it copy only data
    not constraint
    so create new table with structure as well as
    constraint use
    SELECT dbms_metadata.get_ddl('TABLE','EMP') FROM DUAL;
    only in 9i
    kuljeet pal singh

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

  • How to upgrade the schema on both the sites using sql scripts?

    Hi Experts,
    I need some help.
    I have two sites SITE A and SITEB, on both the sites GG is installed and running (DML Bi- directional replication). I have schema SCHEMA1 on both the sites which are configured for replication and replication is working from last one year.
    Now I wanted to upgrade the SCHEMA1 on both the sites. There are three .sql script which has many SQL commands like create table, create sequence, create procedure, insert record etc. I wanted to run that SQL file one both the sites.
    So should I stop all the process on both the sites SITEA and SITE B (including manager process) ,execute the SQL scripts on both the sites and then start the process again ? Will it work?
    Is there any other best way to do this?
    Could you please suggest the steps so that I can successfully execute theses scripts on both the site to upgrade the schema1.

    There is no blanket answer here; it depends. Main questions are:
    1. Do the SQL scripts update existing tables?
    2. Are you replicating DDL in one direction? (DDL should only be replicated one way even when doing bi-directional, do DDL should only be issued on the node capturing DDL
    3. Are you using a wildcard (*) from table names or using an explicit list?
    Easiest thing is if you're replicating DDL from A to B and apply DDL to A only. This assumes that the application writing to these tables can handle DDL changes under the covers. If these are new tables supporting new application features then you would simply enable said features after apply sql files.
    From there it gets more complicated and would need answers to the above questions before going down each line of logic. But try to remember what's really going on here. Data in one form (DDL) is being captured and send along. If the "shape" (DDL) of that data changes then the extract and replicat need to update their meta data to handle it correctly. If change data encounters a different shape than what's cached then you will become out of sync.
    I'm not sure if that makes sense but again, the answers to the questions above will be indicate where more detailed explanations should be focused. In short, we need more detail about what those scripts do and your current setup.
    Good luck,
    -joe

  • Load XML File into temporary tables using sql loader

    Hi All,
    I have an XML file as below. I need to insert the contents into a temporary staging table using sql loader. Please advice how I need to do that.
    For example Portfolios should go into a seperate table, and all the tags inside it should be populated in the columns of the table.
    Family should go into a seperate table and all the tags inside it should be populated in the columns of the table.
    Similarly offer, Products etc.
    - <ABSProductCatalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <ProductSalesHierachy>
    - <Portfolios>
    - <Portfolio productCode="P1">
      <Attribute name="CatalogProductName" value="Access" />
      <Attribute name="Status" value="Active" />
      </Portfolio>
    - <Portfolio productCode="P2">
      <Attribute name="CatalogProductName" value="Data" />
      <Attribute name="Status" value="Active" />
      </Portfolio>
    - <Portfolio productCode="P3">
      <Attribute name="CatalogProductName" value="Voice" />
      <Attribute name="Status" value="Active" />
      </Portfolio>
    - <Portfolio productCode="P4">
      <Attribute name="CatalogProductName" value="Wireless" />
      <Attribute name="Status" value="Active" />
      </Portfolio>
      </Portfolios>
    - <Families>
    - <Family productCode="F1">
      <Attribute name="CatalogProductName" value="Internet Access Services" />
      <Attribute name="Status" value="Active" />
    - <ParentHierarchy>
      <Item productCode="P1" modelType="Portfolio" />
      </ParentHierarchy>
      </Family>
    - <Family productCode="F2">
      <Attribute name="CatalogProductName" value="Local Access Services" />
      <Attribute name="Status" value="Active" />
    - <ParentHierarchy>
      <Item productCode="P2" modelType="Portfolio" />
      </ParentHierarchy>
      </Family>
      </Families>
    - <SubFamilies>
    - <SubFamily productCode="SF1">
      <Attribute name="CatalogProductName" value="Business Internet service" />
      <Attribute name="Status" value="Active" />
    - <ParentHierarchy>
      <Item productCode="F1" modelType="Family" />
      </ParentHierarchy>
      </SubFamily>
      </SubFamilies>
    - <ProductRefs>
    - <ProductRef productCode="WSP1" modelType="Wireline Sales Product">
      <ActiveFlag>Y</ActiveFlag>
    - <ProductHierarchy>
      <SalesHierarchy family="F1" subFamily="SF1" portfolio="P1" primary="Y" />
      <SalesHierarchy family="F2" portfolio="P2" primary="N" />
      <FinancialHierarchy quotaBucket="Voice" strategicProdCategory="Local Voice" />
      </ProductHierarchy>
      </ProductRef>
    - <ProductRef productCode="MSP2" modelType="Handset">
      <ActiveFlag>Y</ActiveFlag>
    - <ProductHierarchy>
      <SalesHierarchy portfolio="P4" primary="Y" />
      </ProductHierarchy>
      </ProductRef>
      </ProductRefs>
      </ProductSalesHierachy>
    - <Offers>
    - <Offer productCode="ABN">
      <OfferName>ABN</OfferName>
      <OfferDescription>ABN Description</OfferDescription>
    - <Segments>
      <Segment>SCG</Segment>
      <Segment>PCG</Segment>
      </Segments>
      <OfferUpdateDate>2009-11-20</OfferUpdateDate>
      <ActiveFlag>Y</ActiveFlag>
      </Offer>
    - <Offer productCode="OneNet">
      <OfferName>OneNet</OfferName>
      <OfferDescription>OneNet Description</OfferDescription>
    - <Segments>
      <Segment>SCG</Segment>
      <Segment>PCG</Segment>
      <Segment>PCG2</Segment>
      </Segments>
      <OfferUpdateDate>2009-11-20</OfferUpdateDate>
      <ActiveFlag>Y</ActiveFlag>
      </Offer>
      </Offers>
    - <Products>
    - <Product productCode="WSP1" modelType="Wireline Sales Product">
      <ProductName>AT&T High Speed Internet</ProductName>
      <ProductDescription>High Speed Internet</ProductDescription>
      <LegacyCoProdIndicator>SBC</LegacyCoProdIndicator>
      <RevenueCBLCode>1234B</RevenueCBLCode>
      <VolumeCBLCode>4567A</VolumeCBLCode>
      <SAARTServiceIDCode>S1234</SAARTServiceIDCode>
      <MarginPercentRequired>Y</MarginPercentRequired>
      <PercentIntl>%234</PercentIntl>
      <UOM>Each</UOM>
      <PriceType>OneTime</PriceType>
      <ProductStatus>Active</ProductStatus>
      <Compensable>Y</Compensable>
      <Jurisdiction>Everywhere</Jurisdiction>
      <ActiveFlag>Y</ActiveFlag>
    - <Availabilities>
      <Availability>SE</Availability>
      <Availability>E</Availability>
      </Availabilities>
    - <Segments>
      <Segment>SCG</Segment>
      <Segment>PCG</Segment>
      </Segments>
      <VDIndicator>Voice</VDIndicator>
      <PSOCCode>PSOC 1</PSOCCode>
      <USBilled>Y</USBilled>
      <MOWBilled>N</MOWBilled>
      <ProductStartDate>2009-11-20</ProductStartDate>
      <ProductUpdateDate>2009-11-20</ProductUpdateDate>
      <ProductEndDate>2010-11-20</ProductEndDate>
    - <AliasNames>
      <AliasName>AT&T HSI</AliasName>
      <AliasName>AT&T Fast Internet</AliasName>
      </AliasNames>
    - <OfferTypes>
      <OfferType productCode="ABN" endDate="2009-11-20" />
      <OfferType productCode="OneNet" />
      </OfferTypes>
    - <DynamicAttributes>
    - <DynamicAttribute dataType="String" defaultValue="2.5 Mbps" name="Speed">
      <AttrValue>1.5 Mbps</AttrValue>
      <AttrValue>2.5 Mbps</AttrValue>
      <AttrValue>3.5 Mbps</AttrValue>
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="TransportType">
      <AttrValue>T1</AttrValue>
      </DynamicAttribute>
      </DynamicAttributes>
      </Product>
    - <Product productCode="MSP2" modelType="Handset">
      <ProductName>Blackberry Bold</ProductName>
      <ProductDescription>Blackberry Bold Phone</ProductDescription>
      <LegacyCoProdIndicator />
      <RevenueCBLCode />
      <VolumeCBLCode />
      <SAARTServiceIDCode />
      <MarginPercentRequired />
      <PercentIntl />
      <UOM>Each</UOM>
      <PriceType />
      <ProductStatus>Active</ProductStatus>
      <Compensable />
      <Jurisdiction />
      <ActiveFlag>Y</ActiveFlag>
    - <Availabilities>
      <Availability />
      </Availabilities>
    - <Segments>
      <Segment>SCG</Segment>
      <Segment>PCG</Segment>
      </Segments>
      <VDIndicator>Voice</VDIndicator>
      <PSOCCode />
      <USBilled />
      <MOWBilled />
      <ProductStartDate>2009-11-20</ProductStartDate>
      <ProductUpdateDate>2009-11-20</ProductUpdateDate>
    - <AliasNames>
      <AliasName />
      </AliasNames>
    - <OfferTypes>
      <OfferType productCode="ABN" />
      </OfferTypes>
    - <DynamicAttributes>
    - <DynamicAttribute dataType="String" name="StlmntContractType">
      <AttrValue />
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="BMG 2 year price">
      <AttrValue>20</AttrValue>
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="MSRP">
      <AttrValue>40</AttrValue>
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="BMGAvailableType">
      <AttrValue />
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="ProductId">
      <AttrValue>123456</AttrValue>
      </DynamicAttribute>
    - <DynamicAttribute dataType="String" name="modelSource">
      <AttrValue>product</AttrValue>
      </DynamicAttribute>
      </DynamicAttributes>
      </Product>
      </Products>
      <CatalogChanged>Y</CatalogChanged>
      </ABSProductCatalog>

    Two options that come to mind. Others exist.
    #1 - {thread:id=474031}, which is basically storing the XML in an Object Relational structure for parsing
    #2 - Dump the XML into either an XMLType based table or column and use SQL (with XMLTable) to create a view that parses the data. This would be the same as the view shown in the above post.
    Don't use sql*loader to parse the XML. I was trying to find a post from mdrake about that but couldn't. In short, sql*loader was not build as an XML parser so don't try to use it that way.

  • Create statspack report using sql*developer

    Hello,
    While connecting with PERFSTAT user I can not create statspack report using SQL*Developer:
    @?/rdbms/admin/awrrpt
    Error starting at line 1 in command:
    @?/rdbms/admin/awrrpt
    Error report:
    Unable to open file: "?/rdbms/admin/awrrpt.sql"
    Actually, my problem or question is that how can PERFSTAT user can generate statspack reports from a Client side. What is the other way a non-dba can see the snapshots histroy and generate report (by using perfstat user ) while joing tables or using views?
    Thanks a lot.
    Best Regards

    Hi,
    for awr reports @?/rdbms/admin/awrrpt (you need EE+Diagnostic Pack) there is a solution.
    Grant execute dbms_workload_repository to <user>;
    Grant select_catalog_role to <user>;
    get all SNAP_IDs
    SELECT   TO_CHAR(s.startup_time,'YYYY.MM.DD HH24:MI:SS') INSTART_FMT,
             di.instance_name INST_NAME,
             di.db_name DB_NAME,
             s.snap_id SNAP_ID,
             TO_CHAR(s.end_interval_time,'YYYY.MM.DD HH24:MI:SS') SNAPDAT,
             s.snap_level LVL
    FROM    dba_hist_snapshot s,
             dba_hist_database_instance di
    WHERE   di.dbid = s.dbid
             AND di.instance_number = s.instance_number
             AND Di.Startup_Time = S.Startup_Time
    ORDER BY snap_id desc;
    Select * From Table(Sys.Dbms_Workload_Repository.Awr_Report_Html(DBID, 1, BEGIN_SNAP_ID, END_SNAP_ID));
    For statspack i don't know a solutuion. I think the best idea is, create a job to make the statspack report on the server side and access it via external tables or mail them forward to you.
    Best regards
    Thomas

Maybe you are looking for