SQL with parameter in SQL more value

Hi the master Oracle,


I have a request as described below that you run on SQL more.


Select object_name, object_type from USER_OBJECTS WHERE last_ddl_time between trunc (sysdate)-1 and sysdate;


I tried this script to be set, when I run it then SQL should ask two values.
If I do not give any value then script should use by default as SYSDATE.

Someone could please let me know how to do this?



Kind regards
Sandeep Sutar
select object_name
      ,object_type
  from user_objects
where trunc(last_ddl_time) between trunc(to_date(nvl(&1,sysdate))) -1 and to_date(nvl(&2,sysdate))

Tags: Database

Similar Questions

  • Problem with the new line when you manually run a procedure in SQL * more

    The procedure below works fine in SQL * more when all EXEC < procedure_name > (parameter1, parameter 2,...); is placed on a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    
    PL/SQL procedure successfully completed.
    I wanted to perform the same procedure with readability. So, I put each parameter on a separate line and try to run. But it's the slightest mistake out.
    SQL > exec cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    *
    ERROR at line 2:
    ORA-00928: missing SELECT keyword
    No work around for this?

    Tom wrote:

    No work around for this?

    BEGIN
    cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );
    END;
    /
    

    SY.

  • ORA-12705: invalid parameter or unknown NLS value specified error in PL/SQL

    Everything works well, SQL * PLUS, shape and reports, but my PL/SQL Developer has stopped working.
    It is throwing this error when I try to connect.

    ORA-12705: invalid parameter or unknown NLS value specified error in PL/SQL developer


    How to fix this help please.

    First: most of the questions for Oracle products have a response depending on the version. In Oracle 11 g or 10g Oracle change the structure of their branch in the registry for example.

    Secondly, it seems that the registry is a little messy.
    Oracle for Windows identifies the part of the registry to use by reading the file
    % ORACLE_HOME%\bin\oracle. Key

    Probably with PL/SQL Developer, like PL/SQL Developer needs an Oracle customer, she will too.
    Of course, if this key points to a branch with NLS_LANG value NA this will result in questions, because this is not a valid value.
    %ORACLE_HOME%\Bin will usually be in your path

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • Detection of parameter NLS_LANG clientside in SQL * more script

    Our company has developed an application that uses an Oracle database as backend. Companies can purchase our application and run it against their own installation of Oracle.

    A new version of our application often requires an update to the Oracle database schema.
    As well as from new application files, we send our customers an update.sql script, they must run to their database using SQL * more.
    This update script can contain international characters such as é for example:
    UPDATE SHOPS SET DESCRIPTION = 'Café'
    WHERE SHOP_ID=1
    Save us the SQL script file in the windows-1252 encoding the character e is encoded by 0xE9 in the script file.

    When the ADMINISTRATOR runs him upgrade script is set NLS_LANG =. WE8MSWIN1252 it works perfectly.
    When the ADMINISTRATOR has set the NLS_LANG = US7ASCII the e is replaced by an exclamation mark the upside. Other NLS_LANG settings can also be embarrassing.

    To avoid this, we give very clear instructions. However, nobody reads. This raises two questions:

    (A) is there a way to prevent this problem, so I do not the parameter NLS_LANG by the DBA to run the upgrade script depend on?
    (B) otherwise: is there a way to test the NLS_LANG setting in the script and give up if it's not WE8MSWIN1252?

    Info:
    Database is 10.2.0.3/10.2.0.4 and sometimes 10.2.0.5, always the database character set WE8MSWIN1252.
    Client software: I don't know what are the uses each s/n, but it will be mainly the software client 10g
    Client OS: Some DBA will run the script from Windows, others of some varieties of Unix. I can't control that.

    (A) is there a way to prevent this problem, so I do not the parameter NLS_LANG by the DBA to run the upgrade script depend on?

    Yes. Use the UNISTR function to encode strings with Unicode, for example UNSITR('\00e9') exhausts to code 'e '. The set conversion implicit character in the set to the national character of database character set will do. You can use the ASCIISTR function to simplify the creation of arguments to UNISTR based on the input text.

    -Sergiusz

  • Connection with SQL * more is not possible

    Hello together,

    I have a problem with my database and SQL Plus.

    I can't connect to my DB via SQL Plus, I get the error message: > > ORA_12546: TNS: detonation verweigert (Permission denied) < <.

    I tried it with several users. When I try to log in to enterprise manager or connecting to the DB through SQL Developer works very well with the user > > sys < <, only the SQL more connection does not work.

    It works until yesterday that there are some problems with the DB and the processor and RAM were almost 100% occupied each.


    We use the Version 11 g Enterprise Edition Release 11.2.0.1.0 64 bit Production on a Windows Server 2008 R2 Enterprise Server.

    I am running SQL Plus, Enterprise Manager and SQL Developer directly on the DB server.

    When I start SQL Plus he asks me my username > > enter user name: < < and after that my password: > > password: < <.

    A connection as seen in many forums or document on the internet like > > scott/tiger@ORCL < < never worked on my system, which is also confused me.


    We have no listener.ora file in the folder: ORACLE_HOME/NETWORK/ADMIN only a sqlnet.ora with line > > SQLNET. AUTHENTICATION_SERVICES = (NTS) < < in it.



    Status of the listener:

    ---------------------------------------------------------------------------------------------------------------------------------------------------------

    C:\Windows\System32 > lsnrctl status

    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 18 February 2014 12:14:32

    Copyright (c) 1991, 2010, Oracle.  All rights reserved.

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    TNSLSNR for Windows 64-bit version: Version 11.2.0.1.0 - Production

    Start date February 18, 2014 10:15:54

    Uptime 0 days 1 hour 58 minutes 42 seconds

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    O:\app\administrator\diag\tnslsnr\QualisysDbNbg\listener\alert\log.XML log listener

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=QualisysDbNbg) (PORT = 1521)))

    Summary of services...

    Service "orcl" has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    The command completed successfully

    C:\Windows\System32 >

    ---------------------------------------------------------------------------------------------------------------------------------------------------------


    I hope someone can help me with this problem.


    Thank you you very much in forward for your answerand greetings

    Matthias


    The sys user must connect as sysdba

    have you tried

    sqlplus 'sys@ORCL as sysdba'

    or

    sqlplus 'sys/yoursyspwd@ORCL as sysdba'

    the first command should work without password for all users group ORA_DBA.

    Scott, the user cannot also exists in your database.

  • Connection to the 11g on Oracle_Developer_Days.ova with sql + more

    I downloaded the Oracle_Developer_Days.ova and have confirmed with connectivity

    C:\Users\robm > ping ServeurOracle

    ServeurOracle ping [192.168.11.18] with 32 bytes of data:

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Ping statistics for 192.168.11.18:

    Packets: Sent = 4, received = 4, lost = 0 (0% loss),

    Time approximate round trip in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, average = 0ms

    C:\Users\robm >

    I have advanced and installed the client instant and also installed the sql + more

    C:\Users\robm > sqlplus scott/tiger@orcl

    SQL * more: Production of the 12.1.0.1.0 on sat Nov 30 00:27:44 version 2013

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    ERROR:

    ORA-12514: TNS:listener is not currently of service requested in connect

    descriptor of

    Enter the user name:

    Here the tnsnames.ora can, I did you see errors?

    XRACQ_MYSERVICE_TAF =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oracleserver) (PORT = 1521))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = orcl)

    (FAILOVER_MODE =

    (TYPE = SELECT)

    (METHOD = BASIC)

    (RETRIES = 180)

    (DELAY = 5)

    )

    )

    )

    any ideas on how to make it work?

    I now get

    ORA-01017: name of user and password invalid. connection refused

    using tsnames.ora

    WEIRD =.

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADRESSE = (PROTOCOL = TCP) (HOST = 192.168.11.18)(PORT = 1521)))

    (CONNECT_DATA =

    (SERVICE_NAME = orcl)

    )

    )

    so I seem to connect now... . How can scott Tiger be wrong isn't the default?

  • Connect to the database with SQL * more: is TNSNAMES. ORA used?

    Hello

    We have a local database called DEV01 and a copy of this database in a data center. To be able to connect to both databases, the TNSNAMES file. ORA

    on the local database server (not the one in the data center) has the following entries:

    / * Entry for the local database * /.

    DEV01_local, DEV01_local. WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server01) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SID = DEV01)
    )
    )

    / * Entry for the database in the data center * /.

    DEV01, DEV01. WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server02) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SID = DEV01)
    )
    )

    When I connect to the local database server, I set the Oracle environment as follows:

    export ORACLE_SID = DEV01

    export PATH=/opt/oracle/app/oracle/product/9.2.0/bin:$PATH

    export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2.0

    Now I start SQL * more as follows:

    Oracle # > sqlplus user/user

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

    ---------------- ----------------------------------------------------------------

    SERVER01 DEV01

    As the SID is on two databases of the same (DEV01) I really don't understand how Oracle decides which of the SQL databases * more connects to.

    Is it the entry in the TNSNAMES file. ORA?

    But when I start SQL * more as follows:

    Oracle # > sqlplus user/user@DEV01_local

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

    ---------------- ----------------------------------------------------------------

    SERVER01 DEV01

    or

    Oracle # > sqlplus user/user@DEV01

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

    ---------------- ----------------------------------------------------------------

    DEV01 server02

    everything is as expected.

    Does anyone know who is the chosen database when just to connect with 'sqlplus user/user' (without the @DEV01 or @DEV01_local)?

    Any help will be appreciated!

    Rgds

    Jan

    When you connect to the local database that is connected to the server01, you need only specify the sid in the environment, in this case, Oracle tnsnames file to connect, actually uses, it uses any of the listener.  It uses what is called a connection needed.  It is purely a side connection server, and as long as the sid is located in the environment resolves to a database running on that server, you will be get connected.

    When you connect using the @connect_descriptor, like you second case, then Oracle will use the configured naming, including tnsnames, methods to solve the 'real' database  In this case, the auditor is required to create the connection to the database.

    John

  • Question on the definition of the width of column in SQL * more with information recovered w SQL

    Hello

    Is there a way to tell SQL * more to set the width of a column with the largest width of the items in the column? (as opposed to the default which is declared in the DDL width)

    In other words, I would like to do something functionally equivalent to this:

    COL < columname > format [select max (length (< columnname >)) < thetablethatcontainscolumname >]

    I do above manually in two steps

    1. select max (length (columnname)) of...

    2 col columnname format a [resultofstep1]

    Is it possible to do in one step?

    Thank you for your help,

    John.

    Hi John

    I don't think that there is a way to do this, because this information is not known at run time (as you proved it, you must run a separate SQL query first to calculate that information - also, what happens if there are predicates, this could affect the defined result so the request will actually be performed twice). You may decide an arbitrary width for each column and set it as being wrapped/word_wrapped/truncated.

    Other that that, you should consider whther you are using the right tool for the job, SQLplus is not exactly ideal for the presentation layer stuff. Something like APEX would give you much more control over the layout and formatting.

    See you soon

    Ben

  • Compilation with SQL * more

    Hello world

    I am sure it is a simple and can someone help me:

    In other projects, I've always used TOAD or similar tools to compile my PL/SQL code, but with this project I have only SQL * more then when I run 'CREATE PROCEDURE '.... "I just get the message ' Warning: function created with compilation errors.

    I'm sure that compiling information are written in a table somewhere or maybe can be displayed directly in the SQL * more window (maybe there an option or the indicator "Compile"?) and so I hope someone can point me to a good HOWTO or give me one or two keywords that I can google under?

    Thank you very much
    Alan Searle

    Use

    display errors

    or user_errors

    SQL> create or replace procedure p1 is
      2  begin
      3   null
      4  end;
      5  /
    
    Warning: Procedure created with compilation errors.
    
    SQL> show errors
    Errors for PROCEDURE P1:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    4/1      PLS-00103: Encountered the symbol "END" when expecting one of the
             following:
             ;
             The symbol ";" was substituted for "END" to continue.
    
    SQL> select text from user_errors
      2  where name = 'P1';
    
    TEXT
    --------------------------------------------------------------------------------
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    
       ;
    The symbol ";" was substituted for "END" to continue.
    
  • SQL * more report: hide accept the value in the report

    Hi all

    I created a SQL for APEX-Application report. The output is stored in an HTML file.

    Everything works great but think I want to hide in the HTML report.

    I try to describe what is the problem.

    I invite the user to put in the demand of the apex application_id:

    accept v_application_Id char prompt ' ID application:'

    In the HTML file, you receive the following output:

    Report tabled the:
    June 25, 2013, 10:06:04

    ALT 8: where application_id = & & v_application_id
    Neu 8: where application_id = 680

    Workspace
    Workspace APPLICATION_ID Application_name ALIAS OWNER
    Q0Q0AUFTRAGSVERWALTUNG680Q0Q0AUFTRAGSVERWALTUNGF680317Q0Q0AUFTRAGSVERWALTUNG_ADMIN

    How to hide the two lines

    ALT 8: where application_id = & & v_application_id

    Neu 8: where application_id = 680

    According to the report?

    I searched this forum and toke a glance in the documentation, but I found nothing.

    Could someone help me please?

    Oracle 11g R2

    This is the SQL script I run in SQL * more.


    -launch script

    accept v_application_Id char prompt ' ID application:'

    coil C:\a\APEX.html


    termout off Set
    SET of HTML MARKUP WE REEL WE HEAD ' < TITLE > SQL * more APEX report < /title >--
    "< STYLE TYPE =" TEXT/CSS"> <!-BODY {bgcolor: background ffffaa: ffffc6}-> < / STYLE >.
    Clear jump
    clear the buffer
    Claire calculate
    clear the column
    Disable the sql
    Set feedback off
    Set serveroutput on


    --
    -Report header
    --
    TTITLE left ' ' jump 1
    Select TO_CHAR (sysdate, 'dd-Mon-yyyy, hh24:mm:ss') ' report created on:
    Double;


    --
    -Workspace
    --
    TTITLE left col 15 ' < police = "Arial" size = "+ 2" color = "#0000FF" > workspace < / police > ' jump 1

    set linesize 300
    set pagesize 500
    Set serveroutput on


    column format a35 workspace
    application_id 99999999 column format
    column format a35 application_name
    column alias format a35
    column owner format a35

    Select

    WORKSPACE,
    APPLICATION_ID,
    APPLICATION NAME,
    ALIAS,
    OWNER
    of apex_applications
    where application_id = & & v_application_id;

    off Ttitle

    Select
    APPLICATION_GROUP,
    APPLICATION_GROUP_ID,
    HOME_LINK,
    PAGE_TEMPLATE,
    ERROR_PAGE_TEMPLATE
    of apex_applications
    where application_id = & & v_application_id;


    Set termout on
    moved the markup html off the coast of the "body" entmap wide head reel off pre
    Set of feedback on
    set linesize 80
    set pagesize 50
    off Ttitle
    Set termout on
    Set serveroutput off
    spool off
    set echo on

    -End Script


    Best regards

    Ben

    Oracle 11g R2

    Hi, Ben.

    The SQL * Plus command to stop these messages is

    SET VERIFY OFF

    Put this command anywhere before the first use of a substitution variable, for example before the order of the COIL.

    These 'OLD' and 'NEW' messages will remain deleted until you finish the SQL * most the session or cause a SET VERIFY ON command.

    If you use SQL * more often, then, when you have a few minutes, look for the SET command in SQL * more manual,.

    System of SETTING Variable summary

    and read a little about each option.  You probably don't remember everything, but you'll probably remember what kind of things can be controlled by the SET command and get a better idea of where to start to look in the future when you have a different problem.

  • Unable to connect to an instance by using EM but properly connect with SQL * more

    Hello

    I followed the following steps (from the document s/n 2 days):

    1. I created a model (including the database) to an instance named "orcl" using DBCA, before we proceed to create the model, DBCA informed me that the Forum might be stopped, I told him to go ahead.

    2. the model has been successfully created.

    3. I am now unable to connect to the instance orcl using EM, but I can connect to this instance without any problem using SQL * more.

    Question: Why am I not able to connect to the instance by using EM? and what should I do to fix this?

    Thank you very much for your help,

    John.

    PS: in case it may be useful, the listener tnsnames and Sqlnet files follow:
    # listener.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = E:\Oracle\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:E:\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = E:\Oracle
    # tnsnames.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    DBCA =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = dbca.localsite.com)
        )
      )
    
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
        )
      )
    
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
    
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE2DAY1)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.localsite.com)
        )
      )
    # sqlnet.ora Network Configuration File: E:\Oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    
    # This file is actually generated by netca. But if customers choose to 
    # install "Software Only", this file wont exist and without the native 
    # authentication, they will not be able to connect to the database on NT.
    
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    I think you change some configuration of your system as domain/IP address/host name.
    You need

    set ORACLE_SID=orcl
    emca -deconfig dbcontrol db -repos drop
    emca -config dbcontrol db -repos create
    

    then after result

  • SQL * more: how to avoid asking them &amp; 1?

    I use a parameter within a SQL Script more to set a value for the creation of different environments.
    DEFINE _env = '&1'
    The parameter & 1 is used. However, a NULL value is allowed. But if this parameter is not defined, sql * more guests to enter something for & 1. How can we avoid this?

    SQL use
    sqlplus user/password@database @test_parameter.sql
    
    SQL> exit
    
    Verbunden mit:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    
    "Geben Sie einen Wert f³r 1 ein:"
    
    SQL> prompt Env&_env.
    Env
    SQL>
    I'm looking for an easy way avoid the message < font color = "red" > "enter a value for 1:" < / police > if no parameter is added.
    If a parameter is added, this message does not appear.
    sqlplus user/password@database @test_parameter.sql _TST
    example script
    -- set environment 
    ------------------
    -- Allowed values are 
    -- "_DEV" = Development 
    -- "_TST" = Test
    -- "" = Production)
    set verify off
    
    DEFINE _env = '&1'
    
    begin 
      if '&_env' is null 
        or regexp_like ('&_env', '_[[:alnum:]]{3}') then 
         null; --ok
      else
        raise_application_error(-20000,'Parameter 1 (''&_env'') has wrong value. Must start with _ and only 3 letters or be empty.' );
      end if;
    end;
    /
    
    set echo on
    
    prompt env&_env.
    Published by: Sven w. March 15, 2012 16:40

    When you want to call it "parameterless" give a string empty (two single quotes) like this:

    sqlplus user/password@database @test_parameter.sql ''
    
  • SQL * MORE using command START - please help me understand

    Hello dear friends,

    I encountered a problem that I don't understand. Could you please explain to me what wrong with my logic.

    I created the file called DUMMY.sql sql
    the file context is:

    SELECT a model
    OF dummy_tbl
    WHERE dummy_col = & dummy_var;

    I'm going to SQL * Plus DB version (10.2.0.4.0).

    I command promt: MODEL of STARTING 1
    and waits * & dummy_var * must be replaced by * 1 * and query executed as described in Oracle SQL * MORE reference ([http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058 | http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058]).

    But instead, I'm getting enter the value for dummy_var:

    Please help me understand

    Thanks in advance.

    You must use 1 & instead of & dummy_var.

    The number refers to the position of the parameter to use; 1 is the first parameter & 2 would be a second parameter and so on.

    SELECT dummy
    FROM dummy_tbl
    WHERE dummy_col=&1;
    
  • SP2-0642: SQL * more internal error of State 2165

    Hello

    I was faced with the question with sqlplus suddenly in 11.2.0.3 throw version on solaris 10 OS, it was working fine until today. No changes made on this (11.2.0.3.Q3) oracle home, but new ORACLE HOME installed by Server DBA (shared server) with the Q4 patch.

    -bash-3, $2 sqlplus / as sysdba

    SP2-0642: SQL * more internal error state 2165, context 4294967295:0:0

    Impossible to continue

    As explained in metalink note: 396154.1, I set NLS_DATE_FORMAT, but it doesn't seem to work

    also, I've checked the timezone as explained in the blog file, but the file timezone.dat does not exist in 11.2.0.3 version and all the files in $ORACLE_HOME/oracore/zoneinfo/have permissions of reading to the dba group

    http://arjudba.blogspot.com/2010/07/non-Oracle-user-hits-SP2-0642-or-SP2.html

    -bash - $3.2 ls - ltr

    30942 total

    -rw - r - r - 1 oracle dba readme.txt 6068 7 June 2010

    -rw - r - r - 1 oracle dba 31525 June 7, 2010 timezdif.csv

    -rw - r - r - 1 oracle dba 351525 Aug 21, 2011 timezone_9.dat

    -rw - r - r - 1 oracle dba 302100 August 21, 2011 timezone_8.dat

    -rw - r - r - 1 oracle dba 286815 Aug 21, 2011 timezone_7.dat

    -rw - r - r - 1 oracle dba 286217 Aug 21, 2011 timezone_6.dat

    -rw - r - r - 1 oracle dba 286310 Aug 21, 2011 timezone_5.dat

    -rw - r - r - 1 oracle dba 286264 Aug 21, 2011 timezone_4.dat

    -rw - r - r - 1 oracle dba 286651 Aug 21, 2011 timezone_3.dat

    -rw - r - r - 1 oracle dba 274900 August 21, 2011 timezone_2.dat

    -rw - r - r - 1 oracle dba 344448 Aug 21, 2011 timezone_14.dat

    -rw - r - r - 1 oracle dba 344425 Aug 21, 2011 timezone_13.dat

    -rw - r - r - 1 oracle dba 345024 Aug 21, 2011 timezone_12.dat

    -rw - r - r - 1 oracle dba 345356 Aug 21, 2011 timezone_11.dat

    -rw - r - r - 1 oracle dba 345637 Aug 21, 2011 timezone_10.dat

    -rw - r - r - 1 oracle dba 274427 Aug 21, 2011 timezone_1.dat

    -rw - r - r - 1 oracle dba 801410 Aug 21, 2011 timezlrg_9.dat

    -rw - r - r - 1 oracle dba 616723 Aug 21, 2011 timezlrg_8.dat

    -rw - r - r - 1 oracle dba 601242 Aug 21, 2011 timezlrg_7.dat

    -rw - r - r - 1 oracle dba 586750 Aug 21, 2011 timezlrg_6.dat

    -rw - r - r - 1 oracle dba 587487 Aug 21, 2011 timezlrg_5.dat

    -rw - r - r - 1 oracle dba 531137 Aug 21, 2011 timezlrg_4.dat

    -rw - r - r - 1 oracle dba 527717 Aug 21, 2011 timezlrg_3.dat

    -rw - r - r - 1 oracle dba 507957 Aug 21, 2011 timezlrg_2.dat

    -rw - r - r - 1 oracle dba 791430 Aug 21, 2011 timezlrg_14.dat

    -rw - r - r - 1 oracle dba 782475 Aug 21, 2011 timezlrg_13.dat

    -rw - r - r - 1 oracle dba 785621 Aug 21, 2011 timezlrg_12.dat

    -rw - r - r - 1 oracle dba 787272 Aug 21, 2011 timezlrg_11.dat

    -rw - r - r - 1 oracle dba 792894 Aug 21, 2011 timezlrg_10.dat

    -rw - r - r - 1 oracle dba 493675 Aug 21, 2011 timezlrg_1.dat

    drwxr-xr-x 2 oracle dba 30 Sep 8 05:03 big

    drwxr-xr-x 2 oracle dba 30 Sep 8 05:03 little

    Please suggest alternatives to troubleshoot

    Thank you

    Sol.beach thanks for the reply, I'm able to correct the problem. In fact the PATH variable has put in .profile of export PATH = $PATH: $ORACLE_HOME/bin and the value is lower.

    -bash-3, $ 2 echo $PATH

    /Apps/Oracle/product/9.2.0.8.2009Q4/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:.:/ bin:/opt/bin:usr/CSS/bin:/usr/ucb:/usr/local/bin:/apps/Oracle/product/11.2.0.3.2014Q3/bin

    I changed as export PATH = $ORACLE_HOME/bin: $PATH and now it works fine. It seems to be a problem with the old Oracle Home, also present in the PATH variable before the bin to the current address of Oracle Home Directory.

    -bash-3, $ 2 echo $PATH

    /Apps/Oracle/product/11.2.0.3.2014Q3/bin:/apps/Oracle/product/9.2.0.8.2009Q4/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:.:/ bin: / opt/bin: css/usr/bin: / usr/ucb: / usr/local/bin

    Concerning

  • SQL * more wild returned data String - spaces (required) are abandoned in character data

    Does anyone know how to preserve the credibility of a string returned by using SQL * more variable substitution for use in a title column.

    I am under SQL * more script and the output of the securities. I need to find out the name of the company (in the text name of the legal entity). However, the substitution variable returns / outputs the data to the correct record, but corrupts the content of the returned string by spaces dropping (necessary)?

    In the script below, I tried several combinations to include using a technique of faking the output as a formula in Excel. It is very effective with the attack anywhere to Oracle/Microsoft problem at the output to Excel. For some varieties in solution, there are two methods to fill the Legal_Entity_Name which each produce the same corrupt result. I use method 2 because it's a little more friendly.

    The output is directed to a local directory C:... If you try to run this script... note the output in the script path is c:\Ora_scripts\Corrupt_Example.xls coil;

    In the database, EBS R12, the correct output should be: Industrias Selkirk of Mexico S de RL de CV . (IN THE SCRIPT, THE SAME SELECT STATEMENT IS USED AS THE MAIN QUERY - IT PRODUCES A CORRECT RESULT).

    However, data is corrupted to: IndustriasSelkirkdeMexico.

    Here's a testable script:

    --@C:\Ora_Scripts\Corrupt_String_Script.SQL

    trigger the echo

    went to CHECK

    moved the markup html off the coast of the coil

    Leave your COMMENTS

    Set trimspool on

    delete columns

    clear breaks

    clear the buffer

    Disable CALCULATED

    TOPIC on the value

    set PAGESIZE 50000

    Set LINESIZE 500

    NewPage 0 value

    set TERMOUT off

    -The variable definitions Section.

    Undefine g_Registration_Id

    Set g_Registration_Id = 12033;

    Cancel the Instance definition;

    Set the Instance = "XXXXXX";

    Undefine Time_Stamp;

    Define Time_Stamp = "DD-Mon-YYYY hh ';

    Undefine sv_Legal_Entity_Name

    Bnd_Legal_Entity_Name variable Char (75)

    Variable bnd_Registration_Id number

    --

    -Fill in the title and the title of the data items.

    -Company name get - method 1

    / * Start

    Select xrg. Alternate_Registered_Name in: bnd_Legal_Entity_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id = & g_Registration_Id;

    End;

    /

    -Transfer the value of the variable binding to the variable substitution

    Column sv_Var_1 sv_Legal_Entity_Name noprint new_value

    Select: bnd_Legal_Entity_Name double sv_Var_1;

    */

    --

    -Company name method retrieves 2

    Run: bnd_Registration_Id: = & g_Registration_Id;

    Column sv_Legal_Entity_Name sv_Legal_Entity_Name FORMAT A75 noprint new_value

    -Try in the form of Excel formula - no luck!

    -Select ' = ' ' | xRG. Alternate_Registered_Name | «"«as sv_Legal_Entity_Name»»»

    Select xrg. Alternate_Registered_Name as sv_Legal_Entity_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id =: bnd_Registration_Id;

    --

    Column Instance_Col by Instance NOPRINT new_value

    Select the name as Instance_COL in apps. Fnd_Apps_System;

    --

    Column Time_Stamp_Col new_value Time_Stamp NOPRINT

    Select to_char (sysdate, "Mon-DD-YYYY HH24:MI:SS) as Time_Stamp_Col

    From Dual;

    --

    the forage value off markup html on spool

    coil c:\Ora_scripts\Corrupt_Example.xls;

    TTITLE-

    Skip - 0

    'Arguments' left... »-

    Jump - 1

    Center & sv_Legal_Entity_Name-

    Jump - 1

    Right ' run: ' Time_Stamp-

    Center "it is a centered string constant;

    Jump - 2

    -Various declaration of Variables.

    the forage value off markup html on spool.

    HEAD ' < title > example string of corrupt < /title >.

    < style type = "text/css" >-

    table {background: white; do-size: 80% ;}} -

    Th {background: #ccc ;}} -

    TD {padding: 0px ;}} -

    < / style > '

    --                        Mainline query                                      --

    -REPLICATE THE SELECT USED TO DERIVE THE LEGAL_ENTITY_NAME TO THE TITLE

    Select xrg. Alternate_Registered_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id = & g_Registration_Id;

    -Liquidation of script.

    spool off;

    moved the html markup;

    Here is output (open in Excel):

    Arguments...
    IndustriasSelkirkdeMexico
    It is a centered string
    constant
    Run: 14 October 2014 10:10:45
    ALTERNATE_REGISTERED_NAME
    Industrias Selkirk of Mexico S of CV RL

    Hello

    Just use double quotes... First test: with x.sql container

    trigger the echo

    delete columns

    TOPIC on the value

    set PAGESIZE 50000

    Set LINESIZE 500

    NewPage 0 value

    set TERMOUT off

    -The variable definitions Section.

    Undefine sv_Legal_Entity_Name

    Column sv_Legal_Entity_Name sv_Legal_Entity_Name FORMAT A75 noprint new_value

    TTITLE-

    Skip - 0

    'Arguments' left... »-

    Jump - 1

    Centre '& sv_Legal_Entity_Name ' -.

    Skip 1

    SELECT 'test ttitle' FROM dual;

    running the script, providing a ttitle (slightly different from yours ;-), I have):

                                                                                                       Industrias Belgica ;-) Selkirk

    ' TESTINGTTITLE

    --------------

    test ttitle

    Best regards

    Bruno Vroman.

Maybe you are looking for

  • P10 - 304 - no display after wake up

    HelloI sometimes have a display problem with my P10-304. Panel display won't wake upAfter waking up from hibernation or suspend-to-RAM. Blue led power is on, HD and CPU fans are working well. I have preinstalled, xp of origin with v6.4.10.4485 nvidia

  • Last updated BIOS for E5 574G - 574L

    Hey guys, I need help here. to install Ubuntu 16.04.1 on my aspire, but I need to update my bios. But on the drivers Acer page, I found only updated to version 1.14, and I need at least a 1.15 or later to be able to install.  Can someone give me a li

  • Creates groups of area for forms

    How create/configure groups of fields in Eloqua?

  • ESXi 5.1 and Update Manager

    Hi allAs I'm sure many of you are well aware, ESXi 5.1 is the latest version with a .NET VI Client is a separate installation. In the future, we want to use the Web Interface to manage ESXi hosts.My question is with the Update Manager. Anyone know if

  • ADF public resource

    I want to display the homepage to all users. I have set up the ADF with HTTP basic security. So, I gave the flow House task limited to anonymous role with action to display. I have no user or business role. I have run the workflow as an area of a tes