Running a oracle script for multible database on same server

Hello friends
I am thinking of creating a script in HP UX which will run a SQL script on multiple oracle in same server. I can do this for one oracle but i'm unable to do it for multiple database.
I need to do newid oraSID user every time for diff. database .. can u suggest something..
regards
Ashish

Hi Markus,
Its not working .. When i run this script from my ID, it says SQLPLUS not found. see this .. i have created 1 sql file and 1 script file to call it with exporting ORACLE_HOME & ORACE_SID for one of the system E40.
Can you suggest something ..
er3asu82:(/tmp)(xchason)#ll /tmp/testsql.sql /tmp/testscr.dat
-rwxrwxrwx   1 xchason    dba            109 Aug  9 11:10 /tmp/testscr.dat
-rwxrwxrwx   1 xchason    dba             32 Aug  9 11:08 /tmp/testsql.sql
er3asu82:(/tmp)(xchason)#cat /tmp/testsql.sql
select * from v$instance;
quit
er3asu82:(/tmp)(xchason)#cat /tmp/testscr.dat
#! /bin/ksh
export ORACLE_HOME=/oracle/E40/102_64
export ORACE_SID=E40
sqlplus "/as sysdba" @testsql.sql
er3asu82:(/tmp)(xchason)#/tmp/testscr.dat
/tmp/testscr.dat[5]: sqlplus:  not found
Again when i try to run this from other orasid, it does not work as well..
er3asu82:oraq52 1> /tmp/testscr.dat
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
thanks
ashish

