SQL for cross dependent table creation

How do I run this SQL script to create these tables wiwth criss-cross relation ? kinda chicken-n-egg situation.
Note : Writer<->Book
CREATE TABLE library.Writer(
name VARCHAR2(50) NOT NULL ,
CONSTRAINT Writer_name PRIMARY KEY (name) ENABLE ,
books VARCHAR2(50),
CONSTRAINT books_Writer_Book FOREIGN KEY (books) REFERENCES library.Book (title) ENABLE
CREATE TABLE library.Book(
title VARCHAR2(50) NOT NULL ,
CONSTRAINT Book_title PRIMARY KEY (title) ENABLE ,
pages NUMBER NOT NULL ,
category VARCHAR2(50) DEFAULT 'Mystery' NOT NULL ,
author VARCHAR2(50),
CONSTRAINT author_Book_Writer FOREIGN KEY (author) REFERENCES library.Writer (name) ENABLE
CREATE TABLE library.Library(
name VARCHAR2(50) NOT NULL ,
CONSTRAINT Library_name PRIMARY KEY (name) ENABLE ,
books VARCHAR2(50),
CONSTRAINT books_Library_Book FOREIGN KEY (books) REFERENCES library.Book (title) ENABLE ,
writers VARCHAR2(50),
CONSTRAINT writers_Library_Writer FOREIGN KEY (writers) REFERENCES library.Writer (name) ENABLE
);

While I agree with the comments for this particular schema, if your question is meant to be more general, "How do I create constraints against interdependent tables?" then you need to create the constraints using an alter table statement after creating the tables and PKs. Something like:
CREATE TABLE library.writer(
   name  VARCHAR2(50) NOT NULL,
   books VARCHAR2(50),
   CONSTRAINT writer_name PRIMARY KEY (name));
CREATE TABLE library.book(
   title    VARCHAR2(50) NOT NULL,
   pages    NUMBER NOT NULL,
   category VARCHAR2(50) DEFAULT 'Mystery' NOT NULL,
   author   VARCHAR2(50),
   CONSTRAINT book_title PRIMARY KEY (title));
CREATE TABLE library.library(
   name    VARCHAR2(50) NOT NULL,
   books   VARCHAR2(50),
   writers VARCHAR2(50),
   CONSTRAINT Library_name PRIMARY KEY (name));
ALTER TABLE writer ADD CONSTRAINT books_Writer_Book FOREIGN KEY (books)
   REFERENCES library.Book (title);
ALTER TABLE book ADD CONSTRAINT author_Book_Writer FOREIGN KEY (author)
   REFERENCES library.Writer (name);
ALTER TABLE library ADD CONSTRAINT books_Library_Book FOREIGN KEY (books)
   REFERENCES library.Book (title);
ALTER TABLE library ADD CONSTRAINT writers_Library_Writer FOREIGN KEY (writers)
   REFERENCES library.Writer (name);HTH
John

Similar Messages

  • How create SQL for Cross tab in template

    Hi,
    I have been starting to build data templates using SQL to select the data I require. I noticed in the word template-building tool there is an option to create cross tab table. I have tried looking at the standard documentation. I have been unable to work out how I should structure the SQL in my data template to allow me to create a cross tab table in the template?
    Thanks,
    Mark

    Post Author: SunilKanta
    CA Forum: General
    Yes, I had done exactly the same but when tried to display the subreport in new page, some portion of the cross tab is displayed. The page width is not increased proportionately.
    i have passed that sub report in footer of main report.
    But when i overlap this sub report with other cross tabs already present in the main report i can see full width view of sub report.

  • SQL for finding system tables????

    Hi all,
    I would like to know what is the sql queery to find all the system tables( when i am logged in as a user and not as a DBA)
    How to find the previleges enjoyed by a user ( when i am logged in as a user and not as a DBA)
    thanks
    Ganesh

    For your second question following are the views you might want to query:
    session_privs;
    SESSION_ROLES
    user_role_privs;
    USER_SYS_PRIVS;
    USER_COL_PRIVS
    USER_COL_PRIVS_MADE
    USER_COL_PRIVS_RECD
    USER_TAB_PRIVS
    USER_TAB_PRIVS_MADE
    USER_TAB_PRIVS_RECD
    COLUMN_PRIVILEGES
    ROLE_ROLE_PRIVS, ROLE_SYS_PRIVS, ROLE_TAB_PRIVS.

  • Cross client tables

    Hi,
    I am trying to authorize a user for maintaining the cross client tables with SM30.
    I have added the Authorization object S_TABU_CLI with the change permission and regenerated
    the profile and assigned to the user. But the user is still unable to maintain the cross client tables
    like V_DDAT. How to enable a user to maintain cross client tables.
    Thanks in Advance,
    Ramakrishna.

    One thing. I saw in your response that you have not assigned an authorization group on S_TABU_DIS?
    This is necessary, as the system always checks on the auth group.
    If the table is not classified in TDDAT, it will check against &NC&.
    Tables are protected through S_TABU_DIS for client-dependant tables AND S_TABU_CLI as extra protection fro cross-client tables.

  • DW Tables Creation - Columns Missing

    Hi All,
    When i run the ETL for the execution plan containing tasks related to SCM, some tasks fail, predominantly of which are due to columns missing in the DW tables.
    I dropped and recreated the DW tables ( Tools -> ETLMgmt -> Configure) but it didnt help.
    I inspected the ctl file, oracle_bi_dw.ctl in ( \OracleBI\DAC\conf\sqlgen\ctl-file), which i believe is used to create the DW tables. The CTL file has definitions for all the tables needed but certain columns are missing, and due to this my ETL fails . I tried creating the columns manually after each ETL task failed.
    I need guidance into how to recreate the tables or which configuration step to redo to get the correct CTL file used for the DW table creation.
    Thanks,
    Raghav

    Hi All,
    Re-installing BIApps did not work . I guess the ctl is created while you import the DAC metadata.
    I copied the ctl file from a fellow developer. I dropped and created all the tables. All the DW table definitions referenced from the new ctl file are fine now.
    Now i would always keep a backup of a proper ctl file to face such future problems :)
    Thanks,
    Raghav

  • [Newbie] Suggested reading on dependant table triggers?

    I don't know if this is the right place. Its probably more a SQL question. Please let me know.
    I'm trying to create a Master Details Form in Application Express and can't figure out how to create the trigger to get the key from the parent table into the child table. Could someone point me to somewhere where I can read about this?
    I've only been using XE for 2 weeks and I'm stumped. I've done my homework... :) I've been all over the "2 Day docs" and the Oracle Documentation site, and the web, and just can't find anything. The worst of it is that I know this is really basic stuff, but I just can't seem to see the forest for the trees. Hey! Must be a Monday ...LOL!
    Thanx
    The SQL for the Parent Table (that works just fine) is...
    CREATE TABLE "LEADSHEET"
         "Project_ID" NUMBER,
         "Project_Name" VARCHAR2(48),
         CONSTRAINT "Leadsheet_PK_CON" PRIMARY KEY ("Project_ID") ENABLE
    CREATE OR REPLACE TRIGGER "Leadsheet_T1"
    BEFORE
    INSERT OR UPDATE ON "Leadsheet"
    FOR EACH ROW
    BEGIN     
    IF :NEW.Project_ID IS NULL THEN
              SELECT LEADSHEET_SEQ.Nextval INTO :NEW.Project_ID FROM Dual;
         END IF;
    END;
    ALTER TRIGGER "Leadsheet_T1" ENABLE
    The SQL for the Child table (that doesn't want to work) is:
    CREATE TABLE "MATERIALS"
    (     "Materials_ID" NUMBER(10,0),
         "Project_ID" NUMBER(10,0),
         "Product" VARCHAR2(32),
         CONSTRAINT "Materials_CON" FOREIGN KEY ("Project_ID")
         REFERENCES "Leadsheet" ("Project_ID") ON DELETE CASCADE ENABLE
    CREATE OR REPLACE TRIGGER "Materials_T1"
    BEFORE
    INSERT OR UPDATE ON "MATERIALS"
    FOR EACH ROW
    BEGIN
    IF :NEW.Materials_id IS NULL THEN
         SELECT Materials_SEQ.Nextval INTO :NEW.Materials_id FROM Dual;
    -- as near as I can tell this line is the culprit, unless I'm totally off base :)
         SELECT Leadsheet.Project_ID INTO :NEW.Project_ID FROM Leadsheet;
    END IF;
    END;
    ALTER TRIGGER "MATERIALS_T1" ENABLE
    /

    Hi
    To create a master detail form read the section 'Building a Master Detail Form' http://st-doc.us.oracle.com/xe/doc/appdev.102/b25309/bldapp.htm#BCEBEDIC in Application Express User's Guide. There step, 10. Specify the source for the master table and detail table primary key columns, will allow you to select the trigger.
    For creating trigger you can read section 'Creating Triggers' in same document.
    But first you modify the SQL that you have written in your post to:
    SQL FOR MASTER TABLE:
    CREATE TABLE "LEADSHEET"
    ("Project_ID" NUMBER,
    "Project_Name" VARCHAR2(48),
    CONSTRAINT "Leadsheet_PK_CON" PRIMARY KEY ("Project_ID") ENABLE
    CREATE OR REPLACE TRIGGER "Leadsheet_T1"
    BEFORE INSERT ON "Leadsheet"
    FOR EACH ROW
    DECLARE
    PROJECT_ID NUMBER;
    BEGIN
    SELECT LEADSHEET_SEQ.NEXTVAL
    INTO PROJECT_ID
    FROM DUAL;
    :NEW.PROJECT_ID := PROJECT_ID;
    END;
    ALTER TRIGGER "Leadsheet_T1" ENABLE
    SQL FOR CHILD TABLE:
    CREATE TABLE "MATERIALS"
    ( "Materials_ID" NUMBER(10,0),
    "Project_ID" NUMBER(10,0),
    "Product" VARCHAR2(32),
    CONSTRAINT "MATERIALS_PK" PRIMARY KEY ("MATERIALS_ID") ENABLE
    ALTER TABLE "MATERIALS" ADD CONSTRAINT "MATERIALS_FK" FOREIGN KEY ("PROJECT_ID") REFERENCES " LEADSHEET " ("PROJECT_ID") ENABLE
    -Priya

  • Dynamic SQL for table creation.

    Hi Group
    I'm executing a procedure using dynamic sql to create a table on my own schema, but it returns :ORA-01031: insufficient privileges, why?, if i executing the procedure on my schema, however if gave grants being sys' GRANT CREATE ANY TABLE TO HR; the creation of the table is successful.
    CREATE OR REPLACE PROCEDURE PRC_CREA_TABLA(p_nombre_tabla VARCHAR2, p_esp_columnas VARCHAR2) AS
    BEGIN
    -- EXECUTE IMMEDIATE 'GRANT CREATE ANY TABLE TO HR';
    EXECUTE IMMEDIATE 'CREATE TABLE ' || p_nombre_tabla || ' ('
    || p_esp_columnas || ')';
    -- EXECUTE IMMEDIATE 'REVOKE CREATE ANY TABLE FROM HR';
    END;
    /Thansk a lot
    ORACLE 11.2.0.2
    ORACLE LINUX 6

    Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*", so only for issues with the SQL Developer tool. Please post these questions under the dedicated {forum:id=75} forum.
    Un saludo,
    K.

  • SQL Server 2012 Management Studio:In the Database, how to print out or export the old 3 dbo Tables that were created manually and they have a relationship for 1 Parent table and 2 Child tables?How to handle this relationship in creating a new XML Schema?

    Hi all,
    Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
    Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
    Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
    Problem #1) How can I print out or export these 3 dbo Tables?
    Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. 
    --> Failed to retrieve data for this request. --> Invalid class.  Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
    to manage a service. --> Failed to retrieve data for this request. --> Invalid class.  .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates>   What causes this set of error messages? How can
    I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
    Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
    Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
    Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
    Thanks in advance,
    Scott Chang    

    In the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
    1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
    2) I don't know why you get that error, but any particular reason you want to run PowerShell?
    4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
    As for left/right join, notice that these two are equivalent:
    SELECT ...
    FROM   a LEFT JOIN b ON a.col = b.col
    SELECT ...
    FROM   b RIGHT JOIN a ON a.col = b.col
    But please never use RIGHT JOIN - it gives me a headache!
    There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
    Here is an example where you can study the different join types and how they behave:
    CREATE TABLE apple (a int         NOT NULL PRIMARY KEY,
                        b varchar(23) NOT NULL)
    INSERT apple(a, b)
       VALUES(1, 'Granny Smith'),
             (2, 'Gloster'),
             (4, 'Ingrid-Marie'),
             (5, 'Milenga')
    CREATE TABLE orange(c int        NOT NULL PRIMARY KEY,
                        d varchar(23) NOT NULL)
    INSERT orange(c, d)
       VALUES(1, 'Agent'),
             (3, 'Netherlands'),
             (4, 'Revolution')
    SELECT a, b, c, d
    FROM   apple
    CROSS  JOIN orange
    SELECT a, b, c, d
    FROM   apple
    INNER  JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    LEFT   OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    RIGHT  OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    FULL OUTER JOIN orange ON apple.a = orange.c
    go
    DROP TABLE apple, orange
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to delete the line for 300SAP* in table USR02 in SQL Management studio

    Hello
    I used to delete the line for 300SAP* in table USR02 in SQL Enterprise Manager. After I could log on with “pass”.
    I wander how to delete it in SQL Management studio. When I expand tdatabase it takes so long time and it is uncontrollable

    Hello,
    you have to delete the row by a sql statement.
    Open a new query and run a script like this:
    use <Your SID DB>                 -- e.g. use PRD
    setuser 'your sid in lowercase'  --- e.g. setuser 'prd'
    delete from USR02 where MANDT = '300' and BNAME = 'sap*'
    go
    Run a complete backup before deleting data manually.
    Regards
      Clas

  • SQL Server 2012 installation failure An error occurred for a dependency of the feature causing the setup process for the feature to fail.

    I am installing SQL Server 2012 Developer (from ISO image written on DVD), my machine has Windows 7 (Edit: Windows 7 with service pack 1) on it. This machine already has SQL Express and SQL 2008 R2 Express installed in it.
    On running 2012 setup it goes fine from Setup Support Rules to Installation Progress. In  Installation Progress after some progress installation fails.
    Windows show the following components couldn't installed:
    Managment Tools Complete  Failed. Client Tools Connectivity Failed. Client Tools SDK Failed. Client Tools Backwards Compantibility Failed. Managment Tools Basic Failed. SQL Server Data Tools Failed. Reporting Services -Native Failed. Database Engine
    Services Failed. Data Quality Services Failed. full-Text and Semantic Extractins for Search Failed. SQL Server Replication Failed. Integration Services Failed. Analysis Services Failed. SQL Client Connectivity SDK Failed.
    In detail for failure of every component it provide these details:
    Action required:
    Use the following information to resolve the error, and then try the setup process again.
    Feature failure reason:
    An error occurred for a dependency of the feature causing the setup process for the feature to fail.
    In summary log file it provide the following details:
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2068643839
      Start time:                    2012-07-31 16:23:37
      End time:                      2012-07-31 16:33:32
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for Adv_SSMS:        Use the following information to resolve the error, and then try the setup process again.
      Next step for Conn:            Use the following information to resolve the error, and then try the setup process again.
      Next step for SDK:             Use the following information to resolve the error, and then try the setup process again.
      Next step for BC:              Use the following information to resolve the error, and then try the setup process again.
      Next step for SSMS:            Use the following information to resolve the error, and then try the setup process again.
      Next step for BIDS:            Use the following information to resolve the error, and then try the setup process again.
      Next step for RS:              Use the following information to resolve the error, and then try the setup process again.
      Next step for SQLEngine:       Use the following information to resolve the error, and then try the setup process again.
      Next step for DQ:              Use the following information to resolve the error, and then try the setup process again.
      Next step for FullText:        Use the following information to resolve the error, and then try the setup process again.
      Next step for Replication:     Use the following information to resolve the error, and then try the setup process again.
      Next step for IS:              Use the following information to resolve the error, and then try the setup process again.
      Next step for AS:              Use the following information to resolve the error, and then try the setup process again.
      Next step for SNAC_SDK:        Use the following information to resolve the error, and then try the setup process again.
    Machine Properties:
      Machine name:                  Haansi-PC
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      SQL Server 2005      SQLEXPRESS           MSSQL.1                       
    Database Engine Services                 1033                 Express Edition     
    9.4.5000        No        
      SQL Server 2005      SQLEXPRESS           MSSQL.1                       
    SQL Server Replication                   1033                 Express Edition     
    9.4.5000        No        
      SQL Server 2005      SQLEXPRESS           MSSQL.1                       
    SharedTools                              1033                
    Express Edition      9.4.5000        No        
      SQL Server 2005                                                         
    Tools                                    1033                
    Express Edition      9.4.5000        No        
      SQL Server 2005                                                         
    ToolsClient                              1033                
    Express Edition      9.4.5000        No        
      SQL Server 2005                                                         
    ToolsClient\Connectivity                 1033                 Express Edition     
    9.4.5000        No        
      SQL Server 2008 R2   SQLSERVER08EXPR2     MSSQL10_50.SQLSERVER08EXPR2    Database Engine Services                 1033                
    Express Edition      10.50.1617.0    No        
      SQL Server 2008 R2   SQLSERVER08EXPR2     MSSQL10_50.SQLSERVER08EXPR2    SQL Server Replication                   1033                
    Express Edition      10.50.1617.0    No        
      SQL Server 2008 R2                                                      
    Management Tools - Basic                 1033                 Express Edition     
    10.50.1617.0    No        
      SQL Server 2012                                                         
    LocalDB                                  1033                
    Express Edition      11.0.2318.0     No        
      SQL Server 2012                                                         
    Reporting Services - SharePoint                                                   
    11.0.2100.60    No        
    Package properties:
      Description:                   Microsoft SQL Server 2012
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      SPLevel:                       0
      Installation location:         F:\x64\setup\
      Installation edition:          Developer
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      false
      AGTSVCACCOUNT:                 NT Service\SQLAgent$SS2012
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.SS2012\OLAP\Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.SS2012\OLAP\Config
      ASDATADIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.SS2012\OLAP\Data
      ASLOGDIR:                      C:\Program Files\Microsoft SQL Server\MSAS11.SS2012\OLAP\Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  TABULAR
      ASSVCACCOUNT:                  NT Service\MSOLAP$SS2012
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Manual
      ASSYSADMINACCOUNTS:            PC\Haansi
      ASTEMPDIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.SS2012\OLAP\Temp
      BROWSERSVCSTARTUPTYPE:         Automatic
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20120731_161013\ConfigurationFile.ini
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, BIDS, CONN, IS, BC, SDK, SSMS, ADV_SSMS, SNAC_SDK
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  NT Service\MSSQLFDLauncher$SS2012
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SS2012
      INSTANCENAME:                  SS2012
      ISSVCACCOUNT:                  NT Service\MsDtsServer110
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  NT Service\ReportServer$SS2012
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Manual
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$SS2012
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           Haansi-PC\Haansi
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20120731_161013\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Client Tools Connectivity
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Client Tools SDK
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Management Tools - Basic
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       SQL Server Data Tools
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Reporting Services - Native
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Data Quality Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Integration Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       Analysis Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Feature:                       SQL Client Connectivity SDK
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20120731_161013\SystemConfigurationCheck_Report.htm

    Please help. 
    I did what you suggested, but, still got error message to install SQL server data tools: Here is the log.
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2068037632
      Start time:                    2014-09-29 15:05:38
      End time:                      2014-09-29 15:15:55
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for SSDTBI_VS2012:   Use the following information to resolve the error, and then try the setup process again.
    Machine Properties:
      Machine name:                  MSBI
      Machine processor count:       4
      OS version:                    Future Windows Version
      OS service pack:               
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered  Configured
      SQL Server 2008                                                          Management Tools - Basic  
                  1033                 Express Edition      10.0.1600.22    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Database Engine Services                 1033      
              Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            SQL Server Replication                   1033      
              Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Full-Text and Semantic Extractions for Search 1033                
    Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Data Quality Services                    1033    
                Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSAS11.MSSQLSERVER             Analysis Services                        1033  
                  Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012      MSSQLSERVER          MSRS11.MSSQLSERVER             Reporting Services - Native              1033        
            Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Management Tools - Basic  
                  1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Management Tools - Complete  
               1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Client Tools Connectivity  
                 1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Client Tools Backwards Compatibility
        1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Client Tools SDK      
                      1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          SQL Server Data Tools    
                   1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Integration Services    
                    1033                 Enterprise Evaluation Edition 11.0.2100.60    No         Yes       
      SQL Server 2012                                                          Reporting Services - SharePoint
                                                       11.0.2100.60    No         Yes    
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      Installation location:         C:\9f7a58aa5d6d76ffe6be968a4ad339f5\x86\setup\
      Installation edition:          Express
      Slipstream:                    True
      SP Level                       1
      Patch Level:                   11.1.3128.0
    Product Update Status:
      Success: KB 2674319, KB 2793634
    Product Updates Selected for Installation:
      Title:                         Service Pack 1
      Knowledge Based Article:       KB 2674319
      Version:                       11.1.3000.0
      Architecture:                  x86
      Language:                      1033
      Title:                         SQL Server 2012 SP1 GDR Product Update
      Knowledge Based Article:       KB 2793634
      Version:                       11.1.3128.0
      Architecture:                  x86
      Language:                      All
      Update Source:                 MU
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                <empty>
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                true
      FEATURES:                      SSDTBI_VS2012, SNAC_SDK
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files (x86)\Microsoft SQL Server\
      INSTANCEID:                    <empty>
      INSTANCENAME:                  <empty>
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           <empty>
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  true
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20140929_150412\ConfigurationFile.ini
    Detailed results:
      Feature:                       SQL Server Data Tools - Business Intelligence for Visual Studio 2012
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft Visual Studio Tools for Applications 2012
      Component error code:          0x80044000
      Component log file:            C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20140929_150412\VSTA2012_LangsSupport_Cpu32_1.log
      Error description:             VS Shell 2012 installation has failed with exit code -2147205120.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3436.0&EvtType=VSTA2012_LangsSupport%40Install%400x-2147205120
      Feature:                       SQL Client Connectivity
      Status:                        Passed
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20140929_150412\SystemConfigurationCheck_Report.htm

  • Performance manager sql action rule for updating metric table

    Hi, I need to update metric stop_date using a sql action rule (Performance Manager execute sql action rule). My problem is I can't update stop_date into the PM Repository Database. Sql action database connection is properly set, but when I set sql for executing update in table ci_probe and I schedule the rule the system doesn't seem to connect to Database (the rule run successfully, but the table ci_probe is not updated). I don't understand if the problem is database connection or wrong sql code.
    Can Anyone help me with suggestions or sql action rule samples?
    Thanks
    Luigi
    Edited by: Luigi Oliva on Jun 13, 2008 1:32 PM

    Hi It's working, Problem was in repeat_interval it's working now,
    Thanks,
    I changed
      repeat_interval          => 'FREQ=DAILY;BYSECOND=10',to
      repeat_interval          => 'FREQ=SECONDLY;BYSECOND=10',Thanks,
    Edited by: NSK2KSN on Jul 26, 2010 11:14 AM

  • Possible for Native SQL to read Pooled Tables?

    Hi Experts,
    Is it possible to run native SQL against SAP's internal Pool Table, the table that stores the many "Pooled Tables" across SAP?  I realize that is much preferred to access the pooled table using Open SQL via ABAP functions, but that is not an option for me.  I am writing native SQL against a copy of the SAP ECC underlying tables.
    If it is possible, what is the technical name of the table?
    Thanks,
    Kevin

    Hello Kevin,
    quite a strange question. As you mentioned it before, the preffered way is to use open sql. The pooled tables are handled by the application server and so, they are not accessible by native sql.
    Independently, consider about two things:
    1.) The ABAP DDIC uses sometimes different sizes and field-lengths, so you should not read LSTR or LRAW fields with native sql.
    2.) You have to be more patient about transaction handling and parameter setting via SQL, because your application server does not get any information about what you have done before.
    Kind regards,
    Hendrik

  • SQL for fragmented tables

    Hello,
    Can someone give me the sql to determine what tables and or tablespaces are say 15% fragmented? I'm on Oracle 9i.
    thanks...

    Are you using locally managed tablespaces? If so, you can stop worrying about tablespace fragmentation, particularly if you are using UNIFORM extents.
    Can you define "table fragmentation"? I'm hard-pressed to figure out how a table can be fragmented.
    Assuming you need to worry about fragmentation in the first place, either because you are still using dictionary managed tablespaces or because you have "table fragmentation" for some definition of the term, can you define what you mean by percentage fragmentation? If you have a dictionary managed tablespace, it is not obvious what it would mean to have a tablespace that was 15% fragmented.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • SQL for join table  problem?

    hi morning,
    my problem also haven find out the solution,can help me solve.
    I got one part of register student to exam,during that part is like that.
    Student Code:________(table3)
    Exam Code:_________(table 3)
    Student Name:________(table 1)
    Exam Name:_________(table 2)
    I can write code call table 3 but when three table join together in part 3,got problem is come out alry....The problem is inside the Student Name & Exam Name.When i use the button for NEXTRECORD to check record,cannot call the student Name & exam Name.
    Thank for help. Because i use sql code to call table 3 to check table1 and table 2 detail ,then retrive that data.
    my code is like that,
    private void cmd_NexRec_RSEActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    int i;
    i=0;
    try{
    String x1,x2;
    x1=(jTextField10.getText()).trim();
    x2=(jTextField11.getText()).trim();
    if (x1.equals("")&& x2.equals("") )
    counter.studentExam="R";
    counter.registerStudentExam="N";
    i++;
    jInternalFrame8.setVisible(false);
    Connection con = getConnection2();
    Statement s = con.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs=getStudentExams();
    ResultSet rs1=getCodes();
    ResultSet rs2=getExams();
    String select="select * from studentExamFile a LEFT JOIN {studentData b} ON a.student_code=b.student_code LEFT JOIN {exam c} ON c.exam_code=a.exam_code where student_code='"+ x1 +"' and exam_code='"+ x2 +"'" ;
    // String select ="select * from studentExamFile , exam , studentData where studentExamFile.student_code=studentData.student_code and exam.exam_code=studentExamFile.exam_code ";
    // rs = s.executeQuery(select);
    rs.next();
    StudentExam c=getstudentcode(rs);
    Code c1=getCode(rs1);
    Examcode c2=getexamcode(rs2);
    jTextField12.setText(c.studentcode);
    jTextField13.setText(c.examcode);
    jTextField14.setText(rs.getString("c1.name"));
    jTextField15.setText(rs.getString("c2.ename"));
    // jTextField14.setText(c1.name);
    // jTextField14.setText(c2.ename);
    jLabel16.setText("Record: Review");
    jInternalFrame10.setVisible(true);
    jTextField12.setEnabled(false);
    jTextField13.setEnabled(false);
    //New Line
    jTextField14.requestFocus();
    else
    Connection con = getConnection2();
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    String w=(jTextField10.getText()).trim();
    String w2=(jTextField11.getText()).trim();
    //String select= "select * from [studentExamFile] where [student_code]>'" w "'";
    // String select1="select * from [studentExamFile] where [exam_code]>'" w2 "'";
    String select="select * from studentExamFile a LEFT JOIN {studentData b} ON a.student_code=b.student_code LEFT JOIN {exam c} ON c.exam_code=a.exam_code where student_code='"+ x1 +"' and exam_code='"+ x2 +"'" ;
    ResultSet rs;
    rs = s.executeQuery(select);
    // rs = s.executeQuery(select1);
    rs.next();
    if(rs.isFirst())
    counter.registerStudentExam="N";
    jInternalFrame8.setVisible(false);
    jTextField12.setText(rs.getString(1));
    jTextField13.setText(rs.getString(2));
    jLabel16.setText("Record: Review");
    jInternalFrame10.setVisible(true);
    jTextField12.setEnabled(false);
    jTextField13.setEnabled(false);
    //New Line
    jTextField14.requestFocus();
    counter.studentExam="R";
    else
    JOptionPane.showMessageDialog(this,"End of the file ","Infomation",JOptionPane.INFORMATION_MESSAGE);
    }catch(SQLException e)
    System.out.println("Error");
    //jTextField3.requestFocus();
    }

    thanks for reply.
    i think my problem is in connection to database .
    String sql="select studentData.student_name, exam.exam_name from studentData,exam,studentExamFile where studentData.student_code=studentExamFile.student_code and exam.exam_code=studentExamFile.exam_code ";
                    // String sql="select studentData.student_name , exam.exam_name from studentExamFile  LEFT JOIN { studentData }  ON studentExamFile.student_code=studentData.student_code LEFT JOIN { exam }  ON exam.exam_code=studentExamFile.exam_code ";
                     Connection con = getConnection();
                     Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                     Connection con2 = getConnection();
                     Statement s3 = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                     System.out.println("error");//my problem inside here....help me
                     rs3=s.executeQuery(sql);
                     rs3=s3.executeQuery(sql);
                     rs3.next();
                     String s1,s2;
                     s1=rs3.getString(1);//maybe me dunno how to convert the sql data...
                     s2=rs3.getString(2);
                     rs.next();
                     rs2.next();
                    // rs3.next();
                     Code c=getCode(rs);
                     Examcode c2=getexamcode(rs2);
                     StudentExam c3=getstudentcode(rs3);
                     jTextField12.setText(c3.studentcode);
                     jTextField13.setText(c3.examcode);
                    // jTextField14.setText(rs.getString("c.name")); 
                     //jTextField15.setText(rs.getString("c2.ename"));
                     jTextField14.setText(s1); 
                     jTextField15.setText(s2);
                     jLabel16.setText("Record: Review");
                     jInternalFrame10.setVisible(true);
                     jTextField12.setEnabled(false);
                     //New Line
                     jTextField14.requestFocus();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQL statement for my Audit Table

    Hi,
    I have enabled the Update Audit on table emp in my Oracle 9.2.0.6.0 production database. How to find the SQL used for updating the table.

    Hi Padma,
    The audit_trail is set to true
    NAME               TYPE          VALUE
    audit_file_dest          string          /u01/app/oracle/admin/audit
    audit_sys_operations     boolean     TRUE
    audit_trail          string          TRUE
    transaction_auditing     boolean     TRUE

Maybe you are looking for