Need to run the same query on different databases with the same argument

Hi folks,
I've a script: obj, which has simple stuff, when I execute @obj
this asked me for the object_name
and in return gives me object/s if it exists in this (connected) db.
Now to check in 2 other dbs, I've to disconnect from here and then connect to those dbs and run the same @obj there and give the same argument, e.g., EMP and it'll return the answer.
What is desired ... if not very hard on you :-(
Some thing like @objAll
asked only once object_name ... e.g., I gave EMP
now go to all the 3 dbs and give me the result in ONE spool file only.
What do you think, is this tough, I did something, but it was not involved connecting to different dbs, within the same script, but here we cannot create db links and have to disconnect and connect to the db to get some information.
Please do reply, if my question is not understandable or any ...
Thanks in advance.
Best regards.
Edited by: user8604530 on Jun 27, 2012 1:51 PM

As far as i understand from your question : you cannot create db links ? right..
well another option is to create a shell script , something like this :
vi check.sh
export ORACLE_SID=db1
sqlplus / as sysdba <<EOF
select query comes here;
exit;
EOF
export ORACLE_SID=db2
sqlplus / as sysdba <<EOF
select query comes here;
exit;
EOFchmod 777 check.sh
This does the job for you.. I am unsure how to pass the parameters in sql while running through a sheel script.. but if thats possible you will be able to achieve what you want.
Regards
Kk
Edited by: Kk on Jun 27, 2012 2:44 PM

Similar Messages

  • Can you run premiere pro on two different computers with the same log in?

    can I install and buy adobe premiere pro and run it on two different computers. Got a desktop at home that I work from and a laptop to bring to clients... So far my trial only want to work on one of the assets?? Many thanks

    Hi Dream5,
    Please check the below forum discussion.
    Creative Cloud multiple computers
    Also, check this link for more information and errors.
    Error "Activation limit reached" or "Sign in failed" | Adobe products
    Regards,
    Vinay

  • Same query giving different results

    Hi
    I m surprised to see the behaviour of oracle. I have two different sessions for same scheema on same server. In both sessions same query returns different results. The query involves some calculations like sum and divisions on number field.
    I have imported this data from another server using export / import utility available with 9i server. Before export every thing was going fine. Is there some problem with this utility.
    I m using Developer 6i as the front end for my client server application. The behaviour of my application is very surprizing as once it shows the correct data and if I close the screen and reopen, it shows wrong data.
    I m really stucked with the abnormal behaviour. Please tell me the possiblities and corrective action for these conditions.
    Regards
    Asad.

    There is nothing uncommitted in both the sessions. But still different results are returned.
    I m sending u the exact query and result returned in both sessions.
    Session 1:
    SQL> rollback;
    Rollback complete.
    SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
    2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
    3 WHERE G.COURSE_CDE=CC.COURSE_CDE
    4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
    5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
    6 /
    CREDIT_HRS GRADE_PTS
    3 4
    4 3.33
    4 3.33
    3 4
    3 4
    3 4
    3 4
    7 rows selected.
    SQL>
    SESSION 2:
    SQL> rollback;
    Rollback complete.
    SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
    2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
    3 WHERE G.COURSE_CDE=CC.COURSE_CDE
    4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
    5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
    6 /
    CREDIT_HRS GRADE_PTS
    3 4
    4 3.33
    3 4
    3 4
    3 4
    3 4
    6 rows selected.
    SQL>
    U can see in session 1, seven rows are returned while in session 2 six rows are returned. I have issued a rollback before query to be sure that data in both sessions is same.

  • Creating a Standby Database with the Same Directory Structure

    Hello gurus,
    I am self-learning the feature Oracle Data Guard, so I am testing it on Oracle 10g R2.
    At Oracle documentation there is a section F.4.: Creating a Standby Database with the Same Directory Structure*, that explains how to create a standby database with RMAN but there is something that I don´t understand:
    In the standby server, I created a database with the SID equal to production database* with the objetive to have the same directory structure, but when I try to startup nomount the standby database with pfile appear this expected error:
    ORA-16187: LOG_ARCHIVE_CONFIG contains duplicate, conflicting or invalid attributes
    So my question is: Is possible have the Same Directory Structure on both: Production and StandBy server?
    Thanks in advanced.

    Uwe and mseberg: thanks for your quick answers
    I have a doubt: How can you have the same directory structure if you have differents SIDs?, for example if you follow the OFA suggestions you would must have:
    On Production server: */u01/app/oracle/oradata/PRIMARY/system.dbf*
    On StandBy server: */u01/app/oracle/oradata/STANDBY/system.dbf*
    Or you created the directory structure manually on StandBy server? For example replacing the string STANDBY* to PRIMARY* before create the database using dbca.
    Do you understand my doubt? Excuse me for my english.
    Thanks.

  • Can you run multiple APEX listeners for different instances on the same server

    Please confirm that we can run multiple APEX listeners for different instances on the same server?  Is it an xml setup configuration or do we need to do more??
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

    Yes.. Just exactly what I was looking for...
    Thanks Jari!!
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

  • Data from different databases in the same report.

    Hi Everyone,
    I am trying to build a reconciliation report in which I need to show the data from the source and target, side by side.
    Source and target are both different databases, although being oracle only
    Whenever a new data model is created, it gets attached to a data source and in the report we need to choose a specific data model.
    Can we have data from different databases in the same report ?

    Yes, it is possible.
    One way Is to use dataTemplates. There you can make queries from any number of different databases (The max I have done is 5).
    It looks something like that:
    <dataTemplate name="NameOfTemplate">
    <dataQuery>
         <sqlStatement name="Q1" dataSourceRef="Connection1">
              <![CDATA[     select * from table1]]>
         </sqlStatement>
         <sqlStatement name="Q2" dataSourceRef="Connection2">
              <![CDATA[     select * from table2]]>
         </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="RESULT1" source="Q1">
              <element name="P_FIRST_NAME" value="P_FIRST_NAME"/>
         </group>
         <group name="RESULT2" source="Q2">
              <element name="P_DATE" value="P_DATE"/>     
         </group>
      </dataStructure>
    </dataTemplate>dataStructure is very important when you get data from different places, if you don't define those elements, then only the result from Q1 is shown.
    The second possible way is to make as two different data models, each containing their own query and then set Main Data Set as concatenated SQL Data Source.
    Best of luck,
    Evelyn

  • SQL Server wants to open properties of wrong database and cannot restore logs of different databases at the same time

    We have implemented our own way of logshipping by backing up the transaction logs of all our non-system databases every hour. Then we transfer the backups (before SQL Server 2008 R2 with additional zip and unzip steps) to the second environment where we
    restore them only during the night on databases in standby-state (Like this, our developers can access the databases without disturbing the productive system and we can restore the t-logs during night, so not shutting out the developers during the day).
    Now since we replaced our hardware in the productive environment, we replaced the hardware in the second environment with the servers from previous productive environment. Same SQL Server 2008 R2, same Service Pack (SP2), same installation procedure. But
    since then the SQL Server in the second environment behaves different:
    - When the logs of some database "A" are restored, I cannot access the properties of any database, i.e. database "B", I only get the error message "Cannot show requested dialog. (SqlMgmt) Database 'A' cannot be opened. It is in the
    middle of a restore. (Microsoft SQL Server, Error: 927)"
    - Our logshipping runs multiple instance at the same time, so restoring multiple databases' logs. But since the change, two of the instances fail restoring of datatbases, i.e. "B" and "C" with the error message "Database 'A' cannot
    be opened. It is in the middle of a restore.". The jobs guarantee to restore only logs of the database they need to restore, they have strictly separated sets of target databases and only try to restore the databases of their sets.
    Before the new installations, we did not have these strange behaviours. But as said, it is the same SQL Server version, the same service pack, and we followed the same installation document but maybe with the small changes in settings. The user the jobs
    are running under is a domain admin, the login they use has dbcreator, processadmin, db_owner and db_backupoperator roles. My login on the SQL Server has sysadmin rights and as described similar problems.
    Is this problem known or does somebody have an idea where to go looking for?
    Thanks, Chris

    Hi Christar,
    According to your description, after you configuring Log shipping between two database, you remove the hardware from production environment to dev environment, in this hardware, there are saved the transaction logs of your database.
     When restoring  your database, there will occurs error 927, right?
    SQL Server Log shipping allows you to automatically send transaction log backups from a
    primary database on a primary server instance to one or more
    secondary databases on separate secondary server instances. It consists of three operations:
    1.Back up the transaction log at the primary server instance.
    2.Copy the transaction log file to the secondary server instance.
    3.Restore the log backup on the secondary server instance.
    Since you want to move your hardware avoiding copy job, we need to verify if .mdf and .ldf file are not saved in your hardware, or else,
     if you move your hardware, you could not open your database in your Primary Server. I recommend you can refer to the following steps.
    Full back up your primary database and restore it into the secondary database. It would have been set up as WITH STANDBY ,the databases would read StandBy/ Read Only.
    Perform transaction log backups via a SQL Server Agent job running on the primary server instance, save them in your hardware.
    In night, you move hardware to your dev environment, you can manually restore these transaction log backups or set up a SQL Server Agent job to restoring them from your hardware.
    There is detail about how to configure log shipping in SQL Server 2008R2 step by step, you can review it.
    http://mostafaelmasry.wordpress.com/2013/01/02/log-shipping-in-sql-server-2008r2-step-by-step/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Hi! I can't upgrade my iTunes 10.3.1.55 on my Windows XP 2002 SP3 to the latest version of iTunes. Got the message: "A problem has occured with the Windows Installer-package. A program needed for this installation could not be run." What to do?

    Hi! I can't upgrade my iTunes 10.3.1.55 on my Windows XP 2002 SP3 to the latest version of iTunes. Got the message: "A problem has occured with the Windows Installer-package. A program needed for this installation could not be run." What to do?

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Publish two publications from different customers with the same Adobe DPS ID

    Hello:
    I have a publication made on InDesign and I have uploaded it to the Adobe Server with my Adobe DPS account. For the first publication, I published the publication with the Folio Producer on the digitalpublishing portal, and then I created the app using the Adobe Viewer Builder. Then, I tried it locally on my iPad. It was working fine and I could see my publication.
    Now, I do need to upload a new publication for a different customer with the same Adobe DPS account and I need to create a different app with the new customer look and feel but I don't want to show the first publication in this new app, only the last one.
    In a nushell, I need to keep separated two publications (or more) when they are published if I'm using the same DPS Account... Is that possible?
    Saludos Cordiales,

    Hi Leo,
    Every title should have its own publication AdobeID (a title can contain multiple editions / folios).
    So you have to request for every title you want to work on a provisioned account with Adobe. Make sure that you have setup the corresponding emailaddress / emailalias. For example [email protected] and [email protected]
    After the accounts have been provisioned you can:
    * upload and organize multiple folios for that publication in the corresponding Folio Producer
    * Create a viewer with your Viewer Builder and on the first page supply the AdobeID for the give publication
    You can request new publication accounts any time and these are included with your DPS subscription.
    When you first account got provisioned, you should have received an excel document to request provisioning for the various publications. In this document you can list the accounts you want to use for publications, individual users of the system and viewer builder access.
    With kind regards,
    Klaasjan Tukker
    Adobe Systems Benelux

  • How to force OSX to connect to a specific Access Point i.e. manually choosing beetween different APs with the same SSID?

    My office room is near different APs with the same SSID, my Snow Leopard selects automatically to join the AP with stronger signal.
    But this AP isn't running well, so I want to force my mac to join a AP with weaker signal.
    (I've the same troubel as described in https://discussions.apple.com/message/6470508#6470508)
    Note that I'm a guest user and I hanen't access to APs, so I cannot change their SSID.
    Any idea how to force Mac to join a specific AP?
    Thanks,
    adso

    My office room is near different APs with the same SSID, my Snow Leopard selects automatically to join the AP with stronger signal.
    But this AP isn't running well, so I want to force my mac to join a AP with weaker signal.
    (I've the same troubel as described in https://discussions.apple.com/message/6470508#6470508)
    Note that I'm a guest user and I hanen't access to APs, so I cannot change their SSID.
    Any idea how to force Mac to join a specific AP?
    Thanks,
    adso

  • My iPhone is merging different contacts with the same firstname into one contact. How can i resolve this.

    My Bosses iPhone is merging different contacts with the same firstname into one contact. How can i resolve this? He seems very disturbed and thinks i don't know what i'm doing. I've set up all his devices to sync across and now its messed up on his iPad, and two iPhones.
    E.G Contacts with firstname 'Adams' and different numbers are synced into one account.
    Now i have no clue how many contacts are this way cos he has a huge number of contacts (he's the ceo).
    Please i need a suggestion on how to fix this.
    Thanks for the help.

    Janie Mac wrote:
    Cannot find settings to then go to general then about.
    How do I edit the device in iTunes?
    Double-click on the name.
    My screen shot shows both devices because I sync wirelessly.  Right now I can change the iPod name but not the iPad name because the iPod is idle while the iPad is syncing.  In another minute or two, I'll be able to change the iPad name.

  • About listeners for different databases in the same ORACLE_HOME

    Hello experts, I have a doubt
    I have installed 3 different databases in the same server which OS is Suse Enterprise 10. At this moment I have just one listener that registers all the services. The number of connections are big for two of the three databases so I do not know what might be the best practices for this environment. I have some question I would like you suggestion for me:
    DB version: 11.1.0.7
    Should I have three listener, one for each database?
    Is a good practice to have only one listener for multiple instances in the same server?
    Are there differents between have only one listener for all the instance and have one listener for instance?
    What about the performance?
    Than you in advance, I hope you can guide me.

    Best practice is not to have multiple databases on one server, depending on resources.
    Should I have three listener, one for each database?
    No. That is pretty undesirable and requires more administration.
    Is a good practice to have only one listener for multiple instances in the same server?
    Yes. Remember the listener is only a broker and there are no permanent connections between client, listener and database.
    Are there differents between have only one listener for all the instance and have one listener for instance?
    Yes. The latter is an administration nightmare.
    What about the performance?
    Who cares? The only factors are
    listener.log becomes too big --> set up proper cleanup procedures
    The number of semaphores is exceeded (Unix) or no more threads can be created (Microsoft winblows), which will give rise to ora-12500.
    Sybrand Bakker
    Senior Oracle DBA

  • How to download the same song(track) with different keys? iTunes seems to think I have already downloaded the song and will not download the song in a different key of the Demo Track

    How to download the same song(track) with different keys? iTunes seems to think I have already dowloaded the song and will not let me download the song in a different key or the Demo.

    Hello Jigz19,
    It sounds like you are unable to play a couple of songs from your library becuase you get a message that the computer is unauthorized to play, but other content purchased that same day works without issue. I would verify that the affected songs were purchased with the same Apple ID first:
    Recovering a forgotten iTunes Store account name
    http://support.apple.com/kb/ht1920
    Open iTunes
    Highlight one of the items you have purchased (You can find your purchases in your Purchases playlist).
    Choose File > Get Info.
    Click the Summary tab.
    The Account Name area will list the account used to purchase the item. Unless you have changed accounts, this is your iTunes Store account name.
    If so, then delete the songs:
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/kb/HT5772
    Then re download them with this article:
    Download past purchases
    http://support.apple.com/kb/ht2519
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • When I download the CC suite will it clash with the CS6 trial version I currently have running. Do I need to uninstall it first? I am running OSx Mavericks

    when I download the CC suite will it clash with the CS6 trial version I currently have running. Do I need to uninstall it first? I am running OSx Mavericks

    Thanks Mylenium. As you may gather I am new to all this!
    Jerry

  • How can I match the line thicknesses in different sizes of the same font?

    I'm working on a graphic that includes a handwriting font, and I'd like some text to be larger than others. The obvious issue is that when I make the font larger, the lines also get thicker. Has anyone found a good solution for this problem, other than limiting the design options to large font families with lots of weights? I do employee communications design work for a call center, so purchasing a big font set for internal communications isn't an option.
    I've tried to "hide" some of the larger text's thickness by adding a white stroke to it, or by hiding the font edges with a mask, and I've also tried artificially "bolding" or adding a stroke to the smaller text. They all result in noticably distorted text, particularly around corners, and the results are particularly horrible when using something with texture, like a chalkboard font. I haven't had any better luck in Illustrator, either.
    I'm sure I'm not the only one out there who wants to simulate the look of one person writing in different sizes with the same writing utensil. Beyond writing it myself (my handwriting is ugly), can you think of any solutions I haven't tried?
    Thanks in advance!
    Paula

    Thanks, I'll try the Min/Max and see if that works any better. The final output in this case is pixel based, for use in PowerPoint and in email headers. I often do my text work in Illustrator, but in this case I was trying to simulate writing on a chalkboard, so I started in Photoshop so I could see how it looked against the background as I worked. I actually face this challenge fairly frequently, though.
    The team I design for is virtual, with over 700 people spread across the US and up into Canada. For that reason, I like to use the "hand drawn" look on occasion to bring some warmth and personal touch to the communications, to contrast with all the super-polished "high gloss" graphics they look at all day in their work tools. It's a real challenge to find text and artwork that matches well once scaled to fit my documents, especially since most of the vector-based artwork I find online has already been converted to outlines, so it doesn't retain the same stroke thickness when the images are scaled.
    If anyone out there knows of an illustrator who doesn't convert their sketch-style graphics or fonts/typography to outlines before putting it up for use, either on Shutterstock or on any free site (since those are the ones I can use) I'd love to hear about it!

Maybe you are looking for