Script to query multiple Oracle servers & instances

Hi
If I have a list of either database servers, or database instances, is there any way I can create and run a single script-query that would give me a list of all users in all databases? Are there any tools that would do this? Perhaps an OEM based enhancement?
Ideally I'd like to just point the script-query at a tnsnames file, with the appropriate username/password and let it run from there. We have Oracle v10.2 environment in AIX and Linux & windows.The database are not Oracle GRID managed.
I'm thinking on the line of shell script or powershell.
Thanks

user4807091 wrote:
Hi,
If i have 80 oracle databases it means i have to create 80 db link and then need to call the stored procedure to extract db information.
ThanksAnd whenever you add a database to your environment you have to add another link. Some people have a complete aversion to doing anything in a script if it can be done in a database procedure. I say "horses for courses". Use the tool that works best for the application at hand. I actually have skeleton script for whenever I need to report something from all of my databases. For your issue it would be something like this:
-- doit.sql
select username from dba_users;
exitand (an os script .. shell for *nix, .cmd for Windblows)
sqlplus system/manager@db1 @doit >> report.list
sqlplus system/manager@db2 @doit >> report.list
sqlplus system/manager@db3 @doit >> report.listMind you, this is for a quick and dirty for ad hoc reports. Maintenance for adding/dropping databases is simply a matter of adding/deleting a line from the shell/cmd script.

