APPL_TOP directory from SQL?

Hi all
Is there SQL that can be run that returns the APPL_TOP directory reliably acrross 11iR12?
I've tried using dbms_system.get_env('APPL_TOP',:APPL_TOP); but that doesn't work on my 11i instance.
Or if there's a way to get this from Java that would also be fine.
Thanks

>
distinct
>
used?
>
but R12 returns multiple rows on my Vision instance.
>
as for me for r12
row - for instance
for example, i have 3 instances, say DEV1, TEST1, PROD1 then result have 3 rows
APPL_TOP     /r12/DEV1/apps/apps_st/appl
APPL_TOP     /r12/TEST1/apps/apps_st/appl
APPL_TOP     /r12/PROD1/apps/apps_st/appl

Similar Messages

  • Calling Java class stored in directory from PL/SQL

    Is it possible to call Java class that is stored in directory from PL/SQL
    or must those Java classes be stored in Database?
    Has anyone any information considering this?
    Cheers,

    user529557,
    You have the following options:
    * Web Services
    * Servlets
    * EJB
    * RMI
    * JMS
    There may be others.
    Good Luck,
    Avi.

  • File- Print not working from SQL Developer 1.2.1 Build MAIN-32.13

    File->Print not working from SQL Developer 1.2.1 Build MAIN-32.13.
    I downloaded sqldeveloper-1.2.1.3213.ZIP and extract to a local directory. From the extracted directory I ran ..\sqldeveloper\sqldeveloper.exe from Windows XP sp2. The program itself seems to run just fine but File-Print doesn't do anything. In Help-About, Java Platform is reported as 1.5.0_06 and Oracle IDE is 1.2.1.3213. I'm not sure where to look for what is causing the problem.
    Thanks

    I hadn't tried CTRL-P before but I did today. On the first attempt, I saw a small jump in the memory usage for sqldeveloper.exe as reported in Windows Task Manager. Otherwise, there was no change. A second CTRL-P in the same session produced a further bump but subsequent attempts in the same session produced no further change in CPU or Memory Usage.
    Using Task Manager to monitor this further, I tried File->Print again and saw that sqldeveloper would periodically climb to 1 or 2 percent CPU and consume a little more memory. After a minute or so, though, all activity stops again.
    I do not get a print dialog box from SQLDeveloper using either CTRL-P or File->Print

  • Update users in Active Directory form SQL query update

    I need to update the fields in the
    Active Directory 2003 users from a
    SQL Server 2003 query. Any idea plissss???

    This is an powershell example to create AD users from SQL Server.
    The Powershell cmdlet Set-ADUser will update the AD User fields.
    $SQLText = "SELECT e.BusinessEntityID, p.Title, p.FirstName, p.MiddleName, p.LastName, p.Suffix, "+
    "e.JobTitle, d.Name AS Department, d.GroupName, edh.StartDate, e.LoginID"+
    " FROM HumanResources.Employee AS e"+
    " INNER JOIN Person.Person AS p ON p.BusinessEntityID = e.BusinessEntityID"+
    " INNER JOIN HumanResources.EmployeeDepartmentHistory AS edh ON e.BusinessEntityID = edh.BusinessEntityID"+
    " INNER JOIN HumanResources.Department AS d ON edh.DepartmentID = d.DepartmentID"+
    " WHERE (edh.EndDate IS NULL)"+
    " AND (p.FirstName ='Brian')"
    $SqlCon = New-Object System.Data.SqlClient.SqlConnection
    $SqlCon.ConnectionString = "Server=localhost;Database=AdventureWorks2012;Trusted_Connection=yes;;"
    $SqlCon.Open()
    $SqlCmd = New-Object System.Data.SqlClient.SqlCommand
    $SqlCmd.Connection = $SqlCon
    $SqlCmd = $SqlCon.CreateCommand()
    $SQLCmd.CommandText = $SQLText
    $Result = $SQLCmd.ExecuteReader()
    $Table = New-Object System.Data.DataTable
    $table.Load($Result)
    $SqlCon.Close()
    $Password = "P@assword1"
    foreach($Item in $Table)
    $newUserID=@{
    Name=$item.FirstName+$Item.LastName
    Description="This is a test of a bulk user add"
    GivenName=$item.FirstName
    Surname=$item.LastName
    DisplayName=$item.FirstName+" "+$Item.LastName
    UserPrincipalName="$($item.FirstName+"."+$Item.LastName)@corp.contoso.com"
    EmployeeID=$item.BusinessEntityID
    ScriptPath='login.cmd'
    Company="Contoso"
    Department=$Item.Department
    EmailAddress="$($item.FirstName+"."+$Item.LastName)@corp.contoso.com"
    Title=$Item.JobTitle
    $TargetOU="OU="+$item.Department+",DC=corp,DC=contoso,DC=com"
    Try{
    $newUserID
    New-ADUser @newUserID -Path $TargetOU -ErrorAction Stop -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) -Passthru
    Enable-ADAccount -Identity $newUserID.Name
    Set-ADUser -Identity $newUserID.Name -ChangePasswordAtLogon $true
    Write-Host "UserID $($newUserID.Name) created!" -ForegroundColor green
    Catch{
    Write-Host "There was a problem creating UserID $($item.UserID). The account was not created!" -ForegroundColor Red

  • Migrating from SQL Server 2000 to Oracle 10g

    Hello,
    I am a newbie to Oracle 10g and haven't really worked with Oracle since 8i. I have been tasked to migrate all of our databases and tables to Oracle 10g. I need a little help getting started or pointed in the right direction on how to copy all that data from SQL Server to Oracle 10g. I know that Oracle has an Import/Export Utility, but don't know if it can do what I need. Can some one help point me in the direction I need?
    Thanks, Marion

    Ayub
    You need to download both the Oracle Migration Workbench core tool and the SQL Server 2000 plugin (SQLserver2k.jar). You copy the plugin into the plugin directory, after you unzip the Oracle Migration workbench main.
    The tool comes with release notes and a user guide, that explains the necessary setup and migration process.
    Donal

  • Database restore from SQL 2000 to SQL 2005 for SBO 2005B

    Hi Everyone,
    I am facing some problems in regards to the restore of SBO Database from SQL 2000 to SQL 2005.
    Let me explain you the problem.
    See I am using SAP B1 2005B with patch level 38 in my laptop with SQL 2000. I have made an company in this and done work in it as a production company and now I want to restore this company in the server which has SQL 2005. How to do it.
    I have taken a backup in my laptop from SAP B1 Server Suite Manager which has SQL 2000 and sucessfully backed up but when I am trying to restore in the server which has SQL 2005 I am getting the following error in SQL 2005 in server :-
    Restore failed for Server 'DXBAP001'.  (Microsoft.SqlServer.Smo)
    System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL\data\SBO_DCHAR.mdf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)
    Please let me know the solution for it.
    Thanks in Advance.
    Regards,
    Kawish Junaid Mazhari

    Hi,
    In SQL 2005 create a database and name as the 200 one was (though any name would do).  when you create the database note the location of the .mdb and .ldf file.
    once this had created right click on your new database > tasks > restore database
    in the new window select from device and point it to your .bak file created from your 2000 system, ensure you put a tick in the restore box on the new line.
    in the options tab tick overwrite database, and, change the file locations in the restore as directory to the file locations of the new database.  the file names must be the same too.
    you can change the original file names after the restore.
    that should do the trick.
    thanks,
    mike

  • Migration on active directory from 2003 to 2008 and SharePoint error Cannot connect to the configuration database.

    Hi all,
    In advance i`m thankful for your help,
    I come across a problem while migrating the Active Directory from Windows Server 2003 to Windows Server 2008 R2,
    SharePoint 2010 is getting this error Cannot connect to the configuration database. The same goes for the Administrative page,
    Nothing is change in the MySql database, same log in, same server name, i guess it have something to do with the SharePoint Farm,
    My question is will reinstalling the SharePoint do the job? Or is there an easy way to get back on my old track?
    I`ve try to sync users... no good
    PS C:\Users\administrator.SERVERM> if($configManager.IsSynchronizationRunning()
    -eq $false)
    >> {
    >> $configManager.StartSynchronization($true)
    >> Write-Host "Started Synchronizing"
    >> }
    >> else
    >> {
    >> Write-Host "Already Synchronizing"
    >> }
    >>
    Can someone explain a little bit more about this:
    6.     
    Can they talk to each other?
    Verify that SharePoint is using the correct IP address for the SQL server. To do this, run the ping command on the Windows SharePoint Services server.
    Verify that the SharePoint server is obtaining the correct IP address for the SQL server from DNS. To do this, run the
    nslookup command from the SharePoint Server.
    Make sure that there are no incorrect entries for the SQL server. To do this, examine the Hosts file on the SharePoint server. This file is in the following location:
    %systemroot%\system32\drivers\etc\Hosts
    On the SharePoint server, look for SQL client aliases. To do this, follow these steps: Click
    Start, click Run, and then type cliconfg in the
    open box.
    Click the Alias tab. By default, there are no SQL client aliases. If you have any aliases for the SQL server, verify that they are correct, or remove them.
    Open the SQL Server Configuration Manager (Start SQL Server 2008  Configuration Tools  SQL Server Configuration Manager
    Navigate to the SQL Server Network Configuration  Protocols for MSSQLSERVER node in the tree view
    Enable TCP/IP and Named Pipes (you’ll be warned that these changes will not apply until the service is shut down)
    Aleksandar Delcevski, Web-administrator School of Journalism and Public Relations Jurij Gagarin 17-1/1, 1000 Skopje, R. Macedonia t: + 389 2 3090 004 mob: +38972 257 565 [email protected]; www.vs.edu.mk; www.medium.edu.mk; www.unescochair-vs.edu.mk

    Hiya,
    I don't think it is necessary to reinstall.
    You should just confirm that your basic infrastructure is working.
    1: On the SharePoint server, open cmd and write ping <SQL server name>
    2: On the SharePoint server, open cmd and write nslookup <SQL server name>
    Basically the steps outlined here, is the best way to start:
    6.     
    Can they talk to each other?
    Verify that SharePoint is using the correct IP address for the SQL server. To do this, run the ping command on the Windows SharePoint Services server.
    Verify that the SharePoint server is obtaining the correct IP address for the SQL server from DNS. To do this, run the
    nslookup command from the SharePoint Server.
    Make sure that there are no incorrect entries for the SQL server. To do this, examine the Hosts file on the SharePoint server. This file is in the following location:
    %systemroot%\system32\drivers\etc\Hosts
    On the SharePoint server, look for SQL client aliases. To do this, follow these steps: Click
    Start, click Run, and then type cliconfg in the
    open box.
    Click the Alias tab. By default, there are no SQL client aliases. If you have any aliases for the SQL server, verify that they are correct, or remove them.
    Open the SQL Server Configuration Manager (Start SQL Server 2008  Configuration Tools  SQL Server Configuration Manager
    Navigate to the SQL Server Network Configuration  Protocols for MSSQLSERVER node in the tree view
    Enable TCP/IP and Named Pipes (you’ll be warned that these changes will not apply until the service is shut down)

  • How to open notepad from sql prompt?

    Hi to all
    can anyone please let me know how to open notepad from sql prompt.
    I tried ed command but message appears " Cannot create save file "afiedt.buf"
    thanks in advance

    user13480742 wrote:
    can anyone please let me know how to open notepad from sql prompt.
    I tried ed command but message appears " Cannot create save file "afiedt.buf"Create a SQL*Plus shortcut on your desktop.
    Create a SQL folder on your desktop (in your documents folder, or whatever desktop location you have read and write access to).
    Change the +Working Directory+ of the SQL*Plus shortcut to this SQL folder you have created (via editing the properties of the shortcut).
    Launch SQL*Plus via that shortcut.
    It will now run from that SQL directory. This means that it will have read and write access to the current directory (allowing it to create the +afiedt.buf+ file for example). It also means that you can save your SQL scripts in this directory and execute these from the SQL*Plus command line, without having to specify a path.

  • Copy the data from Sql Server to edirectory using java

    Hi ,
    I am new to e directory.I don't know how it works.Can some one assist
    me on this ,I have to extract data from SQL Server and update these
    data in edirectory.This is needs to be done using java.
    If any one can provide me the sample code or please suggest how to
    proceed .
    Thanks in advance
    dukewarm
    dukewarm's Profile: http://forums.novell.com/member.php?userid=53430
    View this thread: http://forums.novell.com/showthread.php?t=373051

    dukewarm;1792481 Wrote:
    > Hi ,
    >
    > I am new to e directory.I don't know how it works.Can some one assist
    > me on this ,I have to extract data from SQL Server and update these
    > data in edirectory.This is needs to be done using java.
    >
    > If any one can provide me the sample code or please suggest how to
    > proceed .
    >
    > Thanks in advance
    Read the values from SQL server and use LDAP to update the data in
    eDirectory.
    Thomas
    thsundel
    thsundel's Profile: http://forums.novell.com/member.php?userid=128
    View this thread: http://forums.novell.com/showthread.php?t=373051

  • Data migration from SQL Server 6.5

    Hi,
    I would like to migrate data from SQL Server 6.5 to Oracle
    8.0.5. I can create flat files using the BCP utility in SQL
    Server, but how do I get my Oracle db to recognize the same?
    Please help.
    Regards
    Urmi
    null

    sohail rana (guest) wrote:
    : Hi Urmi,
    : Could you please let me know the first step how from where you
    : can use BCP utility in SQL Server so that you can get the flat
    : file. I have one assignment to do migration.
    : Please help
    : regards
    : Sohail rana
    : Urmi (guest) wrote:
    : : Hi,
    : : I would like to migrate data from SQL Server 6.5 to Oracle
    : : 8.0.5. I can create flat files using the BCP utility in SQL
    : : Server, but how do I get my Oracle db to recognize the same?
    : : Please help.
    : : Regards
    : : Urmi
    There is a new feature in version 1.2.1 of the migration
    workbench that will generate the BCP and SQL Loader scripts for
    you.
    Right mouse click on the 'Tables' component group in the Oracle
    Model UI tree and click 'Generate Data Migrate Script...'.
    This will place the scripts in the Log directory you have
    specified in the Tools -> Options menu. Go to the Logging tab and
    enter a valid value for 'Log file directory'.
    The data move scripts will be located in the 'Log file
    directory'\SQLServer6 directory.
    null

  • Creating User Acct's in Open Directory from External Source

    Hello,
    I am trying to find a way to automate the creation of user accounts in OpenDirectory. I have a MS SQL database that has the usernames and passwords in it now, and I'm looking to export those out of there and have an automatic way to create matching accounts in the OpenDirectory service on OSX Server.
    Gary

    It's unfortunate that there's no better way to do this. We're using ssh with a pre-shared key to our Open Directory server to run a script which runs dsimport to create the accounts on the Open Directory.
    This works fine for importing/creating accounts, but it doesn't help us change passwords that we are pushing down to Open Directory from our metadirectory solution.
    Here's the python we use to generate the dsimport entries:
    dsimport_base = '0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 11 dsAttrTypeStandard:RecordName dsAttrTypeStandard:GeneratedUID dsAttrTypeStandard:AuthMethod dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID dsAttrTypeStan\
    dard:PrimaryGroupID dsAttrTypeStandard:RealName dsAttrTypeStandard:UserShell dsAttrTypeStandard:HomeDirectory dsAttrTypeStandard:EMailAddress dsAttrTypeNative:postOfficeBox'
    dsimport_entry = '%s:%s:dsAuthMethodStandard\\:dsAuthClearText:%s:%s:%s:%s:%s:%s:%s:Ganymede managed [%s]'
    params = (obj.Username,
    obj.Global_UID,
    obj.Password.plaintext,
    obj.UID,
    self.getPrimaryGID(obj),
    obj.Full_Name,
    obj.Login_Shell,
    '/Users/' + obj.Username,
    obj.Username + '@arlut.utexas.edu',
    obj._oid)
    new_entry = dsimport_base + '\n' + dsimport_entry % tuple([str(value).replace(':', '\\:') for value in params]) + '\n' # not handling signature aliases yet
    and here's the Perl that is run on the far end of the ssh pipeline which
    reads the list of 'new_entry' lines generated by our Python:
    #!/usr/bin/perl
    # This script receives files on STDIN and runs dsimport on them.
    # Jonathan Abbey
    # 22 October 2009
    use File::Temp qw/ tempfile tempdir /;
    $adminuser = 'diradmin';
    $adminpass = 'seekret';
    ($fh, $filename) = tempfile();
    @users = ();
    while () {
    if (/^([^0][^:]+):/) {
    push(@users, $1);
    print $_;
    print $fh $_;
    close($fh);
    system('/usr/bin/dsimport', '-g', $filename, '/LDAPv3/127.0.0.1', 'O', '-u', $adminuser, '-p', $adminpass, '-v');
    unlink($filename);
    foreach $user (@users) {
    system('/usr/bin/pwpolicy', '-a', $adminuser, '-p', $adminpass, '-u', $user, '-setpolicy', 'canModifyPasswordforSelf=0');
    We've been trying to use kadmin to change passwords, but it seems flaky, with occasional 'policy reject' complaints breaking the sync.

  • Xcopy Command From Sql

    Dear Guru's,
    I have Script of my all the procedure.
    After all procedure gets execute, As a output it create .csv files.
    This .csv files i manually copy past on one of my directory.
    For avoiding this manual copy past i want to use xcopy command from sql itself.
    Please guide me how do i do this.
    Regards,
    Chanchal wankhade.

    CHACHA wrote:
    I have Script of my all the procedure.
    After all procedure gets execute, As a output it create .csv files.
    This .csv files i manually copy past on one of my directory.
    For avoiding this manual copy past i want to use xcopy command from sql itself.
    Please guide me how do i do this.Do not like the sound of the architecture you are using for this. Scripts? Scripts for Oracle should be limited to installing s/w.
    Writing any kind of Oracle application using scripts, is questionable ito design, robustness, flexibility, security and so on.
    Wanting to use console commands from a SQL cursor? That sounds even more broken and wrong. If you want to do o/s calls, it should be done carefully and securely from PL/SQL code.
    And PL/SQL code should be inside the database - not outside in some script.
    As for copying files. Realise that SQL and PL/SQL code executes on the server inside an Oracle server process. This does not have access to your client's file system and directories.

  • Can we extract blob objects from sql database to a human readable format?

    Hi All,
    I have question How can we extract
    blob objects from Sql database to human readable format ?
    Blob includes Images, text and docs.
    Thanks 
    Moug
    Best Regards Moug

    One thing you can do if its sql 2012 or later is to load the blob data to FileTable created in database. Then you would be able to physically browse to directory it points and see all files in its native format.
    see this for more details
    http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Get positive values from sql

    I have balance column and i need to pick only positive values from sql query.
    Balance
    200
    -20
    -220
    100
    Expected
    Balance
    200
    100

    Hi Frank,
    Sorry i think i am not clear.
    below is my function get_total.
    one billing_key is nothing but one billing period-each period has 6 programkeys.
    by following function i will get 6 records by passing 6 programkeys and one biling key
    now i need to get over all balance of all periods per program. condition is i need to take only +ve amounts from the below function and sum it up
    expected out. i am just giving an example of output.
    actual
    programkey get_total
    a 100
    a -50
    a -50
    b 200
    c 300
    c -200
    d -100
    d -25
    d 400
    e 500
    e -10
    f 600
    f -200
    we are taking only +ve amounts from the above.
    How can i write a procedure or script to acheive program_key and balance as below.
    programkey balance
    a 100
    b 200
    c 300
    d 400
    e 500
    f 600
    create or replace FUNCTION GET_TOTAL (p_bill_key IN varchar2,
    p_prog_key IN varchar2) RETURN NUMBER AS
    l_total NUMBER;
    l_dum_bill NUMBER;
    p_count NUMBER:=0;
    BEGIN
    BEGIN
    SELECT count(*) into p_count
    FROM billing_adjust b where b.billing_key = p_bill_key ;
    if p_count < 1 then
    SELECT NVL(surch_amount,0) + NVL(adjust_amount,0)
    INTO l_total
    FROM mv_billing a, mv_prog_surch b
    WHERE a.billing_key = b.billing_key and
    a.billing_key = p_bill_key and
    b.program_key = p_prog_key;
    return l_total ;
    end if;
    SELECT NVL(surch_amount,0) + NVL(adjust_amount,0)
    INTO l_total
    FROM billing_adjust b, prog_surch_adjust c
    WHERE b.billing_adjust_key = c.billing_adjust_key and
    b.billing_key = p_bill_key and
    c.program_key = p_prog_key;
    return l_total;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    null;
    End;
    RETURN 0;
    END GET_TOTAL;
    This is what i have started writing to acheive expected output need help on this.
    Create or replace function balance(p_company_id) return number as
    v_total_due number:=0;
    v_total number:=0;
    CURSOR p_idn IS
    SELECT PROGRAM_KEY,PROGRAM_NAME FROM MV_PROGRAM_DICT where CURRENT_YN = 'Y' order by PROGRAM_NAME_ID;
    cursor p_billkey_idn is
    select biling_key from billing where company_id=p_company_id;
    Begin
    for v_idn in p_idn loop
    for v_billkey in p_billkey loop
    SELECT sum(get_total(v_billkey.billing_key,v_idn.program_key)) into balance
    FROM dual
    WHERE get_total(v_billkey.billing_key,v_idn.program_key)>0;
    END LOOP;
    END loop;

  • Query based Report (Reports From SQL Query)

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    Can i increase a timeout of portal page, how i can do this?
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
    In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
    Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM

Maybe you are looking for