A question on the impact of SQL * PLUS SERVEROUTPUT Optionconcernant v$ sql

Hello everyone,
SQL> SELECT * FROM v$version;

BANNER
------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0  Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL> 


OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64
I would like to ask a question about SQL * Plus SET SERVEROUTPUT option on / off and its impact on queries on views such as v$ sql and v$ session. This is the problem

In fact I define three variables in SQL * Plus to store sidcolumns, serial # and prev_sql_id of session $ v in order to be used later, several times in various other queries, while I work always in the current session.

So, here's how
SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files

SET SQLBLANKLINES ON;

VARIABLE mysid NUMBER
VARIABLE myserial# NUMBER;
VARIABLE saved_sql_id VARCHAR2(13);


-- So first I store sid and serial# for the current session
BEGIN
    SELECT sid, serial# INTO :mysid, :myserial#
    FROM v$session
    WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
END;
/


PL/SQL procedure successfully completed.


-- Just check to see the result
SQL> SELECT :mysid, :myserial# FROM DUAL;

    :MYSID :MYSERIAL#
---------- ----------
       129   1067

SQL> 
Now let's say I want to run the following query as the last SQL statement is executed within my current session
SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;
According to the reference of database Oracle® 11 g Release 2 (11.2) description of session $ v

http://docs.Oracle.com/CD/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]

column prev_sql_id includes the sql_id of the last executed sql statement for the sid and serial data which, in the case of my example, it will be the above mentioned query SELECT on the employees table. So right after the SELECT statement on the employees table I have run the following
BEGIN
    SELECT prev_sql_id INTO :saved_sql_id
    FROM v$session 
    WHERE sid = :mysid AND serial# = :myserial#;
END;
/

PL/SQL procedure successfully completed.

SQL> SELECT :saved_sql_id FROM DUAL;

:SAVED_SQL_ID
--------------------------------
9babjv8yq8ru3

SQL> 
The value of sql_id, I'm supposed to find all the information on the sliders for my SELECT statement and also its value sql_text in v$ sql. Here is what I get when I query v$ sql on the stored sql_id
SELECT child_number, sql_id, sql_text 
FROM v$sql 
WHERE sql_id = :saved_sql_id;


CHILD_NUMBER   SQL_ID          SQL_TEXT
------------  --------------   -------------------------------
0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
So instead of
SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;
get the next value for the value of sql_text
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);
Which is of course not what I expected to find in v$ sql for the given sql_id.

After a little googling, I found the next thread on OTN forum, where it was suggested (well, I think that may not be exactly the same problem) to disable SERVEROUTPUT.

Problem with dbms_xplan.display_cursor

It was exactly what I did
SET SERVEROUTPUT OFF
After that, I repeated the procedure as a whole and this time everything worked pretty much as expected. I checked SQL * more documentation for SERVEROUTPUT
and also the page of v$ session, yet I don't find nothing indicating that SERVEROUTPUT should be operated off every time that views such as v$ sql, v $session
are queired. I don't really understand the link in what concerns the impact that can have on the other or better say rather, why is there an impact

Could someone kindly do a few details?


Thanks in advance,

Kind regards
Dariyoosh

>

and also the page of v$ session, yet I don't find nothing indicating that SERVEROUTPUT should be operated off every time that views such as v$ sql, v $session
are queired. I don't really understand the link in what concerns the impact that can have on the other or better say rather, why is there an impact

Hi Dariyoosh,
SET SERVEROUTPUT ON has the effect of dbms_output.get_lines running after each statement. Not only related to the system view.

Below is what Tom Kyte is explained in this page:

Now, sqlplus sees this feature and says "Hey, it wouldn't be nice for me to empty the buffer to the screen for the user? Thus, they added the command SQLPlus "set serveroutput we" which does two things