Similar Messages

  • NLS_LANG setting for a client with multiple Oracle servers

    Hello!
    We have a web application which has to connect to one of the Oracle servers with different charactersets. When the NLS_LANG on the client is a single byte encoding and the server has a single byte encoding there are no problems. We have now a server with NLS_CHARACTERSET UTF8 and all special (hungarian accented) character are replaced.
    When we set the client to UTF8 the rest of servers does not work.
    What is the solution for one client and multiple servers with different encoding?
    Is there a special key in connection string?
    I tried to change the nls_lang with an alter session statement but without success.
    Regards,
    emeriqus

    NLS_LANG is not depending on the database side, it's a CLIENT setting to "let Oracle know what encoding is used on the CLIENT" so that Oracle can do the conversion from the client encoding to the database (NLS_CHARACTERSET) encoding.
    for ONE application/client the is only ONE correct NLS_LANG value, regardless of the database NLS_CHARACTERSET
    If you web application is really an UTF8 application (check with your vendor) then you can perfectly use a UTF8 client setting and a 8 bit database
    Of course, you will be limited to the database side in this case seen the 8 bit characterset does not know all the characters in UTF8
    The fact that setting the NLS_LANG to UTF8 "does not work" with your web application is simply the fact your application is not a UTF8 env.
    Setting nls_lang to UTF8 will not "magically" make your application UTF8, NLS_LANG is depending on the encoding used in the web server.
    But the first thing to ask yourself is if CURRENT data is correctly in the Oracle database.
    use SQLdeveloper to check the data, this is a "know good client" that needs no NLS configuration.
    You can download it from http://www.oracle.com/technology/products/database/sql_developer/
    If the data is displayed correctly in SQLdeveloper then you are sure it's correct in the database.
    If data is WRONG in the database then that needs to be corrected first, "trying" different client side configurations will only make matter worse (even if they make the data "look good" )
    Regards,
    Gunther
    Client side notes on mentalink:
    Note:158577.1> NLS_LANG Explained (How does Client-Server Character Conversion Work?)
    1.2 What is this NLS_LANG thing anyway?
    3.2 A detailed example of a wrong nls setup to understand what's going on.
    4.2 How can I Check the Client's NLS_LANG Setting?
    5.1 My windows sqlplus is not showing all my extended characters.
    Note:179133.1> The correct NLS_LANG in a Windows Environment
    Note:264157.1> The correct NLS_LANG setting in Unix Environments
    Note:229786.1> NLS_LANG and webservers explained.
    Note 115001.1> NLS_LANG Client Settings and JDBC Drivers
    When using Unicode start here:
    Note:788156.1> AL32UTF8 / UTF8 (Unicode) Database Character Set Implications
    Setting NLs parameters: <Note:241047.1> The Priority of NLS Parameters Explained.

  • Multiple Oracle 9ias instances on single host

    hi all
    i tried installing more than 1 instances on a single host, under different oracle home......but i am facing certaing strange errors. Can anyone tell me what are the things that we have to specifically take care of while installing multiple instances on single host, i mean any port issues or anything else??
    please help
    thanks

    hi all,
    i have almost the same prolem here.
    i have created two instances other then OC4J home. i have also deployed two different applications on the two different instances. but when i try to run the application it gives Page not found exception! for both the applications.
    now when i stop one instance then the other instance runs properly and doesnt throw any error!
    there is definately no problem with the ports as internally the ports allocated to both the applications are different!
    if anybody has got any idea what might be the problem then it will be very helpful for me!
    thanks in advance!!
    Piyush

  • How to create multiple Oracle 9i instance on same machine?

    Hi Gurus,
    I would like to add second instance of Oracle 9i on same machine. What should I do? Please recommend me too.
    Note OS: Windows Server 2003 Standard Edition
    Oracle: Oracle 9.2.0.1.0
    Best regards,
    Choosak B.

    First, are you sure you want to have separate ports? Normally, you would just run a single listener and register all the databases on the system with that listener.
    If you do want to run multiple listeners, the listener.ora file specifies the port to listen on.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Multiple oracle database instances with different characterset on  the same server

    Hello,
    Is it possible to have 2 database instances running with different charactersets,one with AL32UTF8 and the other with WE8MSWIN1252.?
    Are there any setup requirements to be performed prior to setting up the database instances?
    The 3rd party utility that we want to use does not support AL32UTF8 and insists on using a database with character set WE8MSWIN1252.
    Kindly help.
    Thanks,
    Ram.

    Hello Zhe,
    I guess I posted my question in a wrong forum.  I tried my best to find a suitable forum and thought this was the best and closest I found.  Apparently not.  Can you please let me know the right forum for my question?
    The below is the breif of what we are currently facing:
    We are in the process of finalizing plans to install Automic for our Retail applications to schedule jobs.  In the process came to know that Automic does not support AL32UTF8.
    Right now we have RMS and UC4 (now called Automic) run on the database server as UC4 supports AL32UTF8 and schema for UC4 is inside the RMS database.
    Going forward it is recommended to have a separate database instance on the same server as that of RMS database and with a different characterset which is WE8MSWIN1252.
    Please let me know what forum to post in, I will repost the question.
    Thanks,
    Ram.

  • Starting multiple application servers

    We have 4.7 system has 2 application servers as "sap1" and "sap2" installed in different Unix servers.
    I would like to start "sap1" first and "sap2" next. Is there any standard script for starting multiple application servers in a sequence. We have problem, when restarting servers after weekly off-line backup. Should we go for customised Unix shell scripting?.
    Thanks,
    Sam

    #!/bin/sh
    SYSID=ABC
    STARTSCRIPT="/sapmnt/$SYSID/exe/startsap"
    start the Central Instance (CI)
    $
    start AppServers
    remsh <app server> -n startsap <Instance name>
    stopscript
    #!/bin/sh
    SYSID=ABC
      Stop all app servers and the database.
    stop AppServers
    remsh <hostname> -n stopsap <instance name>
    stop central instance
    /sapmnt/$SYSID/exe/stopsap
    Thanks,
    Tanuj

  • Multiple oracle exe process

    Hi,
    I am using 10.2.0.1.0, 64 bit version on windows.
    In our schema if we execute one query multiple oracle exe process are created for same query. Nearly 20 process are created. I am seeing this result on toad session browser.
    Could any one tell me why these much of process are creating.
    Thanks,
    Ratna.

    Looks like parallel query.
    For more info see Oracle® Database Data Warehousing Guide Chapter 25 Using Parallel Execution here
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14223/usingpe.htm#i1009828
    Gints Plivna
    http://www.gplivna.eu

  • Running a Select query against multiple sql servers using SSIS script task.

    Hi Guys,
    I need to fetch data from multiple sql servers using  SSIS scirpt task inside a foreach container.
    is there anyway i can build dynamic sql connections using ssis variables inside SSIS script task in each loop
    Please guide me or refer any blogs so that i will try..
    Thanks in advance.

    Your only options is using .net code, then it will be no different than using a console app in a loop.
    using (SqlConnection connection = new SqlConnection(connectionString))
    connection.Open();
    Console.WriteLine("ServerVersion: {0}", connection.ServerVersion);
    Console.WriteLine("State: {0}", connection.State);
    and so forth for each connection string
    the connection string would come from the ForEach loop
    Arthur My Blog

  • Script to query / monitor logins to Servers

    Not sure if I'm in the right forum, apologies if I'm not. Not sure where this should go ... anyway, is it possible to query username logins to Windows Server 2008?
    Information needed:
    1) Username
    2) date / time login
    3) date / time logoff
    Preferably, a way to query multiple servers at one go into an Excel file or something. And not using some freeware or additional installs.
    Thanks

    You'll need to turn on some auditing. This one may help.
    http://support.microsoft.com/en-us/kb/556015
    As far as scripting something here may work.
    https://gallery.technet.microsoft.com/scriptcenter
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to configure single web server instance to multiple application servers..

    Hi all,
    we are running single instance of IWS6.0 SP2 on solaris, we want to comfigure this single instance to multiple application servers(JRun). Can any one advise me whether it is possible to do.
    Thanks
    Raj

    Hi Raj,
    "how to configure single web server instance to multiple application servers.."
    It's not possible for setting up multiple applicataion servers for Single iWS instance.
    Thanks,
    Dakshin.

  • How to configure multiple report servers in Oracle 10 G R2?

    I want to configure multiple report servers with my application deployed on Oracle 10G R2. Since R2 does not support report server clustering, how can this be achieved without any change in the application?
    Currently, the application is running with single report server.

    Hi Martin,
    Well we are trying to run a report without exactly specifying the name of reports server anywhere, e.g. in database or in form or anywhere else. Now if I do not supply a reports server name using RUN_REPORT_OBJECT, the error it displays is FRM-41211: Integration Error : SSL failure ... However if I specify the reports server name in the form, the reports run perfect. Also the name of reports server is specified in rwservlet.properties.
    Now the question goes as follows:
    Can I run my report from Form without specifying the name of the Reports server anywhere at all. This is so because either an in-process reports server should be picked or the one which is entered in rwservlet.properties should be pickec up by default. Please correct us if we are wrong. once we are through with it, we have to move to Oracle 10gR2 concept of reports server.
    Thanks in anticipation,
    Ruchi/Saurabh

  • App-V PowerShell: Script to Query XenApp Servers for App-V Publishing Errors and Output an Excel Document with the Results

    Please Vote if you find this to be helpful!
    App-V PowerShell:  Script to Query XenApp Servers for App-V Publishing Errors and Output an Excel Document with the Results
    Just posted this to the wiki:
    http://social.technet.microsoft.com/wiki/contents/articles/25323.app-v-powershell-script-to-query-xenapp-servers-for-app-v-publishing-errors-and-output-an-excel-document-with-the-results.aspx

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

  • Questions about Oracle 9I AS, reports.... to query multiple database

    Hi friends,
    I am working for the HR dept of a big company and our
    group will implement some enviornment to present HR reports for the leadership through web interface.
    I have checked the Oracle 9iAS page and it seems it is
    a pretty nice tool. The reports service is very impressive. We mainly use Java/JSP to do the project,so
    this Oracle9i can fit our development team. One of
    the problem is that we have multiple databases running
    on different machines,including Oracle 7, Oracle 8i and
    SQL Server 2000. So, one of the requirements is to query
    multiple databases of different verdors.
    So my question is:
    can Oracle9i AS (especially the reports service) do this
    multiple database query? I know with pl/sql, we can create
    database link to do this query, but can we do it in
    reports tools?

    Yes you can do Even in the reports.

  • Multiple Application Servers - Same class instance

    Hi,
    Due to increasing load we have to add multiple Web Servers and Application Servers (custom built) for our Web Application.
    As currently we are using 'synchronized' for adding and releasing connection in ConnectionPool and also using static in several other classes - we have to make these few classes single instance across the application servers.
    We are using iPlanet 6.0 for Win 2000. Is there any way we can direct specific classes for a single instance. Please provide me with all sorts of alternatives.
    Thanks a lot,
    Suman Biswas

    Hi,
    Yes, we have different JVMs. Different JVM means different processes,now there can be two cases,these process running on same machines
    or on different machines.If it is in different machines then undoubtly you require to go for the Distributed Technology(RMI for java).
    As we have couple of classes which are using
    'synchronized' - cann't we use centralized classes for
    these couple of classes to maintain integrity?Yes you can do it,now this centralized class should be available in common place from where your all applications can get results,and for avoiding the data corruption your require to go for synchronized(if some global variables) block,since the same instance will be serving all the requests.
    When you say RMI - my question is how the commercial products handle these kind of issues while they are in multiple servers?I have created some application using RMI but not the same one which you had specified.I had used it for different purpose.
    vicky

  • Multiple listeners on Oracle 9i instance

    Hi,
    i am having problems starting multiple listeners in an Oracle 9i instance. The contents of the listener file is
    # LISTENER.ORA Network Configuration File: /lsq2/app/oracle/product/9.2.0/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LSNR_LSQ=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=traindb3-lsq)(PORT=1541))
    (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
    (ADDRESS=(PROTOCOL=IPC)(KEY=CMDP))
    (ADDRESS=(PROTOCOL=IPC)(KEY=RT1))
    (ADDRESS=(PROTOCOL=IPC)(KEY=DM1))
    (ADDRESS=(PROTOCOL=IPC)(KEY=BOB))
    (DESCRIPTION=
    (PROTOCOL_STACK=
    (PRESENTATION=GIOP)
    (SESSION=RAW)
    (ADDRESS=(PROTOCOL=TCP)(HOST=traindb3-lsq)(PORT=2481))
    STOP_LISTENER = YES
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 20
    SID_LIST_LSNR_LSQ=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=PLSExtProc)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (PROGRAM=extproc32)
    (ENV='GBPATH=/lsq2/home/cmdp/GB/nr')
    (SID_DESC=
    (GLOBAL_DBNAME=CMDP)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (SID_NAME=CMDP)
    (SID_DESC=
    (GLOBAL_DBNAME=DM1)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (SID_NAME=DM1)
    (SID_DESC=
    (GLOBAL_DBNAME=RT1)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (SID_NAME=RT1)
    (SID_DESC=
    (GLOBAL_DBNAME=BOB)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (SID_NAME=BOB)
    (SID_DESC=
    (GLOBAL_DBNAME=truat1)
    (ORACLE_HOME=/u01/app/oracle/product/9.2.0)
    (SID_NAME=truat1)
    (SID_DESC=
    (GLOBAL_DBNAME=tradev1)
    (ORACLE_HOME=/u01/app/oracle/product/9.2.0)
    (SID_NAME=tradev1)
    (SID_DESC=
    (GLOBAL_DBNAME=tratest1)
    (ORACLE_HOME=/u01/app/oracle/product/9.2.0)
    (SID_NAME=tratest1)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.244.127.12) (PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC) (KEY=EXTPROC))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=HDSSQLServer)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (PROGRAM=hsodbc)
    (ENVS=LD_LIBRARY_PATH=/lsq2/app/oracle/product/9.2.0/lib:/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/lib:/usr/l
    ocal/easysoft/oob/client)
    (SID_DESC =
    (SID_NAME=HDSSQLServerRotherham)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (PROGRAM=hsodbc)
    (ENVS=LD_LIBRARY_PATH=/lsq2/app/oracle/product/9.2.0/lib:/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/lib:/usr/l
    ocal/easysoft/oob/client)
    (SID_DESC =
    (SID_NAME=SDCIMart)
    (ORACLE_HOME=/lsq2/app/oracle/product/9.2.0)
    (PROGRAM=hsodbc)
    (ENVS=LD_LIBRARY_PATH=/lsq2/app/oracle/product/9.2.0/lib:/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/lib:/usr/l
    ocal/easysoft/oob/client)
    I could start the listener lsnr_lsq but not the default listener. The error I get is
    TNS-01155: Incorrectly specified SID_LIST_str parameter in LISTENER.ORA
    NL-00303: syntax error in NV string
    The default listener deals with connections to a sql server while lsnr_lsq deals with connections to oracle databases.
    Thanx in advance

    Could you make sure that you've services for all the SID's below in the tnsnames.ora file..
    1)HDSSQLServer,
    2)HDSSQLServerRotherham,
    3)SDCIMart
    Regards,
    Bhagat

Maybe you are looking for

  • Problem in new database creation with the help of online  backup

    Dear dba's i am using oracle 11gR2 database in windows server 2003. database is running in ARCHIVE LOG mode. i have taken an online backup of all datafile,controlfile and spfile.Then i crated folders in all the locations as required for new database.

  • Cannot install latest version of iTunes 10.6.

    Running 64 bit Windows Vista Home . Failed to install latest version of iTunes 10.6 with error message "The feature you are trying to use is on a network resource that is unavailable.......click OK , or enter an alternative path to a folder containin

  • Help convert from 7 to 6.1

    Hello all. Someone tried to answer my question but i can't open his file cuz i only have labview 6.1. could someone please convert it for me? thanks. Aquaphire ---USING LABVIEW 6.1--- Attachments: saveclock4.vi ‏21 KB

  • Upsizing stuff

    Hello people. So I wanted to takea design i made in phtoshop and blow it up to 2 or 3 times its size. I know I can upsize in photoshop but im afraid it will ruin it or get pixelated. the thing is there is no photograph or anything with a lot of pixel

  • What is the best mail server software, compatible with G5 and OS X 10.5.8?

    Hello. I want to install/set up a mailserver on Mac OS X 10.5.8. It will host approximately 35users, should have pop, imap, spam protection, webmail/admin interface, routing feature, all the usual stuff, I'm doing this because we often have to reciev