Access the TNS_ADMIN value in Oracle through Command Prompt

I am trying to get the TNS_ADMIN value but I m an not getting Expected Results . My tnsNames.Ora are located at the following locations : -
1) C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
2) C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
As you can see from the belowcode, TNS_ADMIN is not displaying the correct location. Please correct me where I am going wrong.
C:\>set TNS_ADMIN=%ORACLE_HOME%\network\admin
C:\>echo %TNS_ADMIN%
%ORACLE_HOME%\network\admin
C:\>echo %ORACLE_SID%
%ORACLE_SID%
C:\>

user8980683 wrote:
I am trying to get the TNS_ADMIN value but I m an not getting Expected Results . My tnsNames.Ora are located at the following locations : -
1) C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
2) C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
As you can see from the belowcode, TNS_ADMIN is not displaying the correct location. Please correct me where I am going wrong.
C:\>set TNS_ADMIN=%ORACLE_HOME%\network\admin
C:\>echo %TNS_ADMIN%
%ORACLE_HOME%\network\admin
C:\>echo %ORACLE_SID%
%ORACLE_SID%
C:\>
Neither ORACLE_SID nor ORACLE_HOME have been set in the command window session it looks like.

Similar Messages

  • Generate the fmx through command Prompt

    Hi,
    I am using Oracle forms6i, Oracle 10g Database and Windows (OS).
    Is it possible to compile the FMB file through command Prompt.
    And then i need to move the fmx files to server through command prompt.
    Thanks,
    Ansaf.
    Edited by: Ansaf on Jan 24, 2012 5:20 PM

    Ansaf wrote:
    Hi,
    I created the batch file as per your code and i changed only the useridn/password@db.
    I run the batch
    But i cant find the fmx file.Sorry i post the 10g batch compiler
    From where u run the batch file ? It should be in that folder where you .fmb exist.
    If then don't work. add the location path before the ifcmp60.exe
    Here is the 6i compiler
    Echo compiling forms ....
    for %%f IN (*.fmb) do C:\ORANT\BIN\ifcmp60.exe userid=mail/tti@ait module=%%f batch=yes module_type=form compile_all=yes window_state=minimize
    ECHO form compilation completechange the ifcmp60.exe path as you have
    Hope it will works for you
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: HamidHelal on Jan 24, 2012 8:12 PM

  • How to call the javascript through Command prompt?

    I need to call the .js file through command prompt. And also through programming language like c++, java. Could you please advice me with samples.This is for "illustrator cs".

    You can also look into use of COM scripting interface to the Adobe programs. Unfortunately, this means you have to do some programming/scripting to create a (command line) script that you can execute like
    cscript C:\somePath\myScriptLauncher.vbs  C:\somePath\anAdobeScript.jsx
    or
    cscript C:\somePath\myScriptLauncher.js  C:\somePath\anAdobeScript.jsx
    the scripts can be written in VBScript (*.vbs) or Microsoft JScript (*.js) which can access COM objects thus the Adobe program's COM APIs.
    Nothing purely simple as a command line option in this solution. But it does offer customization as an advantage.
    This might be a slightly useful reference.
    http://stackoverflow.com/questions/3846626/is-it-possible-to-execute-jsx-scripts-from-outs ide-extendscript
    there's one post mentioning COM in there.
    And of course, you can also use COM through C++, Java, C#, Visual Basic, etc. as well, not restricted to VBScript and JScript, though I've found it's easier to use the latter two for COM.

  • How to Access the Return Value of a Function

    Hi,
    How do I access the return value when calling an Oracle function from .NET using Oracle.DataAccess.Client? The function returns an integer of 0, 1 or 99.
    Dim db_command_oracle As New OracleCommand()
    db_command_oracle.Connection = db_connection_oracle
    db_command_oracle.CommandType = CommandType.StoredProcedure
    db_command_oracle.CommandText = "swsarsi.import_appointments"
    Dim ret_value As New OracleParameter()
    ret_value.OracleDbType = OracleDbType.Int32
    ret_value.Direction = ParameterDirection.ReturnValue
    ret_value.Size = 2
    ret_value.OracleDbType = OracleDbType.Int32
    db_command_oracle.Parameters.Add(ret_value)
    Dim IN_student_id As New OracleParameter()
    IN_student_id.OracleDbType = OracleDbType.Varchar2
    IN_student_id.Direction = ParameterDirection.Input
    IN_student_id.Size = 10
    IN_student_id.Value = student_id
    db_command_oracle.Parameters.Add(IN_student_id)
    db_command_oracle.ExecuteNonQuery()
    messagebox.show(ret_value) ?????

    Your ODP.NET code looks correct. What error are you seeing?
    One thing that will definitely generate an error is that .NET message boxes require that strings be displayed. ret_value is a parameter object. You need to access its value and convert it to a string. At a minimum, you need to change that.

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • To get the count of records and able to access the column value in a single

    Hi
    Is there any way to get the number of records in the query and access the column values
    e.g
    select count(*)
    from
    (SELECT department, COUNT(*) as "Number of employees"
    FROM employees
    WHERE salary > 25000
    GROUP BY department ) a
    This wil only get the Count, if i want to access each row from the inline view how can i do that.

    Your question is not clear.
    Are you looking for total record count as well as count by department ?
    Something like this?
    SQL>
    SQL> with temp as
      2  (
      3  select 1 dept ,10000 sal from dual union
      4  select 1 dept ,25100 sal from dual union
      5  select 1 dept ,30000 sal from dual union
      6  select 1 dept ,40000 sal from dual union
      7  select 2 dept ,10000 sal from dual union
      8  select 2 dept ,25100 sal from dual union
      9  select 2 dept ,30000 sal from dual union
    10  select 2 dept ,40000 sal from dual )
    11  select count(*) over( partition by 1 ) total_count,dept,
    12  count(*) over(partition by dept) dept_cnt  from temp
    13  where sal>25000;
    TOTAL_COUNT       DEPT   DEPT_CNT
              6          1          3
              6          1          3
              6          1          3
              6          2          3
              6          2          3
              6          2          3
    6 rows selected
    SQL>

  • Error to execute the script through command prompt

    I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
    cscript D:\JS\Test.js
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
    D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
    Thanks,
    Prabudass

    I haven't use CS for quite some time and file associations may not work with the command prompt.
    You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
    If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967

  • Run the report through command prompt on Linux

    can anyone tell me how can run report through command prompt (Reort server is on Linux)?
    that thing I want to implement in form calling report.
    Please guide about it..

    hi,
    There is a lots of documents available in the Internet for the same.
    Regards,
    Soumyajit

  • How to access the SAP Server Console? Through VPN

    How to access the SAP Server Console? Through VPN
    Sudhakar

    Hi,
    You need to contact your system admin as they will enable the port in ur system so that u can access client servers.It should also be allowed from client side also i mean access.
    You will connect thru weblink with user name and pw and SAP with logon details.
    Thanks
    Suresh

  • How can I findout the coulm value contains 0 through 9 for the table

    could u plz suggest me how can I findout the coulm value contains <> 0 through 9 for the table...

    Well I am going to give it a shot, because I believe I am looking for the same thing.
    I have a value that is of type varchar2. How can I determine if it has special characters or alpha characters in it? In other words, I only want the value to consist of numbers. (Initially it had been thought that Letters would be used as well, but now they just want numbers and the datatype of the column cannot be altered since there is data in it.)
    I have gotten this far, but I do not know what else I can use besides '[:alpha:]'? I cannot seem to find this documented anywhere...I can find the regexp package reference, but not the character classes...
    select regexp_instr('1a23456', '[[:alpha:]]',1,1,1, 'i') x
    from dual
    This works fine = returns 3, so I know there is an alpha character.
    select regexp_instr('1$23456', '[[:alpha:]]',1,1,1, 'i') x
    from dual
    This returns 0 - what do I need to change so that it detects the '$' and returns 3?
    Thanks!!
    Janel

  • Javafx through command prompt

    Hi,
    untill now i have used NetBeans for developing javafx applications,
    i want to know how to run javafx applications through command prompt.
    what are the requirements?
    which environment variables to be set?
    and commands to compile and run javafx applications?
    thank you.

    There are some detail steps to run your javafx from command line.
    Firstly Create new file with some javafx source code and save them to specific to your Class name . For eg Test.java with package name test
    Let's assume my javafx is inside C:\Program Files\Oracle directory
    I'll tell you in environment of Window:
    Open CMD
    Let's assume you are in right directory
    set JAVAFX_LIB = C:\Program Files\Oracle\rt\lib\jfxrt.jar
    javac -cp "%JAVAFX_LIB%" -d . Test.javaNow goto directory of javafx sdk/bin . There must be javafxpackager.exe
    javafxpackager -createjar -srcdir <your src dir> -appclass test.Test -outfile <your file name>.jar -outdir <your output dir>Now run the jar file . It will run great.
    Thanks
    Narayan

  • Can we deploy a mapping through Command Prompt

    Can we deploy a mapping through Command Prompt. If so pls tell me how
    Thanks in Advance

    Hi,
    when deploying mappings from the coomand line or when i try to run some other script in OMBPlus i usually do the following:
    * Create a .bat file that will call your tcl script it will look something like this:
    rem @echo off
    cd <owb_install_dir>\owb\bin\win32\
    rem your script file
    call OMBplus "<path to your script>\scripts\DeployMapping.tcl"
    cd <path to your script>\scripts\
    * Create a .tcl file that will do the following:
    OMBCONNECT <user>/<passowrd>@<server name>:<port>:<Service Name>;
    OMBCC 'MY_PROJECT';
    #Deploy Mapping
    OMBCONNECT CONTROL_CENTER <control_center_username/control_center_password>@<server name>:<port>:<service name> USE REPOS '<design repository user>';
    set om "<sub_location>";
    OMBCC '$om';
    set m "Mapping Name";
    puts " Deploying Mapping: $m";
    puts "";
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$m' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE MAPPING '/MY_PROJECT/$om/$m';
    catch { OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$m' } ex;
    puts " $ex";
    OMBDROP DEPLOYMENT_ACTION_PLAN '$m' ;
    OMBDISCONNECT CONTROL_CENTER;
    OMBCOMMIT;
    For more information refer to the OMBPlus reference documentation
    Hope this helps
    Regards,
    Ricardo Ferreira

  • Start weblogic server in debug mode through command prompt

    Hi,
    Please help me in starting the weblogic server in debug mode through command prompt.I am using weblogic 10.3.6 app server.
    Thanks

    Hi,
    To debug weblogic startup issues you can pass the below jvm arguments:
    -Dweblogic.slc=true
    -Dweblogic.debug.DebugServerLifeCycle=true
    Debug options are available in weblogic based on the subsystem, such as security, jms, jdbc, deployment..etc
    You can refer to :
    https://blogs.oracle.com/vijaya/entry/weblogic_web_service_debug_flags
    Thanks,
    Sharmela

  • How to create create oracleserviceSID manually through command prompt

    Hello Experts ,
    We want to create oracleserviceSID manually through command prompt in our BIW 3.5 server based on oracle 9.2 . wts the procedure of create this oracle service manually . Requested to revert at earliest as this is very urgent .
    points guaranteed .
    Regards,
    Somya

    hi
    i guess that your q's is how to create oracle service source id if the system is already connected to your BW server?
    to assign the source id to the source system goto tools in your DWB->assignment of source id to source system->assign the SID there
    to create a new one press F5 from the same screen & give the logical system name.
    check
    SAP Note 518241 for establishing the connection

  • How to check all subsites data through command prompt

    I am using MOSS 2007 ,we don't have powershell,  I have to check the size of all subsites size. I run the command in command prompt
    C:\programfiles\commanfiles\microsoftshared\webserverextensions\12\BIN>stsadm -o enumsubwebs -url
    http://abc.xyz.com
    I got all subsites urls, but i need all url's size also. How to do through command prompt?

    Hi Ravikiran,
    The codeplex solution is a custom solution built using SharePoint Server object model, you can download the code also from the following location.
    http://spusedspaceinfo.codeplex.com/releases/view/20413
    The following is the code from the above project.
    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.IO;
    using Microsoft.SharePoint;
    using System.Diagnostics;
    using Microsoft.SharePoint.Administration;
    using System.Collections.Generic;
    namespace SPUsedSpaceInformation
    class Program
    static void Main(string[] args)
    SPFarm farm = SPFarm.Local;
    SPWebService service = farm.Services.GetValue<SPWebService>("");
    Console.WriteLine("Select a Web Application:");
    Console.WriteLine("-------------------------");
    int n = 1;
    List<Guid> webAppIds=new List<Guid>();
    foreach (SPWebApplication webApplication in service.WebApplications)
    Console.WriteLine(string.Format("{0}) {1}", n, webApplication.DisplayName));
    webAppIds.Add(webApplication.Id);
    n++;
    int quit=n;
    Console.WriteLine(string.Format("{0}) Quit",n));
    Console.WriteLine("? ");
    int choice1 = 0;
    while (true)
    string choice2 = Console.ReadLine();
    if (int.TryParse(choice2, out choice1))
    if (choice1 > 0 && choice1 < quit)
    SPWebApplication webApplication = service.WebApplications[webAppIds[choice1 - 1]];
    Console.WriteLine("Select a Site Collection:");
    Console.WriteLine("-------------------------");
    n = 1;
    foreach (SPSite site in webApplication.Sites)
    Console.WriteLine(string.Format("{0}) {1}", n, site.Url));
    n++;
    quit=n;
    Console.WriteLine(string.Format("{0}) Quit",n));
    Console.WriteLine("? ");
    choice1 = 0;
    while (true)
    choice2 = Console.ReadLine();
    if (int.TryParse(choice2, out choice1))
    if (choice1 > 0 && choice1 < quit)
    SPSite siteColl = webApplication.Sites[choice1 - 1];
    DataTable tableStorage = siteColl.StorageManagementInformation(SPSite.StorageManagementInformationType.Document, SPSite.StorageManagementSortOrder.Decreasing, SPSite.StorageManagementSortedOn.Size, 0xf4240);
    Hashtable ht = new Hashtable();
    foreach (DataRow dr in tableStorage.Rows)
    if (ht[dr["WebUrl"].ToString()] == null)
    ht[dr["WebUrl"].ToString()] = (double)dr["TotalSize"];
    else
    ht[dr["WebUrl"].ToString()] = ((double)ht[dr["WebUrl"].ToString()]) + ((double)dr["TotalSize"]);
    string folderPath = string.Concat(new object[] { Directory.GetCurrentDirectory(), Path.DirectorySeparatorChar, "Listings" });
    if (!Directory.Exists(folderPath))
    Directory.CreateDirectory(folderPath);
    using (StreamWriter writer = File.CreateText(string.Concat(new object[] { folderPath, Path.DirectorySeparatorChar, "SitesListingsUsage", DateTime.Now.ToString().Replace("/", "-").Replace(":", "-"), ".csv" })))
    foreach (string key in ht.Keys)
    writer.WriteLine(string.Format("{0};{1}", key, ht[key].ToString()));
    SPWeb currentWeb = siteColl.RootWeb;
    using (currentWeb)
    using (StreamWriter writer = File.CreateText(string.Concat(new object[] { folderPath, Path.DirectorySeparatorChar, "SitesListingsInfo", DateTime.Now.ToString().Replace("/", "-").Replace(":", "-"), ".csv" })))
    string separation = string.Empty;
    ListWebs(currentWeb, separation, writer);
    Console.WriteLine("Press a touch to quit...");
    Console.ReadLine();
    Process.Start(folderPath);
    return;
    else if (choice1 == quit)
    return;
    else
    Console.WriteLine("? ");
    else
    Console.WriteLine("? ");
    else if (choice1 == quit)
    return;
    else
    Console.WriteLine("? ");
    else
    Console.WriteLine("? ");
    private static void ListWebs(SPWeb Web, string Separation, StreamWriter Writer)
    string ownersMail = string.Empty;
    SPGroup ownerGroup = null;
    ownerGroup = Web.AssociatedOwnerGroup;
    if (ownerGroup == null)
    foreach (SPRoleAssignment roleAssignment in Web.RoleAssignments)
    if ((roleAssignment.Member is SPGroup) && roleAssignment.Member.Name.ToLower().Contains("owner"))
    SPGroup group = (SPGroup)roleAssignment.Member;
    foreach (SPUser user in group.Users)
    if (!string.IsNullOrEmpty(user.Email))
    if (string.IsNullOrEmpty(ownersMail))
    ownersMail = user.Email;
    else
    ownersMail = ownersMail + "," + user.Email;
    break;
    else
    foreach (SPUser user in ownerGroup.Users)
    if (!string.IsNullOrEmpty(user.Email))
    if (string.IsNullOrEmpty(ownersMail))
    ownersMail = user.Email;
    else
    ownersMail = ownersMail + "," + user.Email;
    string accessRequestMail = string.Empty;
    if (Web.RequestAccessEnabled)
    accessRequestMail = Web.RequestAccessEmail;
    string authorMail = string.Empty;
    try
    authorMail = Web.Author.Email;
    catch { }
    Writer.WriteLine(string.Format("{0};{1};{2};{3};{4};{5};{6}", new object[] { Web.Title, Web.Url, authorMail, Web.Created.ToString(), accessRequestMail, Web.LastItemModifiedDate.ToString(), ownersMail }));
    Console.WriteLine(string.Format("{0};{1};{2};{3};{4};{5};{6}", new object[] { Web.Title, Web.Url, authorMail, Web.Created.ToString(), accessRequestMail, Web.LastItemModifiedDate.ToString(), ownersMail }));
    foreach (SPWeb childWeb in Web.Webs)
    ListWebs(childWeb, Separation + "--", Writer);
    Please don't forget to mark it as answered, if your problem resolved or helpful.

Maybe you are looking for

  • Verizon Community Terms of Service 3/24/2015

    Your use of the Verizon Community (Forums, Blogs, and Idea Exchange) is governed by these Verizon Community Terms of Service, together with the Verizon Privacy Policy and Verizon Terms of Use (collectively, the "Terms"). The Terms describe the permit

  • Comparing a single int to more than one int value?

    Hi is there a way to compare a single int value amongst several ints in one go? i know i could do if statements that can compare each int one by one but i was wondering if there is an easier way? like comparing all values amognst eachother somthing l

  • MAP Software inventory

    I've been sent this email: I am writing with regards to the letter I sent to you on the 4<sup>th</sup> of July which requested that your organisation completes a Software Asset Management (SAM) Review in line with the Microsoft Volume License Agreeme

  • Import file swf to java

    Hi all,... I want to ask : how we can import file swf to java... I want to make that *.swf to become my first page in my program. that swf will be displayed in my program... by the way, please tell me step by step (i'm still newbie).. Thanxs for u' a

  • FCE 4 for slideshows with still images only

    I recently put together a slideshow in FCE 4 from my still photographs. The show looks great when I run the original file. But the DVD I created looks awful. Is there a special way to size the still images for better quality. I sized them the way we