(1) he tells SQLPLUS you would like run dbms_output.get_lines after each statement. You would like to make this network rounded up after each call. You want that this additional load will take place (think of a script of installation with hundreds / thousands of statements to run - maybe, just maybe you don't want this extra call after each call)

(2) SQLPLUS automatically calls the API dbms_output "activate" to activate the buffering which is in the package.

Kind regards.
Al

Tags: Database

Similar Questions

  • Question on the impact of Garbage collection

    I get messages in the log as below...
    2009-09-09 14:33:21.677/691.607 Oracle coherence EE 3.5/459 < D5 > (thread = PacketPublisher, Member = 4): experienced a delay of communication ms 538 (GC distance likely) with Member (Id = 7, Timestamp is 14:24:51.312 2009-09-09, address = 10.0.0.205:8094, MachineId = 2765, location = site: server07, process: 10125, role = ServerContainer); 22 packages reprogrammed, PauseRate = 0.0010, threshold = 1976

    In the case above Member 4 is an active storage node and Member 7 is not.
    Basically, it runs a distributed cache, in a client/server operation.

    I understand that this basically means consistency server is waiting to communicate to the customer and cannot due to the garbage collection operation.

    This is perfect, we expect in this scenario, the client JVM to have breaks from garbage collection, we cross GC optimization at the moment.

    To get to the question later :) Does this mean that this node is unable to communicate to other nodes of customer for 538ms? And so the customer break GC affects consistency server node and therefore all client nodes?
    I expect the cache to always respond to requests to take, but if there is only one responsible for thread of the publication of the packages to clients (as indicated by the name of the thread) so I can't imagine it would be blocked.

    I don't see anything specific in the forums about this. I found the following
    "Although it is quite possible to see the log messages indicating that a cache server" has experienced behind communication ", these messages are generated by the TCMP layer and have no impact on the responsiveness of cache to requests for other customers service." ""
    But wasn't 100% sure that it meant no effect, or no impact on making queries.

    Thank you
    Steve

    This means that this node will be suspended during this period.

    Of course other nodes will be able to continue, but if you do something that affects this node he asks should wait (for example, the aggregation on all nodes).

    However, if you have found (for example) an object of key to another node that will be just fine.

    There are many solutions to these problems, but all can take a huge amount of time.

    (1) by using CG (parallel) differential ParNew
    (2) using the experimental (parallel) GC G1 in JDK6_14 but ready to use in JDK7. I read an article on Chicago Board of Options Exchange using it wisely.
    (3) to aid in time real Sun JVM
    (4) to aid Oracle's JRockit

    Best, Andrew.

  • Question of the ODI - java.sql.SQLException: unexpected token :) in select [...]

    Hello

    I use ODI 10.1.3.6.10 and get the error message below when a package is run. This package is used to load it please could you help me solve this problem.

    org.apache.bsf.BSFException: exception of Jython:

    Traceback (innermost last):

    "< String >" file, line 24, in there?

    java.sql.SQLException: unexpected token :) in the statement [select...]

    Also, I am getting below the exception in other packaging even though it is running without failure.

    org.apache.bsf.BSFException: exception of Jython:

    Traceback (innermost last):

    "< String >" file, line 2, in there?

    Essbase extract summary data:

    Number of rows processed successfully: 1344

    Number of lines rejected: 0

    Thank you

    Michel K

    Select * from RATES where (1 = 1) and (ACCOUNT = 'RATE')

    (PERIOD and)<=>

    And (YEAR =)

    According to the statement select in the error message above it seems that the filter for the PERIOD and YEAR settings are not correctly and this causes the SQL statement syntax error.

    How is the critria to filter for these fields is the value? that is pre-programmed, through variables etc.

  • Question about the Type of SQL equivalent Collection Oracle

    (1) I read documentation collections oracle, can I know why the 'STORE AS' clause is used only when creating the table, but not when the object creation?

    Table:

    CREATE TYPE CourseList AS TABLE OF VARCHAR2(64);
    CREATE TABLE department (
      name     VARCHAR2(20),
      director VARCHAR2(20),
      office   VARCHAR2(20),
      courses  CourseList)
      NESTED TABLE courses STORE AS courses_tab;
    

    Object:

    CREATE TYPE CourseList AS TABLE OF VARCHAR2(10)  -- define type
    CREATE TYPE Student AS OBJECT ( -- create object
       id_num  INTEGER(4),
       name    VARCHAR2(25),
       address VARCHAR2(35),
       status CHAR(2),
       courses CourseList)  -- declare nested table as attribute
    

    (2) also can I know what is the difference between OBJECT & RECORD?

    My understanding is that the OBJECT is entity sql where you create and store data in this document, while the RECORDING is PLSQL entity where you group different types of data elements in one?, hope you can give me an example to better understand.

    Thank you.

    Ariean wrote:

    (1) I read documentation collections oracle, can I know why the 'STORE AS' clause is used only when creating the table, but not when the object creation?

    Fix. The column of the course are (similar to an array) collection type. This requires a "nested table" for this column store the list of the values in this column.

    This approach however is an exception to the rule - as it flies in the face of robust and sound design mathematically, relational.

    (2) also can I know what is the difference between OBJECT & RECORD?

    A record is similar to a struct in C/C++. A record contains one or more fields/variables. It's a basic structure for the creation of a 'container of variables' and by the way this container between code units, as oppose to pass individual variables. It is also the basis for the creation of intelligent data structures in structured programming. For example an IP socket structure is a unique smart container consisting of items/variables such as socket, protocol family and type, flags address and so on.

    It is a standard feature in most (if not all) of the structured programming languages - C / C++ and Pascal, Cobol and Visual Basic. PL/SQL is based on the Ada language - and like other members of language (including Pascal), PL/SQL uses the word registration reserve to set a record structure.

    Objects are created in Oracle using the "create or replace type... as object'clause. The correct term is an object oriented class. This differs from a record as a class has data and code. Unlike a record that counts only data.

    Given in a class are called properties. The code of a class is called methods. There are different types of member methods and methods such as the static class constructors, destructive methods.

    Oracle class object is defined using SQL. (Methods) code of this class is set using PL/SQL.

    The classes also supports features like inheritance. Allowing a child class extend the implementation of the parent class. This is not supported by a record structure, beyond a structure that contains another structure as a field attribute. Classes supports the substitution in a child class, the methods of the parent class. As records are composed only of data and not code, there is nothing like ito feature for structures Records.

  • Question about the impact of a data file missing

    Oracle Version: 10 gr 2


    If a data file (not a data file belonging to the tablespace SYSTEM or any other data file associated with Oracle Internals) is lost, I can bring the database up somehow?

    Nichols wrote:
    Keita,
    What happens if I don't have a backup of the data file that is lost?

    OK understood

    If you do not have a backup of your database and that you have lost a data file, then you must re - create control file (which will contain the names of data inside files) without indicating lost data file name

    You must create the controlfile creation script and remove the line of lost data file name and create a controlfile. After that, you should be able to open your database successfully

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev a. (10g OCP)
    http://kamranagayev.WordPress.com
    [Step by step installation Oracle Linux and automate the installation by using Shell Script | http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Error message when I run delete the query in SQL Server 2008.

    Error message when I run delete the query in SQL Server 2008 SP3.

    Error message:

    MSG 0, level 11, State 0, line 0
    A serious error occurred on the current command.  The results, if any, should be discarded.

    I never got any problem since 5 years.

    Please let me know what is the cause of the problem.

    You can get a response better/faster if repost you your question in the instances of SQL Server dedicated from Microsoft here:

    http://social.technet.microsoft.com/Forums/en-us/category/sqlserver .

    Thank you.   :)

    (I'm sorry, but I can't move this thread for you because the two forums are working on separate platforms)

  • Not able to post a question on the Forum SQL

    Hello

    I'm trying to post a question on the SQL forum, tried 2 times, but it does not appear.

    I am able to see my question on my Inbox, but this issue does not appear in the SQL forum.

    This is the link to my thread: transpose columns in lines

    Please help me,

    Kind regards

    Jitendra

    Indeed, it is a loophole.

    If you go to SQL and then click on the 'Content' link, you will see that need you the space of PL/SQL and if you post a discussion there, it will appear in the list of threads space the SQL and PL/SQL.

    ---

    Ping moniquevdb-Oracle and Oracle-hocinebelatreche to ask that they please untangle this loophole (or someone who can ping).  I can confirm that, following steps of Jitendra, people are still able to create threads in the old list of SQL thread when they should go to list of PL/SQL threads.

    Essentially, this means that the messages of the people will be lost to most of the community.

    I don't always put the purpose of actually having a separate SQL space, as it doesn't really seem to offer much to the what it was associated with the PL/SQL space.

  • question on the sql statement

    Hi expert,

    I have after sql statement, the function 'hiroc_get_delta_amount1' and 'hiroc_get_delta_amount2' are used separately in select and where subparagraph. These two functions are exactly the same, except that there is a log insert inside statement. for the 'hiroc_get_delta_amount1' function, newspapers are supposed to write the newspaper of table1, while for the function "hiroc_get_delta_amount2", newspapers are supposed to write the newspaper of table2. After you run this sql, I got the data loaded in the table2 newspaper, however, no data is loaded into newspaper table1.

    could you please tell me why there is no data in table2 journal for function

    1. sql statement;

    Select
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    hiroc_rpt_user.hiroc_get_delta_amount1 (pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
    pp.rate_period_from_date
    PRODBKUPDW_MART.rmv_policy_premium pp
    where pp.rate_period_type_code = 'TERM_COVG. '
    and pp.coverage_component_code <>'NETPREM '.
    and hiroc_rpt_user.hiroc_get_delta_amount2 (pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code). = 0
    Pp.policy_premium_pk group,
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    pp.rate_period_from_date;

    2. Insert the statement used for two functions of journal:

    (1) function "hiroc_get_delta_amount1".

    insert into HIROC_RPT_USER. Values of LOG_TEST1 (v_start, sysdate,
    p_policy_fk, p_policy_term_history_fk, p_risk_fk, p_coverage_fk, p_transaction_log_fk, p_comp_code);
    COMMIT;


    (2) function "HIROC_GET_DELTA_AMOUNT_1".

    insert into HIROC_RPT_USER. Values of LOG_ZB_TEST_1 (v_start, sysdate,
    p_policy_fk, p_policy_term_history_fk, p_risk_fk, p_coverage_fk, p_transaction_log_fk, p_comp_code);
    COMMIT;

    WRONG FORUM!

    Welcome to the forum!

    Unfortunately, you have posted on the SQL Developer forum which, as the title of the forum is NOT for questions of SQL and PL/SQL.

    Please mark this thread ANSWERED and transfer your question in the forum SQL and PL/SQL
    SQL and PL/SQL

    When repost you your question, you must provide the DDL for the two functions, not only a query in them. And unless these functions use the pragma AUTONOMOUS_TRANSACTION and VALIDATION and then inserts into a table 'log' what they do will be not permanent anyway.

    You will also need to provide the number of rows that the SELECT query returns since if no line is activated, the first function cannot even be called.

    Where this question: why are you recording of information in the context of a still SELECT query? What goal are you trying to achieve this returns the loss of performance you pay?

  • A question about the number of error indicated by SQL line * more

    Hello everyone,

    OS: Fedora Core 17 x86_64
    Oracle version: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    I have a question for the line number specified by SQL * more whenever he is in error (syntax error, for example) in your script file. Consider the following script file (myscript.sql) which includes exactly 12 lines. Before the instruction to START I just put 4 blank lines by using - just to make the code clearer to read.
    HOST clear;
    SET SERVEROUTPUT ON;
    SET PAGESIZE 0;
    SET LINESIZE 1000;
    --
    --
    --
    --
    BEGIN
      DBMS_OUTPUT.PUTLINE('Hello');
    END;
    /
    DBMS_OUTPUT. PUTLINE at line 10 is obviously a mistake and it should be DBMS_OUTPUT. Put_line. However, if you run the script here is the output:
    SQL> @myscript.sql;
    
      DBMS_OUTPUT.PUTLINE('Hello');
                  *
    ERROR at line 2:
    ORA-06550: line 2, column 15:
    PLS-00302: component 'PUTLINE' must be declared
    ORA-06550: line 2, column 3:
    PL/SQL: Statement ignored
    
    
    SQL>
    for SQL * the error is in the line 2 and not 10.

    Any idea?

    Thanks in advance,

    >
    for SQL * the error is in the line 2 and not 10.
    >
    No - for Oracle, the error is in the line 2 and not 10.

    This is the code that sees the parser. What is the 2 line?

    BEGIN
      DBMS_OUTPUT.PUTLINE('Hello');
    END
    
  • Out of the queue of SQL * Plus for Excel

    I'm out of the queue of SQL * Plus for Excel. The code I use is down. I want that all white space to carve when I open the updated file waiting in Excel. How can I ensure this?

    I was reading on the SET TRIM command, but it says that it does not affect the output queued. (http://ss64.com/ora/syntax-sqlplus-set.html)

    Is there a way to NOT display whitespace at the beginning and the end of a column in SQL * more? In other words, if I shoot a single column of a record, and a data element is only 3 characters in length, I want to be also 3 characters instead of extending over 40 characters across the width of the column.


    The column for your troubleshooting information
    IDNUMBER is NUMBER (12)
    FIRST is VARCHAR2 (40)
    The LAST is VARCHAR2 (60)


    Code
    SET LINESIZE 100
    SET PAGESIZE 0
    SET MARKUP HTML PREFORMAT ON
    set colsep,
    coil c:\prospects.csv
    Select '' perspective ID"', '" First"',""finally" "from dual;
    Select to_char (p.idnumber), p.first, prospect_view p.last p where idnumber = 164515;
    spool off

    DataHandle wrote:
    I'm out of the queue of SQL * Plus for Excel. The code I use is down. I want that all white space to carve when I open the updated file waiting in Excel. How can I ensure this?

    I was reading on the SET TRIM command, but it says that it does not affect the output queued. (http://ss64.com/ora/syntax-sqlplus-set.html)

    TRIM affects the expressions in your SELECT clause. It has nothing to do with the padding of SQL * Plus adds to align the columns upwards.

    Is there a way to NOT display whitespace at the beginning and the end of a column in SQL * more? In other words, if I shoot a single column of a record, and a data element is only 3 characters in length, I want to be also 3 characters instead of extending over 40 characters across the width of the column.

    Here's a way to make the main request:

    SELECT        TO_CHAR (idnumber)
    || ',' ||  first
    || ',' ||  last
    FROM           prospect_view
    WHERE        idnumber     = 164515
    ;
    

    This will include spaces only if they occur in first or last. Depending on your data and your requriements, you may need to use the FILLING (first) instead of the first, and/or TRIM (finally) instead of the last.

    Using this technique, it does not matter what is COLSEP: the query produces a single column.

    Use the SQL * more order

    SET  TRIMSPOOL ON
    

    to keep SQL * more add space after this single column.

  • Basic questions about the PL/SQL web services and data source names

    Hello

    I've successfully generated a web service for a procedure from PL/SQL packaged JDeveloper 11.1.1.3.0).

    The following code was generated in the base class for web services:
     __dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/dbconnectionDS");
    However in the weblogic server, the data source name is jdbc/Gisele for deployment fails in a first time.

    What is the recommended procedure to solve this problem? The obvious solution is to manually change the source - that's what I did and it worked fine. However if I re - generate the web service I won't lose my change. Is there a better way to do it?

    Another question - in the web.xml file that is generated, there is a resource-ref to the data source. I was hoping that change the data source name it would help, but it didn't work. What is - it used to in this context?

    Thank you
    Luis

    I forgot to add, so in case some time later and you want to update the connection to your service details, all you have to do is to add the following entry in your weblogic.xml:
    .

    JDBC/ref_name_from_web. XML
    JDBC/new_jndi_name

    .
    And in this way, you will not have to change any code level to point your web service to another connection.

    Vishal-

  • Tables created in a stored procedure cannot be used with dynamic SQL? The impact?

    There is a thread on the forum which explains how to create tables within a stored procedure (How to create a table in a stored procedure , however, it does create a table as such, but not how to use it (insert, select, update, etc.) the table in the stored procedure.) Looking around and in the light of the tests, it seems that you need to use dynamic SQL statements to execute ddl in a stored procedure in Oracle DB. In addition, it also seems that you cannot use dynamic SQL statements for reuse (insert, select, update, etc.) the table that was created in the stored procedure? Is this really the case?

    If this is the case, I am afraid that if tables cannot be 'created and used"in a stored procedure using the dynamic SQL, as is the case with most of the servers of DB dynamic SQL is not a part of the implementation plan and, therefore, is quite expensive (slow). This is the case with Oracle, and if yes what is the performance impact? (Apparently, with Informix, yield loss is about 3 - 4 times, MS SQL - 4 - 5 times and so on).

    In summary, tables created within a stored procedure cannot be 'used' with dynamic SQL, and if so, what is the impact of performance as such?

    Thank you and best regards,
    Amedeo.

    Published by: AGF on March 17, 2009 10:51

    AGF says:
    Hi, Frank.

    Thank you for your response. I understand that the dynamic SQL is required in this context.

    Unfortunately, I am yet to discover "that seeks to" using temporary tables inside stored procedures. I'm helping a migration from MySQL to Oracle DB, and this was one of the dilemmas encountered. I'll post what is the attempt, when more.

    In Oracle, we use [global temporary Tables | http://www.psoug.org/reference/OLD/gtt.html?PHPSESSID=67b3adaeaf970906c5e037b23ed380c2] aka TWG these tables need only be created once everything like a normal table, but they act differently when they are used. The data inserted in TWG will be visible at the session that inserted data, allowing you to use the table for their own temporary needs while not collide with them of all sessions. The data of the TWG will be automatically deleted (if not deleted programmatically) when a) a commit is issued or b) the session ends according to the parameter that is used during the creation of the TWG. There is no real need in Oracle to create tables dynamically in code.

    I noticed that many people say that the "Creation of the tables within a stored procedure" is not a good idea, but nobody seems necessarily explain why? Think you could elaborate a little bit? Would be appreciated.

    The main reason is that when you come to compile PL/SQL code on the database, all explicit references to tables in the code must correspond to an existing table, otherwise a djab error will occur. This is necessary so that Oracle can validate the columns that are referenced, the data types of those columns etc.. These compilation controls are an important element to ensure that the compiled code is as error free as possible (there is no accounting for the logic of programmers though ;)).

    If you start to create tables dynamically in your PL/SQL code, so any time you want to reference this table you must ensure that you write your SQL queries dynamically too. Once you start doing this, then Oracle will not be able to validate your SQL syntax, check the types of data or SQL logic. This makes your code more difficult to write and harder to debug, because inevitably it contains errors. It also means that for example if you want to write a simple query to get that one out in a variable value (which would take a single line of SQL with static tables), you end up writing a dynamic slider all for her. Very heavy and very messy. You also get the situation in which, if you create tables dynamically in the code, you are also likely to drop tables dynamically in code. If it is a fixed table name, then in an environment multi-user, you get in a mess well when different user sessions are trying to determine if the table exists already or is the last one to use so they can drop etc. What headache! If you create tables with table names, then variable Dynamics not only make you a lot end up creating (and falling) of objects on the database, which can cause an overload on the update of the data dictionary, but how can ensure you that you clean the tables, if your code has an exception any. Indeed, you'll find yourself with redundant tables lying around on your database, may contain sensitive data that should be removed.

    With the TWG, you have none of these issues.

    Also, what is the impact on the performance of the dynamic SQL statements in Oracle? I read some contrasting opinions, some indicating that it is not a lot of difference between static SQL and SQL dynamic in more recent versions of Oracle DB (Re: why dynamic sql is slower than static sql is this true?)

    When the query runs on the database, there will be no difference in performance because it is just a request for enforcement in the SQL engine. Performance problems may occur if your dynamic query is not binding variable in the query correctly (because this would cause difficult analysis of the query rather than sweet), and also the extra time, to dynamically write the query running.

    Another risk of dynamic query is SQL injection which may result in a security risk on the database.

    Good programming will have little need for the tables of dynamically created dynamically or SQL.

  • vRA 7 - questions about the SQL installer

    So we are trying on a new installation of vRA 7 in the lab environment.  I installed a new SQL Server and installed SQL 2014 with all faults (standard).

    During the installation process of vRA, however when I get to the validation of SQL I get this error:

      • Lab - vra - iaas.ad.he - biotechnical (SQL Server: lab-sql01)
    • Another instance of the component is already installed on this server.

    I don't understand what this is saying.  I was not supposed to install SQL?

    Just do an audit of the Programs window in Control Panel. This message indicates that you tried a facility previously and there are a few artifacts on area lab - vra - iaas.ad.he - biotech


    Grant

  • How to make the output of Sql Plus with an error Code

    Dear members,

    How can I define sql more exit with an error code.

    We have a simultaneous host program. The executable is a shell script for this program. This sql script Shell script request which in turn gives call to a custom database package that I built.

    The flow rate is:


    -> SQL-> CUSTOM PACKAGE SCRIPT SHELL SCRIPT

    Custom package has two PARAMETERS of the error indicator and the error message. If something fails in the package these two PARAMETERS is returned with a value.

    So my sql script code looks like this:

    WHENEVER SQLERROR EXIT 251
    WHEN the OSERROR EXIT 251
    Set serveroutput size 1000000
    set linesize 32767
    set verify off
    set the position
    Set feedback off

    DECLARE
    x_error_message VARCHAR2 (1000);
    x_sql_message VARCHAR2 (1000);
    x_exception EXCEPTION;
    e_value NUMBER;

    BEGIN
    dbms_output.put_line ('Inside sql file');


    XXpackage.xxproc (x_error_message, x_sql_message);


    IF (x_error_message IS NOT NULL) AND (x_sql_message IS NOT NULL) THEN
    RAISE x_exception;
    END IF;


    EXCEPTION
    WHEN X_EXCEPTION THEN
    e_value: = 1;
    DBMS_OUTPUT. Put_line (' Exit Code: ' | e_value);
    DBMS_OUTPUT. Put_line ('X_EXCEPTION: EXCEPTION IN SCRIPT xpoext04a.sql :'||) SQLERRM);
    DBMS_OUTPUT. Put_line ('x_error_message is: ' | x_error_message);
    DBMS_OUTPUT. Put_line ('x_sql_message is: ' | x_sql_message);
    DBMS_OUTPUT. PUT_LINE (' ERROR IS: ' |) SQLERRM);
    WHILE OTHERS THEN
    e_value: = 252;
    DBMS_OUTPUT. Put_line (' Exit Code: ' | e_value);
    DBMS_OUTPUT. Put_line (' OTHER: EXCEPTION IN SCRIPT xpoext04a.sql :'||) SQLERRM);
    DBMS_OUTPUT. Put_line ('x_error_message is: ' | x_error_message);
    DBMS_OUTPUT. Put_line ('x_sql_message is: ' | x_sql_message);
    DBMS_OUTPUT. PUT_LINE (' ERROR IS: ' |) SQLERRM);


    END;
    */*
    output
    */*


    As you can see from above, if the two PARAMETERS have value, then it goes to an exception.

    My problem is that if it goes with the exception of X_EXCEPTION, the sql is not come away with a mistake. I mean sql is not treat this case like a sqlerror.


    How can do us more sql dating a sqlerror so that the host program must fail.


    Thank you
    Sandeep

    Published by: user340 on July 28, 2009 12:51

    Published by: user340 on July 28, 2009 12:57

    the plu sql is not come away with a mistake. I mean sql is not treat this case like a sqlerror.

    This is because there is no error. You handled the exception.

    You can try adding a STIMULUS; at the end of your exception section. This re-triggers the exception so sql liked to see it.

  • Question about the error when you run DBUA

    Good afternoon

    I try to run the Database Upgrade Assistant. At the beginning of this process, I get a window with the following error message:
    Initialization parameter log_archive_format must contain
    %s, %t and %r.  Your current setting is "ARC%S_%R.%T".
    Update this parameter prior to upgrading the database.
    SQL * Plus, I get the following:
    SQL> show parameter log_archive_format;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    log_archive_format                   string      ARC%S_%R.%T
    SQL>
    It seems to me that the log_archive_format has the required format.

    The Question is: My format is wrong? If so, what is the problem with him? If this is correct, what should I do to get past this error?

    Thank you very much for your help,

    John.

    Hello
    You have 3 format settings, but our opinion is not important, because it appears THAT DBUA consider as wrong format! I have never tried to put %t after the '. ' in fact. Maybe you can try with 'ARC_%s_%r_%t.arc '?
    Best regards
    Phil

Maybe you are looking for

  • speakers are weak

    Hello I have a macbook pro (17-inch, mid 2010) 2.66 GHz Intel Core i7 and I'm under Beta Sierra 10.12.1. Recently I noticed that my speakers are extremely low.  With headphones it's correct, but without, I need the room to be completely silent - not

  • How do force you the iOS keyboard to show

    How do you force the iOS keyboard to show. One of the applications I have installed doesn't have a keyboard, but it can use a. (Try to get a keyboard on the Moonlight app.

  • One of my accounts will not send, giving a R0107004 error.

    For a few days, when I hit 'Send' lacks sometimes, but worked to try again. Today, it has suddenly stopped working. It gives the following message: "an error has occurred when sending mail. The mail server responded: the address must match the authen

  • HP XW6400 problem loading Vista Business

    Hey all,. I just took a XW6400 on Ebay and the auction has just declared that he only started the bios configuration screen.  I literally have no idea of the State of functioning of the parts below.  Here are the following specifications: 4 GB RAM (h

  • my mother locked herself out of her computer, forgotten password

    original title: password reset my mother locked herself out of her computer and can only connect using a JJUJ screen. She wants to unlock the computer by using a password, but she forgot her a last. y at - it another way to reset a password