Database name Substitution string?

Hello

I was wondering if there is any way to query the name of the database being connected to, or if there were any built-in substitution string-APEX/Oracle-who would return this value?

Thank you
Justin

I always use

sys_context('userenv', 'db_name')

This gives you the SID

Tags: Database

Similar Questions

  • Substitution strings are not read

    Hello

    I'm working on APEX 4.2.2 and Oracle 11 g.

    We ask a how to download attachments of a report query. We use a v ('APP_ALIAS') substitution string to the procedure, which is not playing. Is there a limitation that a procedure should be called from process only so the substitution string would be read? Please help me with this.

    Thank you

    Shoaib

    2812672 wrote:

    The procedure is called from a report interactive/Classic Apex, who only considers current Apex session? They are read flat when I call the same procedure of a process page apex.

    How is it used in the process of the page? It's obviously in a context of APEX session: the procedure is called by a block anonymous PL/SQL run during show page APEX or accept treatment.

    When the user clicks on the link in the report, it's the browser that calls the procedure, not APEX. Look at the URL of the link: it does not use the APEX "f?" p =... "signature of procedure; It is not an APEX session ID; It is not executed in a context of APEX.

  • Substitution strings do not fill in report models > header > before lines

    I'm unable to use the substitution string in report models > header > before lines

    < border tr = "1" >

    < class th = "header" align = "center" colspan = "2" > < /th > SYSDATE-3

    < class th = "header" align = "center" colspan = "2" > < /th > SYSDATE-2

    < class th = "header" align = "center" colspan = "2" > < /th > < /tr > SYSDATE-1

    I need to use something like below

    < border tr = "1" >

    < class th = "header" align = "center" colspan = "2" > & SYSDATE1. < /th >

    < class th = "header" align = "center" colspan = "2" > & SYSDATE2. < /th >

    < class th = "header" align = "center" colspan = "2" > & SYSDATE3 < /th > < /tr >

    SYSDATE1

    SYSDATE2

    SYSDATE3 are elements of my page.

    Version: Apex 4.2

    Theme: Red Simple

    Report model: Standard, change the line colors

    Report type: report Classic

    Is it possible to use these elements in the specified model?

    Thank you

    Chauvet

    The ampersand/dot substition works in report models. https://Apex.Oracle.com/pls/Apex/f?p=3568966:1

    Maybe the page item values are not saved in session state, before the report is rendered.

  • Why substitution strings are now old value in application translated even after seed/publish?

    Hello

    Recently, I noticed a small, but from the perspective of our customer "big" issue. We defined in our application, some chains of substitution to keep more detailed information about the version of the application. Later, they are used in page templates to display information to end users. Recently I had to update the value of one of the chains of substitution. The change is immediately visible in the main application. Unfortunately, it is not the case for the translated application. For some reason the old value is retained. Even after doing the "seed"-> "Apply translation file"-> "publish." It is keeping the old value. I tried to use the "Translatable" checkbox in the model. In the translation file, is to show correctly the substitution in the 'source' and the tags string 'target', but still he is resolved to the old value.

    We use the APEX 4.2.2.00.11 running on 11g.

    Waiting for suggestions that maybe it's me forget somewhere extra time "checkbox. Thank you in advance.

    Greetings,

    kempiak

    It was my mistake. Value of the substitution string is included in the translation file. I changed it it and it works perfectly.

    Greetings,

    kempiak

  • Adding a substitution string without exporting the entire application

    Hello

    I was wondering if it was possible to add a substitution string to an application on a different environment without having to export the entire application.

    I use export by component a lot, but now I have a small update a page and a substitution string (specified in the Application definition).

    I have to get this update to another copy of our application, without the substitution of the entire application.

    With a full export, I noticed that the wwv_flow_api.create_flow function is called that has a lot of parameters and substitution strings:

    p_substitution_string_18 = > 'TEST ',.

    p_substitution_value_18 = > ' < img src = "" & test.png "title ="test"/ >".

    There is another function that can add them separately? Or I can insert them with a statement on a table?

    Hope someone can shine some light on this case, so I know how to export more different components.

    Thank you


    Robert

    PS: I use apex 4.2 with 11g, but I don't think that what really matters on this case.

    The substitution variables are found in the wwv_flows table and run from 01-20, you have to identify you with the user/schema of APEX_040200...

    Select substitution_string_01, substitution_value_01 from wwv_flows where id = 101;

    Update wwv_flows set substitution_value_01 = 'new value' where id = 104;

    Kind regards

  • Is it possible to more a form letter to the recipients identified in a database (names, addresses, etc.)?

    Is it possible to more a form letter to make the process more product separate PDFs, one for each recipient identified in a database (names, addresses, etc.)?

    Or is - it possible to more type a letter so that the more process produces one big file that contains a copy of the form for each letter recipients identified in a database?

    Hi marceepoo,

    If you use Word for Windows, you can of course. See Adobe Acrobat X Pro * create PDFs from Word mail

    Best,

    Sara

  • ORA-01506: missing or illegal database name

    I can't start the database instead, I get the above error. Help, please

    [oracle@localhost /] $ pwd
    /
    [oracle@localhost /] $ cd/u01/app/oracle
    [oracle@localhost oracle] $ export ORACLE_BASE = / u01/app/oracle
    [oracle@localhost oracle] $ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    [oracle@localhost oracle] $ export ORACLE_SID = orcl
    [oracle@localhost oracle] $ export PATH = $ORACLE_HOME/bin: $PATH
    [oracle@localhost oracle] $ export TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
    [oracle@localhost oracle] $ sqlplus / as sysdba

    SQL * more: Production of release 11.2.0.1.0 Thu Feb 14 17:33:11 2013

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

    Connect to an instance is idle.

    SQL > startup
    ORA-01506: missing or illegal database name
    SQL >

    >
    ...
    [oracle@localhost oracle] $ export ORACLE_SID = orcl
    ...
    -rw - r - r - 1 root root 69 14 Feb 12:02 initorcl.ora
    ...
    >

    Why the initorcl.ora file is owned by root? As mentioned, do not perform any oracle about actions or commands as root.

    HTH
    Srini

  • vCenter Database Name

    Dear all,

    I intend to implement a number of databases of vcenter in different data centers - all have the same standard name, say 'VCDATA '.

    Subsequently, the plan is to use modes related to connect to vcenter instances - is there any problem with the same database name when you use bound mode?

    Thank you

    I didn't have the need to use additional related yet myself, but as far I understand modes related, there is no need to use again the same PB (for example, MSSQL, Oracle,...) for the different vCenter servers that you want to link. When you configure related modes vCenter replicates only the data necessary to access the services (information connection, certificates), information on licenses, user roles using Microsoft ADAM. The different vCenter servers go directly to other databases. With the vSphere Client you only access the vCenter vCenter servers Service.

    André

  • Substitution string literal

    Hi all.

    I'm moving a datetime value in a link on the page, using substitution strings:

    #DD #/ #MM #/ # YYYY # #HH24 #: #MI #.

    He does not understand the ': ' literal. If I type #DD #/ #MM #/ # YYYY # #HH24 #. #MI #, it works. How can I use the ': ' literal in a substitution string?

    Thanks in advance.

    Hello

    Item values cannot include colons
    

    Spend for example value

    #DD#/#MM#/#YYYY# #HH24#;#MI#
    

    Then use after expression header process or calculation pl/sql type to format the value for example

    REPLACE(:Px_MY_ITEM,';',':');
    

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

    Published by: jarola on 24 Sep 2012 20:29

    Published by: jarola on 24 Sep 2012 20:30

  • illegal or missing database name

    Hello


    I will have a few difficulties of database 11g:

    SQL > connect system/secret as sysdba;
    Connect to an instance is idle.
    SQL > startup
    ORA-01506: missing or illegal database name

    11g installation seems to be okay and there is no error at all.

    My environment variables have been defined:

    -bash-4, $ 0 echo $ORACLE_HOME
    / Tank/Oracle/112

    -bash-4, $ 0 echo $ORACLE_SID
    orajf

    Here are the contents of my file of dbs:

    -bash-4, $ 0 ls-l $ORACLE_HOME/dbs
    total of 26
    -rw - rw - 1 oracle oinstall 1544 24 May 21:50 hc_jfora.dat
    -rw - r - r - 1 oracle oinstall 2852 26 mai 11:35 init.ora
    -rw - r - r - 1 oracle oracle 0 26 mai 11:27 initORA11GR2.ora
    -rw - r - r - 1 oracle oracle 0 26 mai 11:33 initorajf.ora
    -rw - r - 1 oracle oinstall 24 24 May 21:51 lkJFORA
    -rw - r - 1 oracle oinstall 1536 24 May 21:56 orapwjfora
    -rw - r - 1 oracle oinstall 906 26 mai 14:20 spfilejfora.ora


    The database instance tried to create is called 'orajf '.

    Here is the content of the spfile


    jfora.__java_pool_size = 16777216
    jfora.__large_pool_size = 16777216
    jfora.__oracle_base='/tank/oracle'#ORACLE_BASE the value of the environment
    jfora.__pga_aggregate_target = 687865856
    jfora.__sga_target = 1006632960
    jfora.__shared_io_pool_size = 0
    jfora.__shared_pool_size = 436207616
    jfora.__streams_pool_size = 0
    *.audit_file_dest='/tank/Oracle/admin/jfora/adump '
    * .audit_trail = "db".
    * full = '11.2.0.0.0'
    *.control_files='/tank/oracle/oradata/jfora/control01.ctl','/tank/oracle/flash_recovery_area/jfora/control02.ctl'
    * .db_block_size = 8192
    * .db_domain = "
    * .db_name = "jfora."
    *.db_recovery_file_dest='/tank/Oracle/flash_recovery_area '
    * .db_recovery_file_dest_size = 4070572032
    * .diagnostic_dest = "/ tank/oracle.
    *. Dispatchers ='(Protocol=TCP) (SERVICE = jforaXDB)"
    * .local_listener = "LISTENER_JFORA".
    * .memory_target = 1686110208
    * .open_cursors = 300
    * runoff = 150
    * .remote_login_passwordfile = "EXCLUSIVE."
    * .undo_tablespace = "UNDOTBS1.

    I was just wondering what I might be missing. What else can I do to start this database?

    Thank you

    Published by: 918944 on May 26, 2012 11:36

    SQL > connect system/secret as sysdba;

    Wrong, you need to sign in as SYS not system, the system user is not sysdba called...

    -bash-4, $ 0 echo $ORACLE_HOME
    / Tank/Oracle/112
    -bash-4, $ 0 echo $ORACLE_SID
    orajf
    Here are the contents of my file of dbs:
    -bash-4, $ 0 ls-l $ORACLE_HOME/dbs
    total of 26
    -rw - rw - 1 oracle oinstall 1544 24 May 21:50 hc_jfora.dat
    -rw - r - r - 1 oracle oinstall 2852 26 mai 11:35 init.ora
    -rw - r - r - 1 oracle oracle 0 26 mai 11:27 initORA11GR2.ora
    -rw - r - r - 1 oracle oracle 0 26 mai 11:33 initorajf.ora
    -rw - r - 1 oracle oinstall 24 24 May 21:51 lkJFORA
    -rw - r - 1 oracle oinstall 1536 24 May 21:56 orapwjfora
    -rw - r - 1 oracle oinstall 906 26 mai 14:20 spfilejfora.ora

    I see 2 files of parameters, one is jfora (SPFILE) and orajf (PFILE)

    Since you set your ORACLE_SID to orajf check your PFILE (initorajf.ora), I think that it does not contain the db_name parameter...

  • Is it possible to migrate a planing with different database name application?

    Hi gurus,

    is 1] possible to migrate an application planing with different database name via the LCM in EMP 11 utility?

    [2] we can migrate application of planning with different names from DB in sys9 too?

    You must update this table, restart planning. You must also rename the database through the Regional service.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Var name as string

    Hello

    I'm new to cold fusion and I would like to know how can I get a variable name a string or another variable...

    I want to declare a variable:

    MyVar = "content";

    and dynamically create an output like this: "the value of myvar is «content"»

    Thank you

    Hi Rockit8.

    I know that you worked around your question (I would still like to know exactly what it was you had to do), but I think I worked on a little what you asked, and to quench my curiosity, I want to this follow-up further to clarify some things (for me and maybe for you).

    I suspect that what you ask is shown by this pseudocode:

    What is the kind of thing you're wanting to do?  It is not possible.

    When you call a function like this, the function never know what this variables.theVariableWhoseNameIWantToKnow, it's never happened variables.theVariableWhoseNameIWantToKnow, it is just past its value.  And SEE the value in arguments.theArgumentFromThePerspectiveOfTheFunction.  The only variable myFunction() knows is arguments.theArgumentFromThePerspectiveOfTheFunction.  It is not relevant to myFunction() that the calling code has used a variable to contain 'a value', it could just as likely have been:

    This demonstrates why I say your question - as requested - is meaningless.

    However not all the data is passed by value.  Let's look at this code:

    In the CF, a struct is copied by reference (a little), no value, so the variables.firstOneToReferenceTheStruct and the variables.anotherOneThatReferencesTheStruct will be different references to the same chunk of memory (and memory holds the struct {foo = ' bar'}.

    So, if we have this code:

    Then arguments.theArgumentFromThePerspectiveOfTheFunction will simply be yet another reference to exactly the same memory as variables.firstOneToReferenceTheStruct and variables.anotherOneThatReferencesTheStruct.  Thus, one might think initially "aha, so there is a way to know that arguments.theArgumentFromThePerspectiveOfTheFunction 'origin' was called 'variables.firstOneToReferenceTheStruct '.  No, there is not.  Because then these references all point to the same memory, they all still completely separate references (a reference is a memory address, so each of these three actually just hold the memory address that the struct is in, but it's three separate copies of the address.)  Not three different copies of the content of the memory address, but three separate copies of the address) and did not at all no correlation.

    Now... Java obviously keeps track of which refers to point for bits of memory (so that he knows how memory can be deleted by the garbage collector), it is therefore possible to find a list of references that reference this particular memory piece, but I do know that it is exposed even through the Java API , and it is certainly not exposed to ColdFusion. I'm not a Java developer, I can google, but I did not come up with all Java features, which exposes him (disclosure: I only spent about 2 minutes by train).  I suspect its level too low and not really any particular use.  Why really we would want to know this kind of thing anyway?  It is not useful to demand information, after all.

    This explains why I said that your question is a little meaningless?

    --

    Adam

  • Apex 4: conditional display substitution strings

    Hello

    I have a replacement string defined in apex 4:

    Substitution string: NOT_IN_EXCEL
    Replacement value: instr (nvl(:REQUEST,'FOO'), 'FLOW_EXCEL') = 0

    Now when I try to use this substitution string to a condition, for example on a column of the report, I get an error:

    Condition type: PL/SQL Expression
    Expression 1: & NOT_IN_EXCEL.

    Error message:

    ORA-06550: line 4, column 18: PLS-00103: encountered the symbol "&" when expecting one of the following numbers: (- + new case mod not null < an ID > < a between double quote delimited identifiers of > < a variable binding > continue avg current County are min max sql prior stddev sum variance execute forall time timestamp interval date fusion < a literal string with character set the context of > < a > <) a SQL string between single quotes > hose < a literal string between double quotes otherwise spec character set


    With the help of a chain of substitution in this way in Apex 3.2.1 works without problem.

    Thanks for the help in advance,
    Dirk

    Hello

    1. change the Item Page and scroll up to where you have the Condition
    2. check do validate not (code analysis during execution only). checkbox, and then apply the changes

    Substitution strings to continue to work as before in 4.x

    Concerning

  • Update the #NOTIFICATION_MESSAGE substitution string #.

    Hello

    I use a process that updates a report based on provided information of editable columns.
    The problem is that, if in this process, I encounter an exception, for example 'ORA-01843 a month not valid' and I manipulate it in the EXCEPTION block
    WHILE OTHERS then
    IF (SQLCODE =-1843) THEN
    +: P_ERROR: = ' error: some dates do not months contain valid (DD-MON-YYYY)'; +
    END IF;
    +...+

    the process 'Error Message' Message the process section, appears only in the error page, but I want to show the error in the same page of the report.
    So I think to update the #NOTIFICATION_MESSAGE substitution string # with my text from the + & block handle P_ERROR. + I've initialized in the exception.
    How can I do?

    Thank you very much
    Adela

    Hello

    How about if you check how to use apex_application.g_notification instead of the own element?

    Could help you
    Notification/success message of the parameter when using owa_util.redirect_url
    Re: apex_application.g_notification or g_print_success_message does not work

    BR, Jari

  • Can I create a substitution string?

    Hello!

    Can I create a new chain of substitution? Y at - it all the substitution string that it can used?
    Anyone can say more about the substitution string?


    Kind regards
    Priscila Britto

    HI -.

    You can create chains of substitution under shared components / definition.

    Good luck.

Maybe you are looking for

  • Satellite L300-1FS - Wireless reconnect after closing the lid

    Hello My 2 month old son Toshiba laptop works very well in many ways, but an annoying problem, is that if we close the lid when you open it again it doesn't re connect to our router. If I click on the network connection, it just says: there is no eve

  • Screenshot save location

    After taking a screenshot (shift, control, 4) saves the image in the Clipboard instead of office. I prefer the office. This is something new since the replacement of hard drive and install a new OS.

  • How to amplify a signal 10VDC/35mA to a 1. exit 5a?

    I want to activate a trigger of solenoid 12VDC current experimental rig with labview. However, the trigger attracts about 1.5 a at 10VDC, and my current installation with Labview can only generate a 35mA 10 VDC (0.035 A) signal to a BNC connector. Wh

  • Linksys E4200 and connectivity Motorola SBG6580

    Here is a picture of my home network. The problem I'm having is, I can't get the WD MyBook Live Duo to be seen on the entire network. If it is connected to the Linksys, all computers connected to the Linksys can see it, but not those related to the M

  • Is there an image based restore?

    Original title: restoration of disk images? I just learned the pain once again recover from an accident.  Vista Home Premium on a Dell, several years old, but still useful in nursing along. I remember the old days where there was a ghost on a recover