Similar Messages

  • Developer 2000 forms for95/NT won't link my oracle 8i for 98 database, Y?

    hello world,
    It is better to create a sequence of primary keys on a table for
    eventually use for building forms and does it really not matter.
    Secondly, i have oracle8i Personal edition installed in my
    orahome8i area and also did managed to install Developer 2000
    in this same home area but would not run.
    As I could notice, does it really matter if I have installed
    developer 2000 with an older version of SQLplus and whenever i
    try to log into my 8i database, it comes up with a TNS bla bla
    bla not found.
    How do i go about getting my Developer 2000 for win95/NT to hook
    up to an entirely differently installed oracle 8i for win98
    database.
    I have tried removing the key from the registry and deleting
    some bits of my autoexec.bat file but still to no avail.
    Will i be able to download a compatible version or is it just
    about me.
    much appreciation.
    Ayo show

    My guess would be that you still have some remnants of your old "personal" installation, and your new Enterprise installation of 9i is finding the DLL from the old installation.
    Make sure you un-install the old Oracle installation first, and delete all oracle directories for good measure.

  • Alter table script for wrong database version

    When we generate an alter table script by connecting to a database, the scripts that get generated are for database version 7.3.
    Furthermore we cannot update the field "oracle version" for the database we created.
    When we choose a database version from the pulldown box and try to save it, the field is blank again.
    We are on Designer 9 on a oracle 10g database and we try to alter the table in a oracle 10g database.

    I had this error last night while applying a patch to 6.0. However in my case the version was 21 versus a required version of 23.
    As far as i know 6.1 is not compatible with the 5 db schema, so you will need an update / migration plan for the db also.

  • I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes:Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufac

    I am trying to update my iTunes to 10.5.1 so that I can upgrade my 3GS phone but am getting the following error message when trying to install the itunes: Install step failed: Run pre upgrade script for apple mobile device support. Contact software manufacturer for assistance. I am on a MacBook pro running 10.5.8 OS. Has anyone seen this before and how can I get it resolved.
    Thanks for your help in advance....

    Did you ever figure out the problem? "Contact Software Manufacturer"?? That sounds ominous... I've got the same issue and I'm pretty durn aggravated right about now....
    Thanks!

  • I'm not able to upgrade my Mac to itunes 10.5. Keep getting message "Run pre upgrade script for apple mobile device support" any help please?

    Hi I'm not able to upgrade my Mac OS X 10.5.8 to itunes 10.5 Keep getting message "the following install failed. run pre upgrade script for apple mobile device support" contact software manufacture for assistance. any help please?

    Did you ever figure out the problem? "Contact Software Manufacturer"?? That sounds ominous... I've got the same issue and I'm pretty durn aggravated right about now....
    Thanks!

  • I have tried to upgrade Painter 11 on my iMac running OS X 10.5.8. I keep getting the error message :- : The following install step failed : run pre install script for Corel Painter11 _ SP1 . Contact the software manufacturer for assistance   " Help pleas

    I have tried to upgrade Painter 11 on my iMac running OS x 10.5.8 but get the error message : The following install step failed : run pre install script for Corel Painter11_SP1. Contact the software manufacturer for assistance "
    I have contacted Corel and after several emails and one telephone call, they tell me , they cannot help but they think the problem could be with the OS.
    Does anyone have any suggestions, please ?

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • How to run an Oracle Script File

    Hi,
    Please anybody tell me how to run an Oracle script file (*.sql file) from Query template.
    In SQL*Plus we run a script file as @Script_file_name.sql
    how do we do it in Query Template.

    Dave,
    Please only post your question in one thread at a time....
    [SAP xMII synchronus commincation|SAP xMII synchronus commincation]
    Sam

  • Is database link only 'valid' for instances in the same server?

    Background: We have 5 servers and installed Oracle 7.3 and 8.
    Problem: I managed to create database link to other instance in same server; but not to other server. Error message received was :
    ORA-02019: connection description for remote database not found
    : TNS server name not found
    BUT: I managed it with 'copy from ' command in SQL*plus.
    Question: Is database link only 'valid' for instances in the same server?
    Thanks! ;o)

    user10127912 wrote:
    Hi,
    We are planning to install second instance of Oracle 11gR2 in Linux server 2.6.39-400.21.1.el6uek.x86_64 x86_64. This is something we never haven done before. If you have such experience, please give us some insight.
    The existing instance has all the standard ports:
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    Enterprise Manager Console HTTP Port (pterpdb02) = 1158
    Enterprise Manager Agent Port (pterpdb02) = 3938
    What ports should we select for second listener and enterprise manager? Is there anything else that we need to know before we install the second instance?If you want a second database instance, no additional installation is required - as long as you want to run the second instance at the same version as the the first. Just fire up dbca and create the second database. One installation of Oracle (one ORACLE_HOME) is capable of supporting many database instances, though the same may or may not be said of the hardware it is running on.
    As already said, one listener is enough. One listener, running from one oracle home, using the default name of LISTENER, running on the defualt port of 1521, is quite capable of -- indeed, WAS DESIGNED TO, supporte multiple database instances of multiple versions running from multiple ORACLE_HOMEs.
    One instance of dbcontrol/dbconsole will support only one database. If you do not use Grid Control (extra installation, extra license) you will need to use the emca utility or one of the options in the dbca utility to configure a seperate instance of dbcontrol for each database. Don't worry about the ports, the creation utility will take care of it and report what it does.

  • Can we run 11g RAC and 12c RAC in the same server?

    There is a requirement to run 11g RAC and 12C RAC in the same server for a year or so and then remove 11g RAC?
    Current setup:
    HP-unix 3 node RAC on 11g R2
    4CPU
    64 GB RAM
    3 TB SAN storage
    no ASM
    Upgrade setup:
    HP-unix 3 node RAC on 12C RAC
    8CPU
    128 GB RAM
    6+ TB SAN storage
    ASM
    We are asked to use the same server and upgrade Hardware to install and run 12C RAC. What are the implications of running RAC in the same server/nodes?
    Thank you for your time!

    Hi,
    The following table shows you the compatibility between various versions:
    Clusterware
    ASM
    DB
    Certified
    12.1
    12.1
    12.1
    Y
    12.1
    12.1
    11.2(a)
    Y
    12.1
    12.1
    11.1(a)
    Y
    12.1
    12.1
    10.2(a)
    Y
    11.2
    11.2(b)
    11.2
    Y
    11.2
    11.2(b)
    11.1
    Y
    11.2
    11.2(b)
    10.2
    Y
    11.1
    11.1
    11.1(c)
    Y
    11.1
    11.1
    10.2
    Y
    11.1
    11.1
    10.1
    Y
    11.1
    10.2
    11.1
    Y
    11.1
    10.2
    10.2
    Y
    11.1
    10.2
    10.1
    Y
    11.1
    10.1(d)
    11.1
    Y
    11.1
    10.1(d)
    10.2
    Y
    11.1
    10.1
    10.1
    Y
    10.2
    10.2
    10.2
    Y
    10.2
    10.2
    10.1
    Y
    10.2
    10.1(d)
    10.2
    Y
    10.2
    10.1
    10.1
    Y
    10.1
    10.1
    10.1
    Y
    (a) Pre-12.1 database instances require an ASM instance resident on the same node as the database instance. Pre-12.1 database instances cannot leverage the implicit HA of Flex ASM.
    Oracle Clusterware (CRS/GI) - ASM - Database Version Compatibility (Doc ID 337737.1)

  • Can we create standby database on same server as primary database

    I have Oracle 10g Rel2, OS Windows server 2003. Can I create standby database on same server on which we have our primary database?

    Bharat Kaushik wrote:
    I have VMware server s/w, do i need to create 2 virtual machines inside the one installation of VMware server? Or do i need to have 2 different installation of VMware server?You could think of VMWare Server in similar terms are Oracle Database Server.
    The HOME: The VMWare Server s/w is put into a "VMWare Home" (I use VMWare Workstation, it goes into C:\Program Files\VMware\VMware Workstation)
    The INSTANCE: WHen I create a VM Image, I specify the name (like a SID), configuration (like PFILE), and location (like ORACLE_BASE/oradata/ ...)
    And just like Oracle with which I can have 2 or more instances running on the host (if there is sufficient memory and other resource), I can have 2 or more VM Images running on my host.
    And just like Oracle, if I have insufficient resources, things get slow like molasses in the middle of winter.
    Hope your desktop has at least 4GB of OS-addressible RAM and at least dual-core CPU. ALternately ... I hope you have lots of coin for the coffee machine.

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Do we need run catbundle.sql file for new databases.

    dear all,
    i have doubt over execution of catbundle.sql or not?
    scenario:
    i have insatlled 10gr2 on rhel5 and applied patchset 4 (10.2.0.5) and applied Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update
    after this i have create fresh database.
    now,
    in Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update document it has specified in belwo section
    3.4 Post Installation Instructions for Databases Created or Upgraded after Installation of PSU 10.2.0.5.2 in the Oracle Home
    These instructions are for a database that is created or upgraded after the installation of PSU 10.2.0.5.2.
    You must execute the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" for any new database only if it was created by any of the following methods:
    Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
    Using a script that was created by DBCA that creates a database from a sample database
    Cloning a database that was created by either of the two preceding methods, and if the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" were not executed after PSU 10.2.0.5.2 was applied
    Upgraded databases do not require any post-installation steps.
    so do we need to run catbundle here or not.
    since i have created fresh database after applying 10.2.0.5 PSU2 why does it required.
    opatch output:
    [oracle@RG615 ~]$ opatch lsinventory
    Invoking OPatch 10.2.0.5.1
    Oracle Interim Patch Installer version 10.2.0.5.1
    Copyright (c) 2010, Oracle Corporation. All rights reserved.
    Oracle Home : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1
    Central Inventory : /prd/crm/swbcrmdb/usr/oracle/oraInventory
    from : /etc/oraInst.loc
    OPatch version : 10.2.0.5.1
    OUI version : 10.2.0.5.0
    OUI location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/oui
    Log file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-05-03_11-41-34AM.log
    Patch history file: /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
    Lsinventory Output file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-05-03_11-41-34AM.txt
    Installed Top-level Products (2):
    Oracle Database 10g 10.2.0.1.0
    Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
    There are 2 products installed in this Oracle Home.
    Interim patches (1) :
    Patch 10248542 : applied on Tue May 03 07:32:29 BST 2011
    Unique Patch ID: 13292123
    Created on 25 Dec 2010, 23:11:24 hrs PST8PDT
    Bugs fixed:
    6402302, 9713537, 8350262, 9949948, 8394351, 10327179, 8546356, 9711859
    9714832, 9952230, 10248542, 8544696, 9963497, 9772888, 8664189, 10249537
    7519406, 9952270, 8277300, 9726739
    OPatch succeeded.

    Pl post the output of view DBA_REGISTRY_HISTORY - see MOS Doc 605795.1 (Introduction To Oracle Database catbundle.sql)
    Was the database created using DBCA or manually using scripts ?
    Srini

  • How to open oracle listner for three database instances

    please help me with following questions
    I have 3 database instances
    orcl
    JIP02T
    JIP04T
    when i start the oracle database, does it start all 3 instances? when i start the oracle listner, does it start listner for all 3 instances?
    when i echo $ORACLE_SID
    [ora112@localhost admin]$ echo $ORACLE_SID
    orcl
    i can only see orcl and oracle listner is started only for one database instance.i can connect to only one database instance usign sql developer how can i start oracle database listner for other database instances as well

    ShishirTekadeR wrote:
    . oraenv
    Note that is "dot" SPACE oraenv
    You will be prompted for the value of ORACLE_SID (one of the databases). It looks like this:
    oracle:orcl$ . oraenv
    ORACLE_SID = [orcl] ? dwsbx
    The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
    oracle:dwsbx$
    HIGHLY APPRECIATED U R IMP Tips!!!!!
    But it’s very difficult to remember & manually enter oracle SID & HOME details every time after run (. Oraenv)
    .profile creation is simple method and no need to remember SID & HOME details.(for multiple DB in one server)You don't have to "remember & manually enter oracle SID & HOME details every time after run " oraenv sets all those details for you. All you have to remember is the name of the instance you want to work with. The same thing you'd have to remember if you if you created (as you suggested) three different "profiles" - actually three different shell scripts, each to set the environment for a specific instance.
    Yes, I do place "default" settings in .bash_profile. But with multiple databases the "default" settings are often not going to be what you need so you'll still have to run some process to change them. Either a home-grown script or oraenv. And either way you will have to remember the names of the instances you have to chose from. So in general I see no advantage of reinventing the wheel.
    >
    >
    >
    As per user information
    He is using different port number for different instanceWhich accomplishes absolutely nothing except extra configuration headaches. It accomplishes nothing for security. It accomplishes nothing for availability.
    And also it is very simple method to manage three different DB in three different listener entry (for DB maintenance activity.)Not as easy as managing one default listener. By far the most frequent listener configuration issue I see on this forum is when people try to configure one listener per database.
    Single listener in multiple instance (if listener down all DB connection will affect)And why would the listener be down? I've been working full time with Oracle since version 7.3 - somewhere around 1995. I've NEVER seen a listener fall over and die. I have seen many people on this forum whose db connections failed because they were trying (unsucessfully) to configure multiple listeners.
    All of my servers are running multiple databases. I have one test server that is running close to a dozen separate databases. One listener. I've NEVER had a situation where I thought to myself, "Gee, it would really help if I had created a separate server for each database"
    >
    >
    Best Regards,
    Shishir Tekade.
    My Blog: http://shishirtekade.blogspot.com
    Edited by: ShishirTekadeR on Dec 27, 2012 10:29 PM
    Edited by: ShishirTekadeR on Dec 27, 2012 10:30 PM
    Edited by: ShishirTekadeR on Dec 27, 2012 10:31 PM

  • Oracle scripts for manual installation

    I am planning to install the Oracle 10g Release 2 and upgrade to 10.2.0.4 in silent mode. After that I create a database using a script. Since many utilities are not available by default, I run the following scripts manually. I won't use advanced feature like RAC, ASM, OLAP, Partitioning.
    login with sys
    $ORACLE_HOME/rdbms/admin/standard.sql
    $ORACLE_HOME/rdbms/admin/catalog.sql
    $ORACLE_HOME/rdbms/admin/catproc.sql
    $ORACLE_HOME/rdbms/admin/catrep.sql
    $ORACLE_HOME/rdbms/admin/catexp.sql
    $ORACLE_HOME/rdbms/admin/catldr.sql
    $ORACLE_HOME/rdbms/admin/catblock.sql
    $ORACLE_HOME/rdbms/admin/utllockt.sql
    $ORACLE_HOME/rdbms/admin/utlrp.sql
    login with system
    $ORACLE_HOME/sqlplus/admin/pupbld.sql
    Are these scripts enough for general use?
    If I run utlxplan.sql in either sys or system account, how can ordinary users access the explain plan table?
    Thanks!

    These files are enough for getting the basic database running.
    If I run utlxplan.sql in either sys or system account, how can ordinary users access the explain plan table?Grant rights on this table to PUBLIC, as it is generally done. Else, you can have a plan_table per schema.

  • Sql Server Management Assistant (SSMA) Oracle okay for large database migrations?

    All:
    We don't have much experience with the SSMA (Oracle) tool and need some advice from those of you familiar with it.  We must migrate an Oracle 11.2.0.3.0 database to SQL Server 2014.  The Oracle database consists of approximately 25,000 tables and 30,000
    views and related indices.  The database is approximately 2.3 TB in size.
    Is this do-able using the latest version of SSMA-Oracle?  If so, how much horsepower would you throw at this to get it done?
    Any other gotchas and advice appreciated.
    Kindest Regards,
    Bill
    Bill Davidson

    Hi
    Bill,
    SSMA supports migrating large database of Oracle. To migrate Oracle database to SQL Server 2014, you could use the latest version:
    Microsoft SQL Server Migration Assistant v6.0 for Oracle. Before the migration, you should pay attention to the points below.
    1.The account that is used to connect to the Oracle database must have at least CONNECT permissions. This enables SSMA to obtain metadata from schemas owned by the connecting user. To obtain metadata for objects in other schemas and then convert objects
    in those schemas, the account must have the following permissions: CREATE ANY PROCEDURE, EXECUTE ANY PROCEDURE, SELECT ANY TABLE, SELECT ANY SEQUENCE, CREATE ANY TYPE, CREATE ANY TRIGGER, SELECT ANY DICTIONARY.
    2.Metadata about the Oracle database is not automatically refreshed. The metadata in Oracle Metadata Explorer is a snapshot of the metadata when you first connected, or the last time that you manually refreshed metadata. You can manually update metadata
    for all schemas, a single schema, or individual database objects. For more information about the process, please refer to the similar article: 
    https://msdn.microsoft.com/en-us/library/hh313203(v=sql.110).
    3.The account that is used to connect to SQL Server requires different permissions depending on the actions that the account performs as the following:
     • To convert Oracle objects to Transact-SQL syntax, to update metadata from SQL Server, or to save converted syntax to scripts, the account must have permission to log on to the instance of SQL Server.
     • To load database objects into SQL Server, the account must be a member of the sysadmin server role. This is required to install CLR assemblies.
     • To migrate data to SQL Server, the account must be a member of the sysadmin server role. This is required to run the SQL Server Agent data migration packages.
     • To run the code that is generated by SSMA, the account must have Execute permissions for all user-defined functions in the ssma_oracle schema of the target database. These functions provide equivalent functionality of Oracle system functions, and
    are used by converted objects.
     • If the account that is used to connect to SQL Server is to perform all migration tasks, the account must be a member of the sysadmin server role.
    For more information about the process, please refer to the  similar article: 
    https://msdn.microsoft.com/en-us/library/hh313158(v=sql.110)
    4.Metadata about SQL Server databases is not automatically updated. The metadata in SQL Server Metadata Explorer is a snapshot of the metadata when you first connected to SQL Server, or the last time that you manually updated metadata. You can manually update
    metadata for all databases, or for any single database or database object.
    5.If the engine being used is Server Side Data Migration Engine, then, before you can migrate data, you must install the SSMA for Oracle Extension Pack and the Oracle providers on the computer that is running SSMA. The SQL Server Agent service must also
    be running. For more information about how to install the extension pack, see Installing Server Components (OracleToSQL). And when SQL Express edition is used as the target database, only client side data migration is allowed and server side data migration
    is not supported. For more information about the process, please refer to the  similar article: 
    https://msdn.microsoft.com/en-us/library/hh313202(v=sql.110)
    For how to migrate Oracle Databases to SQL Server, please refer to the  similar article: 
    https://msdn.microsoft.com/en-us/library/hh313159(v=sql.110).aspx
    Regards,
    Michelle Li

Maybe you are looking for

  • BT Infinity issues and only been with them since 4...

    I have been so looking forward to faster broadband, religously checking the availability of infinity for my area for months and eventually hey-ho here it is. After having a HH3 on BT BB for years and not a single issue I thought awesome same reliabil

  • Why am I directed to a MobileMe sign-in page when I try to publish iWeb

    I can not publish a site because I get caught up in an endless loop asking me to sign-in. It gives me three options: Sign in; No thanks and Learn More. Jumping through all the hoops makes no difference, I still can not publish. What am I doing wrong?

  • How to merge documents in Pages

    Hi, My question is how do you merge documents the way you do in Microsoft Word 2008. I have two pages document I want to merge together without having to do it manually through copy and paste. I assume if there is way to merge documents in pages I co

  • Buying macbook and a printer

    So, Apple is making this special offer that when you buy a mac and a printer at the same time, you get up to $100 back via rebate. And I saw this printer that costs $99.95 (Epson Stylus Nx420). So, I'd like to know that if I buy mac + epson printer,

  • - How to Check Exchange Rate History -

    Hi, Is anybody knows the name of the "exchange rate history table", for I would like to check which user have modify the rate, in which I can't check it in change log. Thanks for your help and time. Cheers, serene