TDMS Create or Replace returns an error

This example using FPGA (towards the end of the page):

http://zone.NI.com/DevZone/CDA/tut/p/ID/11198#toc4

Step #26 under FPGA section implements the open or create TDMS files.

It always returns error #7 of the PDM create or replace VI.  When you create a new file, it should not return error "file not found".

You are receving error 7 the path of the file that you specify. Make sure you use the correct path to the file. If you still have problems is an article in the knowledge base that may shed more light on what goes wrong.

http://digital.NI.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF?OpenDocument

Kind regards

David has.

Tags: NI Hardware

Similar Questions

  • Create Or Replace function error

    Hello

    I do the search of texts using Oracle SQL Developer: ODMiner... I imported the "WEBLOG" data into a table... These weblog data consists of the activity of users, date, time, url, etc. The first step I took was to use a function to convert the date and time I have in the data table, in a number representing the 40 minutes since 01/01/1990. I did it by dividing by 2400 (seconds in 40 minutes). The main objective is to have a period of time for the sessions.
    I used the following code,

    (SsnDate) CREATE or REPLACE FUNCTION
    DEFAULT VARCHAR2 03/01/18 EFFECTIVE DATE,
    TIME IN VARCHAR2
    ) RETURN NUMBER
    AS
    BEGIN
    RETURN TRUNC ((to_date(DATE||) e '|| TIME, ' Hh: mm: DD-MM-YY ')-to_date('01-JAN-1990','DD-MON-YYYY')) * (86400/2400);
    END ssnDate;

    This is what appeared in the newspaper after the execution of the statement,

    SsnDate compiled FUNCTION
    WARNING: the execution is completed with warning

    After that, I tried to create a VIEW to change the DATE and TIME with the ssnDate that was created earlier and concatenate the CS_URI_STEM (which is the accessible resource) and CS_URI_QUERY (which is the query, if any, the client was trying to perform) in a new field called WEB_LINK.

    This is the code used

    CREATE OR REPLACE VIEW WEBLOG_VIEWS ("C_IP", "WEB_LINK", "CS_USER_AGENT", "SESSION")
    AS
    SELECT ssnDate (LOG_DATE, LOG_TIME) AS "SESSION."
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM |'?) ' || CS_URI_QUERY) AS WEB_LINK
    OF THE WEB BLOG.

    Now that I got the following error...

    Error from the 1 in the command line:
    CREATE OR REPLACE VIEW WEBLOG_VIEWS ("C_IP", "WEB_LINK", "CS_USER_AGENT", "SESSION")
    AS
    SELECT ssnDate (LOG_DATE, LOG_TIME) AS "SESSION."
    C_IP,
    CS_USER_AGENT,
    (CS_URI_STEM |'?) ' || CS_URI_QUERY) AS WEB_LINK
    WEBLOG
    Error in the command line: 3 column: 38
    Error report:
    SQL error: ORA-00923: KEYWORD not found where expected
    00923 00000 - "FROM keyword not found where expected"
    * Cause:
    * Action:

    I do not understand where I am going wrong with this... It comes to the data preparation step that requires me to prepare the data before applying the techniques of modeling or algorithms... The next step might be to group the data, based on the time of the session, ip and the user agent of each session as well as the fields web_links visited by the user of the session.

    I would be really grateful for all entries on where I'm wrong and all the solutions for it!

    Good. Please close the message.

    Concerning
    Girish Sharma

  • SRM 5.5 - the remote server returned an error: (503) server unavailable, could not create SSL/TLS secure channel

    Design:

    2 vCenter VMs version 5.5 on new W2k12. x. related and the same use facilities key SSO (default installation)

    2 x fresh install of the SRM VMs version 5.5

    20 + hosts vSphere 5.5 with DR/HA configured and working. Two dvSwitches (one per site) configured with the groups of port / VLAN work

    Question:

    Installation goes well until I needed to activate the Plugin SRM in vCenter.  Plugin called "Plug-ins available" and I click on the link 'download and install '.

    I had two separate fouls on both servers vCenter, both with same errors if it is compatible.

    Errors:

    (attached file viclient-3 - 000.log)

    The request has been aborted: could not create SSL/TLS secure channel.

    (attached file viclient-3 - 000.log)

    The remote server returned an error: (503) server unavailable

    I guess that the two are linked and probably something with SSO.  Post installation on each server vCenter vCenter, at the level of the vCenter, I added the "Domain Admins" AD Group with all permissions and then properly connected and built the group with this set of credentials.

    I need help to debug this further.

    Thank you

    ************

    < < Updated > >

    Seems the features and functions are NOT present so you don't not sign in as '[email protected]' (SSO account by default for this "basic" configuration)

    But even with this connection, I have noticed that there is NO option in the webclient service, to perform the installation of a vCenter plug-in.  It does not appear in the vSphere Client (see images).

    I also found it weird that the web client to vCenter illustrates SRM roles but the traditional client does not work.

    Maybe it's a clue to the root cause of...

    Post edited by: ArrowSIVAC 2013-10-07 to provide more details and attachments

    Post edited by: ArrowSIVAC, this is related to the case of support for vmware 13384832210 This problem is solved.  Several pieces here. (1) vCenters were installed secretly with local account as own databases, and this is how I usually do things (2) MRS. servers were built as separate virtual machines, VMWare vs guides guess and documents in anticipation of your SRM installation on the same server as vCenter Documentation / Installer is not clarified that you MUST use domain for MRS accounts in the multiplayer linked site facilities and if you do not, the installation is completed without error, but resources will not work. Errors have for client plugin does not work. It was the symptom, the reason was that the SRM service did not work.  The service would not start and only an error in the Windows event log is 'vmware-dr stopped service' is because the connectivity issue of MRS to vCenter hosted the new SQL instance database SRM. The SRM database has been installed on the instance of vCenter server as vCenter database.  And just like the installation of default vCenter I chose localhost\administrator for database owner.  The database was filled with tables, but SRM has connectivity problems.   The fix for this was to add "domain\user" (called mine SRMAdmin and added as a member of domain admin), add this user in SQL in the list of database users and then promoted as the owner of SRM database and define the rights on DBO. This fixed the first issue. Second issue was that SRM installation set the DSN system identification information, but does not specify that they must also be domain based accounts.  The installation program is not not clear here and should only allow user domain\username when installing. After several attempts because of the root and installation methods different tried, how to get the installation complete and properly configure was to log on to the system AS the example domain account: domain\srmadmin = > Configuration System DSN by selecting "How should SQL Server verify the authenticity of the login ID?"  "with integrated Windows authentication', and then the installation of SRM to the"Enter Database user credentials"value"domain\srmadmin ".  Then and communication services to the vCenter SRM hosted DB database will work correctly. < See images attached benchmarks >

    attached files

  • An internal tool or the library returned an error.

    I had a very slight modification of a source today and update the source file.  When I tried to build the distribution, however, failed to build with the following messages: "Error Part developer configuration options", then "an internal tool or the library returned an error."  No other information was provided as to the source of possible error.  It is a project that has been maintained for several years.  I tried to build in 2015 of the BCI and in 2013 with the same results.  I was able to build another project without error.

    I've attached a screenshot of the error window.  I was able to build the distribution after you have created a new file .cds.  The other file must be corrupted in some unknown way.

  • The internal organisation of DIAdem data returned an error of initialization

    Hello.

    I have a laptop that is running Windows XP with installed 10.2 DIAdem.

    Main problem: tiara does not start. A few seconds after trying to run it I get a message "ERROR" box saying

    "The internal organization of DIAdem data returned an initialization error."

    Question that might be related: when I connect to the laptop there is an error message saying:

    "The DataFinder cannot start to an internal error. (122): failed to open the configuration file! C:\Documents and Settings\Settings\Application Data\...\my.datafinder< runmode:="" datafinder="" desktop="">

    The directory C:\Documents and Settings\\Local Settings does not exist on the laptop.

    My first thought was to reinstall just DIAdem. However, when I open Add/Remove Programs tiara is not in the list, so I can't uninstall it. When I just try to run the installer it says I need to uninstall the existing version first.

    No idea how I could get DIAdem working again?

    (btw this laptop is used for courses etc in our society, so I do not know how this problem occurred. Just that they have not been able to run the tiara on her for more than a year)

    Hi such,

    in your 1st post you mentioned that you couldn't find tiara in the Add/Remove Programs list.

    => Please look into this list to or . That's because NEITHER has its own entry in the Add/Remove Programs list. Here you should find DIAdem to uninstall.

    You should use MSIBlast if the 'normal' Uninstall failed for some reason. If you use MSIBlast, he could not guarantee that everything is uninstalled in the right order. MSIBlast is not updated on the dependencies between the msi files.

    You told us that the directory C:\Documents and Settings\\Local Settings exist on your laptop. If you have a proper installation of XP, it must be there. It is sometimes invisible because of your windows settings. If this is the case please change your windows settings so that you can see the folders system as well.

    If you found this file, please remove the following folder: "c:\Documents and Settings\Settings\Application Data\National Instruments\Shared\DataFinder". After that start please DIAdem - a new folder with sub folders 'config' and 'data' are created.

    If the error is-, then I have only one idea: If your laptop doesn't have hard enough to free up space to manage all temporary files that occurs during an installation - so maybe it's that this message occurs if you start the installed application. The installer itself is not warn about in each case, overloaded virtual machine, e. g. fragmented hard drive, etc.).

    Hope that some of my points would help you,

    Kind regards

    dietfons

  • Synonym of ALTER with Create or replace synonym

    Oracle 9i Release 2 database

    I need to change the thesaurus during execution to point to a new owner of the table. But I'm running into errors of "insufficient privileges".

    SQL> select grantee,owner,table_name,privilege from dba_tab_privs
      2  where table_name IN ('OE4PNFGETDATA','OEBGGETDATA','OEGETDATA');
    
    GRANTEE       OWNER     TABLE_NAME        PRIVILEGE
    ------------- --------- ----------------- -----------
    OEMUSER       OEM2      OE4PNFGETDATA     EXECUTE
    OEMUSER       OEM2      OEBGGETDATA       EXECUTE
    OEMUSER       OEM2      OEGETDATA         EXECUTE
    OEMUSER       OEM1      OEBGGETDATA       EXECUTE
    OEMUSER       OEM1      OEGETDATA         EXECUTE
    OEMUSER       OEM1      OE4PNFGETDATA     EXECUTE
    
    SQL> sho user
    USER is "OEMUSER"
    SQL> select synonym_name,table_owner,table_name from user_synonyms ;
    
    SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME
    ------------------------------ ------------------------------ ------------------------------
    OE4PNFGETDATA                  OEM1                           OE4PNFGETDATA
    OEBGGETDATA                    OEM1                           OEBGGETDATA
    OEGETDATA                      OEM1                           OEGETDATA
    
    

    I need to change the owner of the table to OEM2. Using create or replace synonym in a procedure:

    CREATE OR REPLACE PROCEDURE oemuser.p_switch_users (  i_nonactive_user  IN  VARCHAR2
                                                        , o_msg             OUT VARCHAR2 )
    AS
       v_synonym_name VARCHAR2(30) ;
       v_table_owner  VARCHAR2(30) := i_nonactive_user ;
       v_table_name   VARCHAR2(30) ;
       v_sql          VARCHAR2(255);
    BEGIN
       FOR   rec   IN   ( select synonym_name, table_owner, table_name from user_synonyms )
       LOOP
          v_synonym_name := rec.synonym_name ;
          v_table_name   := rec.table_name   ;
          v_sql := 'CREATE OR REPLACE SYNONYM ' || v_synonym_name || ' FOR ' || v_table_owner || 
                   '.' || v_table_name ;
          EXECUTE IMMEDIATE v_sql ;
    
       END LOOP ;
       
       o_msg := 'Completed successfully' ;
       
       EXCEPTION
          WHEN  others  THEN
             o_msg := 'Error_Stack...' || Chr(10) ||
                      DBMS_UTILITY.FORMAT_ERROR_STACK ;
             RAISE ;
    END p_switch_users ;
    /
    
    var o_msg varchar2(512)
    var i_user varchar2(10)
    exec :i_user := 'OEM2'
    
    exec p_switch_users(:i_user,:o_msg)
    
    ORA-01031: insufficient privileges
    ORA-06512: at "OEMUSER.P_SWITCH_USE
    RS", line 
    
    

    I have not tried to drop the synonyms and re - create, but I expect the same error. Any suggestions?

    Hello

    the owner of the procedure should the privilege of creating its own synonyms if i_nonactive_user is defined on its own behalf (this case has no interest), and he has the privilege to create ANY synonym in other... At first glance, I would say that this is not a good idea.

    Note: you can also save a job: no need to redefine a synonym to point to the same thing, so I would limit synonyms selected in the loop:

    FOR rec IN (SELECT u.synonym_name, u.table_owner, u.table_name

    U user_synonyms

    WHERE u.table_owner! = v_table_owner

    )

    Best regards

    Bruno Vroman

  • RW-50011: error:-apps oracle_home test connection returned an error: 4

    Hello

    Before getting into the details, let explain me my environment.

    Virtual Box on top of Mac OS X

    Oracle Linux 6.5 on top of Virtual Box

    2-node - the node of the database and the Application node

    I use Oracle E-Business Suite Installation and Notes of version 12 (12.1.1) for Linux x 86-64 upgrade (Doc ID 761566.1()

    I have install Oracle EBS r12.1.1 again and again just to get better and better and improve the documentation as I go along. I was able to install the database without error layer at all. And for the most part, everything is going very well on the layer application until I get to the end and I noticed on the adautocfg.sh application layer ends with success, and then I see rw-50011: error:-apps oracle_home test connection returned an error: 4. at first, I thought it was permission then I added the root and my user appebs for all groups that did and I also made each Directory was 777 permissions. As I drove deep into the logs, I noticed that the riwTDBup.sh of ended not because it could not open the database. I noticed that riwTDBup.sh called sets in environment in $INST_HOME/ora/10.1.2/ and then tries to start a receiver located at $INST_HOME/ora/10.1.2/network/admin - this is where I see that no listener has been created. A tnsnames.ora is there but no listener. So I went to $ADMIN_SCRIPTS and I try to manually start the receiver and although his place as well and it is said that there is no listener for APPS_VIS. How is it, my interlocutor is not be created and can someone tell me what am I did not right, why it is constantly at the end of the installation. What newspapers do you need to see to help me with this question?


    Thanks in advance

    Hey Hussein snoussi-Oracle,.

    I'm mad at myself. After having sitting just think and get back to the basics... Why my application server cannot connect to my database, especially after the fact that I did this install successfully before? After decision on the fact that both servers could talk to each other, a light bulb off, I knew it was something blocking the connection and then I thought about it. LOL, that was the firewalls. I deleted the application server and restart installation with two disabled firewalls and it worked even fix the error of libgcc_s.so, installing crossed without errors at all, everything was fine with my host and domain name. LOL, I can finally say that I can install Oracle EBS R12.1 without errors.

    Even if it took my whole weekend, I wouldn't change a thing. I learned so much troubleshooting idea, funny how you can look in hindsight and appreciate the growing pains. Thanks Hussein for all the help! Next upgrade of database and applications, then learn how to install Rac and how to install EBS on rac and Oracle EBS on PAP management, if you have any suggestions on where to go to learn these things it would be awesome!

  • Install the updates for installation of Creative Cloud Packager, Mac education.  Package of CCP update returns an error.  CCP does not load.  Where can I download the latest CCP?

    Hey all:

    Created and deployed a CC 2014 package to our iMac Apple OS 10.9.5

    The package is now obsolete and workstations cannot install updates.

    I tried to create a package update with Adobe Creative packer of cloud, but the update package is not installed.

    I try to create a new package of Creative Cloud 2014 with all updates but does not load CCP.

    CCP returns the error "Oops, something has gone wrong, please try again."

    CCP downloaded from my LWS gives me the same error.

    Where can I download the latest version of the CCP?

    I have install Adobe Creative Cloud 2014 via the package can configure us the desktop computer to update from the internet?

    If so, how?

    Thank you.

    WIN

    http://www.Adobe.com/go/ccp_installer_win

    MAC

    http://www.Adobe.com/go/ccp_installer_osx

    It is likely that the ports are closed that the CCP needs to talk to our servers.

    Please refer to this page8s). You will find information about the deployment and packaging of CC:

    Creative Cloud for businesses

  • SQL &gt; create or replace procedure sp_Validate3 (p_acr_no IN varchar2 2)

    Hi all

    11.2.0.1

    Can you help me to debug what is that pl/sql code error? Thank you
    SQL> create or replace procedure sp_Validate3(p_acr_no    IN  varchar2
      2                                         ,p_recordset OUT sys_refcursor
      3                                         ) as
      4  begin
      5   open p_recordset for
      6      select am.acr_no as acr_no
      7            ,'TEST' as lastname
      8            ,nvl(a.or_no,'0') as ecc_orno
      9            ,nvl(b.or_no,'0') as rp_orno
     10            ,nvl(c.or_no,'0') as ar_orno
     11      from   tab t
     12                        join acr_master     am on (trim(acr_no) = p_acr_no)
     13             left outer join payment_master a  on (payment_type = 'ECC' and trim(acr_no) = p_acr_no)
     14             left outer join payment_master b  on (payment_type = 'RP'  and trim(acr_no) = p_acr_no)
     15             left outer join payment_master c  on (payment_type = 'AR'  and trim(acr_no) = p_acr_no);
     16  end;
     17  / 
     
    Warning: Procedure created with compilation errors.
     
    SQL> show error
    Errors for PROCEDURE SP_VALIDATE3:
     
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    6/5      PL/SQL: SQL Statement ignored
    13/80    PL/SQL: ORA-00918: column ambiguously defined
    SQL>
    create table acr_master(acr_no varchar2(10))
    
    drop table payment_master
    
    create table payment_master(or_no varchar2(10),acr_no varchar2(10),payment_type varchar2(10))
    
    /* Formatted on 06/06/2013 6:06:58 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE PROCEDURE sp_Validate3 (p_acr_no      IN     VARCHAR2,
                                              p_recordset      OUT sys_refcursor)
    AS
    BEGIN
       OPEN p_recordset FOR
          SELECT   am.acr_no AS acr_no,
                   'TEST' AS lastname,
                   NVL (a.or_no, '0') AS ecc_orno,
                   NVL (b.or_no, '0') AS rp_orno,
                   NVL (c.or_no, '0') AS ar_orno
            FROM               tab t
                            JOIN
                               acr_master am
                            ON (TRIM (acr_no) = p_acr_no)
                         LEFT OUTER JOIN
                            payment_master a
                         ON (payment_type = 'ECC' AND TRIM (acr_no) = p_acr_no)
                      LEFT OUTER JOIN
                         payment_master b
                      ON (payment_type = 'RP' AND TRIM (acr_no) = p_acr_no)
                   LEFT OUTER JOIN
                      payment_master c
                   ON (payment_type = 'AR' AND TRIM (acr_no) = p_acr_no);
    END;
    /
    
    SQL> show error
    Errors for PROCEDURE SP_VALIDATE3:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    6/5      PL/SQL: SQL Statement ignored
    13/80    PL/SQL: ORA-00918: column ambiguously defined
    SQL>
    
    --In the below code after keeping alias names of the tables, the procedure compiled successfully 
    
    /* Formatted on 06/06/2013 6:06:58 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE PROCEDURE sp_Validate3 (p_acr_no      IN     VARCHAR2,
                                              p_recordset      OUT sys_refcursor)
    AS
    BEGIN
       OPEN p_recordset FOR
          SELECT   am.acr_no AS acr_no,
                   'TEST' AS lastname,
                   NVL (a.or_no, '0') AS ecc_orno,
                   NVL (b.or_no, '0') AS rp_orno,
                   NVL (c.or_no, '0') AS ar_orno
            FROM               tab t
                            JOIN
                               acr_master am
                            ON (TRIM (acr_no) = p_acr_no)
                         LEFT OUTER JOIN
                            payment_master a
                         ON (a.payment_type = 'ECC' AND TRIM (a.acr_no) = p_acr_no)
                      LEFT OUTER JOIN
                         payment_master b
                      ON (b.payment_type = 'RP' AND TRIM (b.acr_no) = p_acr_no)
                   LEFT OUTER JOIN
                      payment_master c
                   ON (c.payment_type = 'AR' AND TRIM (c.acr_no) = p_acr_no);
    END;
    /
    
  • ORA 28817 PLSQL function returned an error. When the apex 4 2 instance access

    Hello

    I just upgraded from apex to apex 4.2 4.1. All is well except for this error I get when I try to access the parameter Instance on the App Admin (localhost/apex/apex_admin)
    ORA-28817: PL/SQL function has returned an error
    What could be the problem? How we solve this problem...

    I'm working on the 2012 Win server machine... apex 4.2 with earphone 2 deployed on Glassfish 3.1.2 apex.

    Best regards
    Fateh

    Hello Faye,

    We are already aware of this problem, even if it is not yet present on our Web page of problems known. The reason for this error is that the new facility replaces an instance to the scale encryption key. In the preferences of the instance which have been encrypted with the old value (the SMTP password and the password for the portfolio), the values are not valid after the upgrade and decryption causes this error. As a work around, you can use the apex_instance_admin package to replace the invalid passwords.

    The following code shows how the decryption throws ORA-28817:

    SYS@a411> select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual;
    select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual
           *
    ERROR at line 1:
    ORA-28817: PL/SQL function returned an error.
    ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
    ORA-06512: at "SYS.DBMS_CRYPTO", line 44
    ORA-06512: at "APEX_040200.WWV_FLOW_CRYPTO", line 89
    ORA-06512: at "APEX_040200.WWV_FLOW_INSTANCE_ADMIN", line 239
    

    You can fix this by entering new password:

    SYS@a411> exec apex_instance_admin.set_parameter('SMTP_PASSWORD','my smtp password');
    PL/SQL procedure successfully completed.
    
    SYS@a411> exec apex_instance_admin.set_parameter('WALLET_PWD','my wallet password');
    PL/SQL procedure successfully completed.
    
    SYS@a411> select apex_instance_admin.get_parameter('SMTP_PASSWORD') from dual;
    APEX_INSTANCE_ADMIN.GET_PARAMETER('SMTP_PASSWORD')
    ----------------------------------------------------------------------------------------------
    my smtp password
    
    1 row selected.
    

    Kind regards
    Christian

  • VALIDATION - function returns the error text

    I have a domain that occurs on about 12 pages, I need to post this field with some code

    I created a function on the database that performs this validation, I pass the field value to the function and it returns some text of error, or NULL if the value is correct

    I can't for the life of figure me out how to call the function of APEX

    I've tried everything

    FUNCTION RETURN ERROR TEXT, Expression SQL, PL/SQL Expression... nothing works!

    to call the function my comand is

    FN_VALIDATE_HR1_REF (: P1_GCI,: P1_HR1_REF);

    I want to return the error on the function text and display it in the banner of APEX error

    any help greatly appreciated

    A function like this return error text should work:

    Return (FN_VALIDATE_HR1_REF (: P1_GCI,: P1_HR1_REF));

    Is giving the error?

  • Ampersand substitution in create or replace procedure statement

    Hi guys,.

    I wonder why my replacement ampersand works in a create or replace statement of the stored procedure.

    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS


    Cancel the DEFINITION DimSales;
    Cancel the DEFINITION FactTable;
    SET DimSales = 'TESTTAB;
    SET FactTable = myfact;


    BEGIN
    *...*

    Error (5,20): PLS-00103: encountered the symbol "=" when expected as follows: =. (@ %; not null default range character)


    If I assign the value with: = I get the error "invalid table" thereafter for the statemnt of INSERTION:

    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS


    Cancel the DEFINITION DimSales;
    Cancel the DEFINITION FactTable;
    SET DimSales: = ' x 2';
    SET FactTable: = ' x 1';


    BEGIN
    INSERT INTO & DimSales (column1, column2,...)

    Why not the ampersand substitution work in a stored procedure?

    No problem with the carpet. Display. But you don't need to create and drop them again. Simply create a time and refresh just before departure if necessary. I expect the creation and updating of points of view is fast comparibly. Also access to the seller_id should be indexed.

    Your original pl/sql block is slow due to several reasons. One might be that you agree to each line. Engage is an extremely slow process. He avoid as much as possible. Another part might be that you make all the changes of context of pl/sql. The obvious way to avoid this would be to BULK operations (bulk-select + Forall). It is not so difficult. The size of the collection must be limited to a lower amount.

    Best way would be to measure the performance of pl/sql parts using a tool such as DBMS_PROFILER. Then you can decide what part is slow and must be granted.

    A simple insert could be faster. Did you test that?

    example not tested

    INSERT /*+append */
    INTO &DimSales (K_Sales,REG,BVL,DS, VS,RS,GS,VK)
    (SELECT trim(leading '0' from RS||GS) ,REG, BVL,DS, VS,RS,GS,VK
    from &FactTable f
    join &testsales s on f.SellerNo =s.Seller_No;
    
    commit;
    

    You can run the other issues, but this is generally the fastest approach. Try to avoid the separate if possible. This requires a sort and will slow down the insert of a lot.

    Published by: Sven w. on November 30, 2010 17:10

  • [Help] Replace the MySQL error message

    In the form of the insert, I want to put a special, instead of mysql_error error message

    Here is an example:

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "insert_form")) {}
    $insertSQL = sprintf ("INSERT INTO stuff (title, number) VALUES (%s, %s)," ")
    GetSQLValueString ($_POST ['titla'], "text").
    GetSQLValueString ($_POST ['numbers'], "int"));

    @mysql_select_db ($database_connection, $connection);
    $Result1 = mysql_query ($insertSQL, $connection) or die (mysql_error ());

    cause I get an error like cannot be null

    Thank you.

    [Subject line edited by moderator to make it more explicit]

    If you want to replace the MySQL error message, you can put your own error in quotes in the die() command. Change this:

    $Result1 = mysql_query($insertSQL, $connection) or die(mysql_error());
    

    to do this:

    $Result1 = mysql_query($insertSQL, $connection) or die('Database error');
    

    However, it is not very useful for a user, because all that appears is "Database error" with no indication of what caused the error or sort of a return to the page, except using the browser back button.

    A better way of handling things is to remove the or of the article die (mysql_error ()) code altogether and replace it with a PHP conditional statement that returns the user to an error page if the SQL code fails for some reason any. However, these changes will prevent you to make other changes to the server through the server behaviors panel behavior.

    $Result1 = mysql_query($insertSQL, $connection);
    
    if (!$Result1) {
      $insertGoTo = 'error.php';
    } else {
      $insertGoTo = 'another_page.php' // <-- this is the original $insertGoTo line
    }
    
  • CREATE (or REPLACE) procedure_definition | function definition

    A manual I read says to use the function CREATE or REPLACE function, but my function will not compile with one of these. It compiles only when I use the FUNCTION itself. The CREATION or replacement is no longer used in Oracle 10 g?

    Thank you

    Rich75 wrote:
    I tried in SQL * more and it worked for me too, but I usually use SQL Navigator. That's where I got the error.

    I'm pretty new to Oracle, so I probably don't understand some things too well. I realized that when I created the function in SQL * Plus, it appeared in SQL Navigator under functions. I created this function in a package, so I think it's a little different than the creation of a global function.

    Published by: Rich75 on January 27, 2010 10:02

    Yes, OK if you create a function inside a package, then you do not have to give create or replace keywords.

  • Create or replace view still holding

    Hello

    I'm trying to update an existing view, but "CREATE or REPLACE" takes forever. When I try to see the results of this point of view, I can see the results quickly. Also, I am able to create/upgrade new or existing views very fast.
    CREATE OR REPLACE VIEW OBR.IFV_OFFC_MGR_INFO
    AS 
     /* --------------------------------------------------------
      *   IFV_OFFC_MGR_INFO
      * --------------------------------------------------------
      *
      *   View to be used by those objects that require the office
      *       manager information pertinent to an office.
      *
      *   This is designed to return all Office Manager Info from
      *   various tables that store the related information
      *   for an agent.
      *
      *
      * --------------------------------------------------------
      */
    SELECT           
         NVL(MD.OFFC_TERR_CD, NVL(OCM.OFFC_TERR_CD, NVL(TVP.OFFC_CD, COS.OFFC_CD))) OFFC_CD,
         MD.IONS_ID      MD_IONS_ID, 
         MD.ASSOC_NAME      MD_NAME, 
         MD.ASSOC_EMAIL_ID      MD_EMAIL_ID, 
         OCM.IONS_ID      OCM_IONS_ID, 
         OCM.ASSOC_NAME      OCM_NAME, 
         OCM.ASSOC_EMAIL_ID      OCM_EMAIL_ID, 
         OCC.IONS_ID      OCC_IONS_ID, 
         OCC.ASSOC_NAME      OCC_NAME, 
         OCC.ASSOC_EMAIL_ID      OCC_EMAIL_ID,
         TVP.IONS_ID      TVP_IONS_ID, 
         TVP.ASSOC_NAME      TVP_NAME, 
         TVP.ASSOC_EMAIL_ID      TVP_EMAIL_ID, 
         COS.IONS_ID      TVP_COS_IONS_ID, 
         COS.ASSOC_NAME      TVP_COS_NAME, 
         COS.ASSOC_EMAIL_ID      TVP_COS_EMAIL_ID,
         NVL(MD.TERR_DESC, NVL(OCM.TERR_DESC, NVL(TVP.TERR_DESC, COS.TERR_DESC))) TERR_NAME
    FROM 
    (     SELECT 
              DISTINCT OFFC_TERR_CD, 
              TC.TERR_DESC, 
              FMA.IONS_ID, 
              OTC.OFFC_CD, 
              FMA.ASSOC_NAME, 
              FMA.ASSOC_EMAIL_ID 
         FROM OBR.IFT_IONS_OFFC_TERR IOT, 
                             OBR.IFT_OFFC_TERR_CD OTC, 
                             OBR.IFT_FLD_MGMT_ASSOC FMA, 
                             OBR.IFT_TERR_CD TC 
         WHERE IOT.OFFC_TERR_CD = OTC.TERR_CD 
                    AND ROLE_CD='TVP' 
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID
                    AND TC.TERR_CD = OTC.TERR_CD) TVP
    FULL OUTER JOIN
    (     SELECT           
              DISTINCT OFFC_TERR_CD, 
              TC.TERR_DESC, 
              FMA.IONS_ID, 
              OTC.OFFC_CD, 
              FMA.ASSOC_NAME, 
              FMA.ASSOC_EMAIL_ID 
         FROM OBR.IFT_IONS_OFFC_TERR IOT, 
                             OBR.IFT_OFFC_TERR_CD OTC, 
                             OBR.IFT_FLD_MGMT_ASSOC FMA, 
                             OBR.IFT_TERR_CD TC 
         WHERE IOT.OFFC_TERR_CD = OTC.TERR_CD 
                    AND ROLE_CD='COS' 
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID
                    AND TC.TERR_CD = OTC.TERR_CD) COS
    ON TVP.OFFC_CD = COS.OFFC_CD
    FULL OUTER JOIN 
    (     SELECT           
              DISTINCT OFFC_TERR_CD, 
              TC.TERR_DESC, 
              FMA.IONS_ID, 
              FMA.ASSOC_NAME, 
              FMA.ASSOC_EMAIL_ID 
         FROM OBR.IFT_IONS_OFFC_TERR IOT, 
                             OBR.IFT_OFFC_TERR_CD OTC, 
                             OBR.IFT_FLD_MGMT_ASSOC FMA, 
                             OBR.IFT_TERR_CD TC 
         WHERE IOT.OFFC_TERR_CD = OTC.OFFC_CD 
                    AND ROLE_CD='OCC' 
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID 
                    AND OTC.TERR_CD = TC.TERR_CD) OCC
    ON TVP.OFFC_CD = OCC.OFFC_TERR_CD
    FULL OUTER JOIN 
    (     SELECT 
              DISTINCT OFFC_TERR_CD, 
              TC.TERR_DESC, 
              FMA.IONS_ID, 
              FMA.ASSOC_NAME, 
              FMA.ASSOC_EMAIL_ID 
         FROM OBR.IFT_IONS_OFFC_TERR IOT, 
                             OBR.IFT_OFFC_TERR_CD OTC, 
                             OBR.IFT_FLD_MGMT_ASSOC FMA, 
                             OBR.IFT_TERR_CD TC 
         WHERE IOT.OFFC_TERR_CD = OTC.OFFC_CD 
                    AND ROLE_CD='OCM' 
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID 
                    AND OTC.TERR_CD = TC.TERR_CD) OCM
    ON TVP.OFFC_CD = OCM.OFFC_TERR_CD
    FULL OUTER JOIN
    (     SELECT 
              DISTINCT OFFC_TERR_CD, 
              TC.TERR_DESC, 
              FMA.IONS_ID, 
              FMA.ASSOC_NAME, 
              FMA.ASSOC_EMAIL_ID 
         FROM OBR.IFT_IONS_OFFC_TERR IOT, 
                             OBR.IFT_OFFC_TERR_CD OTC, 
                             OBR.IFT_FLD_MGMT_ASSOC FMA, 
                             OBR.IFT_TERR_CD TC 
         WHERE IOT.OFFC_TERR_CD = OTC.OFFC_CD 
                    AND ROLE_CD='MD' 
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID 
                               AND OTC.TERR_CD = TC.TERR_CD) MD 
    ON TVP.OFFC_CD = MD.OFFC_TERR_CD
    ORDER BY 2;
    Some history: previously, we had a table IFT_OFFC_MGR_INFO store information from each office and the details of MD, CMO, PST etc each office has a line with name, email, and id of MD, CMO, PST and COS. Since it wasn't standard if we standardized it for new extensions of office associates by creating several tables. Since we use this non standard table IFT_OFFC_MGR_INFO in various places and to minimize the impact, we have created this point of view that would return results in a similar format, as it was in this table. We found that some of the existing views with IFT_OFFC_MGR_INFO and replacing with new view that ifv_offc_mgr_info hung just this point of view. I don't know if there is no best approach to create this view so that it can return the result in a similar format as table not standardized. This table has generally only 50 odd lines. Please help me to solve this problem of production!

    Hello

    All those FULL of the EXTERNAL JOINTS are going to be slow.
    It seems that all the subqueries in the FULL OUTER JOIN are the same, except that each of them is limited to a single role_cd. In this case, it would be preferable to simply rotate your ITO the form table you want that it:

    WITH     universe     AS
    (
         SELECT
              DISTINCT OFFC_TERR_CD,
              TC.TERR_DESC,
              FMA.IONS_ID,
              OTC.OFFC_CD,
              FMA.ASSOC_NAME,
              FMA.ASSOC_EMAIL_ID,
              ROLE_CD                                   -- added
         FROM OBR.IFT_IONS_OFFC_TERR IOT,
                             OBR.IFT_OFFC_TERR_CD OTC,
                             OBR.IFT_FLD_MGMT_ASSOC FMA,
                             OBR.IFT_TERR_CD TC
         WHERE IOT.OFFC_TERR_CD = OTC.TERR_CD
                    AND ROLE_CD IN ('TVP', 'COS', 'OCC', 'OCM', 'MD')     -- All role_cds of interest
                    AND IOT.OBR_ASSOC_ID = FMA.OBR_ASSOC_ID
                    AND TC.TERR_CD = OTC.TERR_CD
    )
    SELECT       offc_terr_cd          AS offc_cd,
           MAX (CASE WHEN role_cd = 'MD'  THEN ions_id          END)       AS md_ions_id,
           MAX (CASE WHEN role_cd = 'MD'  THEN assoc_name     END)       AS md_name,
           MAX (CASE WHEN role_cd = 'MD'  THEN assoc_email_id     END)       AS md_email_id,
           MAX (CASE WHEN role_cd = 'OCM' THEN ions_id          END)       AS ocm_ions_id,
    ...
           MAX (CASE WHEN role_cd = 'COS' THEN assoc_email_id     END)       AS tvp_cos_email_id,
           MAX (terr_desc)                                         AS terr_name
    FROM       universe
    GROUP BY  offc_terr_cd
    ;
    

    That's assuming that this terr_desc is dependent on offc_terr_cd. If this isn't the case, then the expression for computing, it will be a bit more complicated. In this case, after a few sample data and the results you need from these data.

Maybe you are looking for