Create a database based on a current database

I have a 9.2.0.6 database on server test. I copied everything to server test1.
I used backup control file to trace on test. I put this backup control file to test1 and modified the file locations and want to recreat a database on server test1. What's the steps of doing this?
Thanks!

I couldn't shutdown the database because the source
database is a production database.
I have my testing database created. Now my questions
is: How can I know which log file has a particular
log sequence number?
Thanks!If you didn't shutdown your production database how did you obtain the copy of your datafiles? Did you put tablespace in backup mode before copy?
check v$log_history for logfile and log sequence relation. since you are doing this copy in a relatively short period of time, the log sequence needed is more likely to be in one of online redo logfile groups.

Similar Messages

  • Creating a hierarchy based on a remote database link

    I am trying to create a hierarchy based on a synonym for a remote database table. The hierarchy wizard works correctly, and the table columns do appear as choices in the drop boxes. However, when I try to run the application, I get the error "No data found. This data does not exist or you do not have privileges to view it". Does anyone know how to resolve this error? Or how to work around this?
    I can successfully create and query a form based on the remote table. And, I am able to create a hierarchy from other tables (which do not use a database link) without a problem.
    Thanks for your help!

    This is the query which I am using to build a report
    SELECT
    rollup_timestamp "Date",
    max(decode(target_guid,'199F0B201A3D71A63040BADFAA4F9E90',average,0)) host1,
    max(decode(target_guid,'3FB1329F59339C07E11304B69DC4E594',average,0)) host2
    FROM "sysman.MGMT$METRIC_DAILY"
    WHERE
    (target_guid='199F0B201A3D71A63040BADFAA4F9E90'
    or
    target_guid='3FB1329F59339C07E11304B69DC4E594')
    AND
    metric_name='Load'
    AND
    metric_column='memUsedPct'
    AND
    rollup_timestamp >= to_date('01-10-2009','dd-mm-yyyy') and rollup_timestamp <= sysdate
    GROUP BY rollup_timestamp
    ORDER BY "Date"
    And for your previous question I couldn't even create a page.
    Regards
    Balaji
    Edited by: user7290747 on 6/01/2010 16:17

  • APEX  How do I create a Form based on a Database Table from other schema

    My APEX schema is WISEXP. I have a database table that resides in WISDW schema on the same database. I want to create Tabular form based on this table.
    I am not able to create a FORM based on the table from WISDW schema. I am able to create a FORM based on SQL though from this table in WISDW schema - but it does not do any action on Update/Insert rows.
    Appropriate Synonyms and grants are created. Is there a limitation or am I missing something? Please advise.
    thanks
    Rupen

    If Rupen is using 2.2 or 2.2.1, it is likely he is running into the bug described here: Re: Workspace to Schema Assignments
    In that case, it may be a necessary and sufficient workaround to assign the foreign schema to the workspace.
    Scott
    Message was edited by:
    sspadafo

  • Is it possible to create a database of all my ipad apps that are currently on my Apple ID with out manually typing in the data?

    I would like to find a way to create a database of all the apps I have downloaded.  Would anyone know a way to take the information in an Apple account and place it into a database?

    Could see what Meraki will do.
    Meraki -- A free MDM
      http://www.meraki.com/products/systems-manager/
      https://discussions.apple.com/thread/4067210?tstart=0

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to create a database using Java?

    Hi there..
    I'm a student who is currently studying IT and was asked to do a project based on database but create using Java.. since i'm a beginner..i was wondering whether is it possible to do that?
    and if it is possible.. can you kindly show me a sample of code on how to start the project...
    thank you
    yours sincerely,
    Shafini

    While duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
    See http://hsqldb.org/
    I've not used it yet (but soon though), and I can't really advise anyone about it.
    However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing.

  • How to create a database for sample code from Tutorial/Book?

    I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
    I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
    I'm feeling overwhelmed with these links describing how to create a database:
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    (1) What is the command to list the existing databases?
    (2) What is the command to delete an existing database?
    (3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
    Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
    (4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
    (5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
    (6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
    Thanks
    Siegfried
    Edited by: user8816970 on Sep 26, 2012 12:01 PM
    Edited by: user8816970 on Sep 26, 2012 12:18 PM

    user8816970 wrote:
    Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
    Thanks!
    Siegfried
    >Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    above does NOT use SQL*Net to connect to the instance
    >
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
    >
    Thanks!
    Siegfrieda database in SQL Server is same as schema/user in Oracle

  • How can I create a database from a sharepoint using entity framework

    Hello All,
    I want to develop a data base from SharePoint list independently. The column name are based on a SharePoint list eg: Contact-list (will be having 10 columns)
    can any one please suggest me an idea on how to do this task? Which Visual Studio template is suitable for this purpose?
    I confused with starting with following Visual studio template!!!
    Empty SharePoint Project??, Business Data Connectivity Model??, ASP.Net Web application??
    Somebody please help me soon....
    I am using SharePoint 2010 and Visual Studio 2010

    Hey,
    basically you should start with an empty SharePoint 2010 project where you add an List-EventReceiver. This Receiver should point to the url of the list and handle the ItemAdded-Event. In this method you place the code to create the database, for example
    with a SQL-Statement.

  • SSMS crash when creating new database diagram

    For several years I have been unable to create database diagrams from within SSMS.  I have tried every combination of VS2005, VS2008, VS2012 and VS2013 with every combination of SQL2005, SQL2008, SQL2012 and SQL2014.
    I have installed, uninstalled, and repaired many dozens of times.  I am currently using VS2013 ultimate with SQL2014 express.
    I have tried every related 'workaround' that I can find on the internet.  Still the problem persists.
    Any help would be deeply appreciated.
    Here are the relevant details with file versions:
    In SSMS, I right-click on a database and choose New Database Diagram.  A Blank diagram window appears with the SSMS error dialog:
    ===================================
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)
    Program Location:
       at Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
       at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
       at Microsoft.Internal.VisualStudio.Shell.Interop.IVsTrackSelectionExPrivate.Register()
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConnectSelectionContext()
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Activate()
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.viewManager_ActiveViewChanged(Object sender, ActiveViewChangedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.VisualStudio.PlatformUI.ExtensionMethods.RaiseEvent[TEventArgs](EventHandler`1 eventHandler, Object source, TEventArgs args)
       at Microsoft.VisualStudio.PlatformUI.Shell.ViewManager.SetActiveView(View view, ActivationType type)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ShowInternal(ShowFlags showFlags)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<Show>b__26()
       at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Show()
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.MarshalingWindowFrame.<Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame.Show>b__7a()
       at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.MarshalingWindowFrame.Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame.Show()
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con, String fileName)
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection
    con, String fileName)
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con, String fileName)
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options)
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.InvokeDesigner(IManagedConnection connection)
       at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.Invoke()
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)
    Version info taken from Sql Server  Management Studio/Help/About dialog:
    Microsoft SQL Server Management Studio      12.0.2000.8
    Microsoft Analysis Services Client Tools    12.0.2000.8
    Microsoft Data Access Components (MDAC)     6.1.7601.17514
    Microsoft MSXML                             3.0 4.0 5.0 6.0
    Microsoft Internet Explorer                 9.11.9600.17358
    Microsoft .NET Framework                    4.0.30319.18444
    Operating System                            6.1.7601
    DLL versions
    c:\Program Files(x86)\Common Files\microsoft shared\Visual Database Tools
    dsref80.dll  version 12.0.21005.1
    c:\Program Files(x86)\Common Files\microsoft shared\MSDesigners8
    msdds.dll    12.0.21005.1
    msddsf.dll   12.0.21005.1
    msddslm.dll  12.0.21005.1
    msdds.mp.dll 12.0.21005.1
    msddsp.dll   12.0.21005.1
    c:\Program Files(x86)\Common Files\microsoft shared\MSDesigners8\Resources\1033
    msddsui.dll 12.0.21005.1

    Hello,
    There is a Connect item related to this issue. This is the link of that Connect item:
    https://connect.microsoft.com/SQLServer/feedback/details/730985/smss-crashes-when-creating-new-database-diagram
    Try the workarounds posted there (Workarounds section).
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Error while creating a database

    Hi.
    I am using the Oracle Database Configuration Assistant to create a database.
    It gives me an error Listener start failed, maybe already running.
    Later gives a message Listener configuration complete.
    The listener if it was running also it automatically goes down after this.
    I can see the database but not able to enter it or use it.
    The following is an extract from my Listener.log file.
    TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production on 29-JAN-2010 19:51:12
    Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
    System parameter file is D:\oracle\NTAMLT99\network\admin\listener.ora
    Log messages written to D:\oracle\NTAMLT99\network\log\listener.log
    Trace information written to D:\oracle\NTAMLT99\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2140
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
    Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NTAMLT99)(PORT=1521)))
    TNS-12546: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00516: Permission denied
    *32-bit Windows Error: 13: Permission denied*
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
    I am new to Oracle and not sure on what to interpret from this.
    Please help me to resolve this.
    Regards,
    AP

    Hi, The user has insufficient privileges to perform the requested operation.So acquire necessary privileges and try again.
    Hope it works
    Shafiulla Syed

  • OBIEE error: Getting error in creating cross database joins

    Hi,
    We are trying to create a cross database join in OBIEE.
    CHild table is on SQL server and we are using ODBC 3.5 call interface to connect.
    Parent table is in Oracle
    11.2.0.3.0
    Each table can be queried separately. Main task required was to fetch records from Oracle based on records returned by SQl server (Query based on other saved request).
    The count of inner query got increased to 30,000 due to which we got too many records in IN predicate error.
    Now while creating cross database join between Oracle and SQL server we are getting following error:
    [nQSError: 10058] A general error has occured. ODBC state: 37 000
    code: 102 message: [microsoft][ODBC SQL Server driver][SQL Server] Incorredt Syntax near 'Session'
    [nQSError: 16015] SQL statement execution failed.

    Hi,
    Could you give a bit more of context for this case? The table in SQL server; Is it a dimension and the one in Oracle DB is a fact? I am guessing, you have set up the driving table here. Have you given a try taking it off, and let BI Server do the filter in memory?
    -Dhar

  • Error : simply creating a database in oracle

    Hello,
    I have recently started with oracle and I am trying to create a database using create database sql as below, but receving some errors, can someone please help me for a direction to resolve it.
    CREATE DATABASE OXXXXI
    USER SYS IDENTIFIED BY password
    USER SYSTEM IDENTIFIED BY password
    LOGFILE GROUP 1 ('C:\ORACLE\oradata\OXXXXI\redo01.log') SIZE 51200K,
    GROUP 2 ('C:\ORACLE\oradata\OXXXXI\redo02.log') SIZE 51200K,
    GROUP 3 ('C:\ORACLE\oradata\OXXXXI\redo03.log') SIZE 51200K
    MAXLOGFILES 32
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    CHARACTER SET AL32UTF8
    NATIONAL CHARACTER SET UTF8
    EXTENT MANAGEMENT LOCAL
    DATAFILE 'C:\ORACLE\oradata\OXXXXI\SYSTEM01.DBF' SIZE 325M REUSE
    SYSAUX DATAFILE 'C:\ORACLE\oradata\OXXXXI\SYSAUX01.DBF' SIZE 325M REUSE
    DEFAULT TABLESPACE users
    DATAFILE 'C:\ORACLE\oradata\OXXXXI\USERS01.DBF'
    SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE tempts1
    TEMPFILE 'C:\ORACLE\oradata\OXXXXI\TEMP01.DBF'
    SIZE 20M REUSE
    UNDO TABLESPACE undotbs
    DATAFILE 'C:\ORACLE\oradata\OXXXXI\UNDOTBS01.DBF'
    SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
    CREATE DATABASE OXXXXI
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-01501: CREATE DATABASE failed
    ORA-01519: error while processing file '%ORACLE_HOME%\RDBMS\ADMIN\dtxnspc.bsq'
    near line 5
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
    Process ID: 13960
    Session ID: 130 Serial number: 3
    SQL>
    Thanks!

    808116 wrote:
    another doubt related to same.=================================
    A couple of important points.
    First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
    Additional notes on the listener: One listener is capable of listening on multiple ports. But please notice that it is the listener using these ports, not the database instance. You can't bind a specific listener port to a specific db instance. Similarly, one listener is capable of listnening on multiple IP addresses (in the case of a server with multiple NICs) But just like the port, you can't bind a specific ip address to a specific db instance.
    Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the request arrives at port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, you'll be connected.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
    Third: If the client is on the same machine as the db instance, it is possible to connect without referencing tnsnames and without going through the listener.
    Now, when you issue a connect, say like this:
    $> sqlplus scott/tigertns will attempt to establish an IPC connection to the db instance. How does it know the name of the instance? It uses the current value of the enviornment variable ORACLE_SID. So...
    $> export ORACLE_SID=fred
    $> sqlplus scott/tigerIt will attempt to connect to the instance known as "fred". If there is no such instance, it will, of course, fail. Also, if there is no value set for ORACLE_SID, the connect will fail.
    check executing instances to get the SID
    [oracle@vmlnx01 ~]$ ps -ef|grep pmon|grep -v grep
    oracle    4236     1  0 10:30 ?        00:00:00 ora_pmon_vlnxora1set ORACLE_SID appropriately, and connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID='vlnxora1
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:37 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsNow set ORACLE_SID to a bogus value, and try to connect
    SQL> exit
    [oracle@vmlnx01 ~]$ export ORACLE_SID=FUBAR
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:57 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    Enter user-name: Now set ORACLE_SID to null, and try to connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID=
    [oracle@vmlnx01 ~]$ sqlplus /scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:43:24 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-12162: TNS:net service name is incorrectly specifiedOk, that is how we get from the client connection request to the listener. What about the listener's part of all this?
    The listener is very simple. It's job is to listen for connection requests and make the connection (server process) between the client and the database instance. Once that connection is made, the listener is out of the picture. If you were to kill the listener, all existing connections would continue. The listener is configured with the listener.ora file, but if that file doesn't exist, the listener is quite capable of starting up with all default values. One common mistake with the listner configuration is to specify "HOST=localhost" or "HOST=127.0.01". This is a NONROUTABLE ip address. LOCALHOST and ip address 127.0.0.1 always mean "this machine on which I am sitting". So, all computers are known as "localhost" or "127.0.0.1". If you specify this address, the listener will only be capable of receiving requests from the machine on which it is running. If you specified that address in your tnsnames file - on a remote client machine - the request would be routed to the machine on which the requesting client resides. Probably not what you want.
    =====================================

  • BEST PRACTICES FOR CREATING DISCOVERER DATABASE CONNECTION -PUBLIC VS. PRIV

    I have enabled SSO for Discoverer. So when you browse to http://host:port/discoverer/viewer you get prompted for your SSO
    username/password. I have enabled users to create their own private
    connections. I log in as portal and created a private connection. I then from
    Oracle Portal create a portlet and add a discoverer worksheet using the private
    connection that I created as the portal user. This works fine...users access
    the portal they can see the worksheet. When they click the analyze link, the
    users are prompted to enter a password for the private connection. The
    following message is displayed:
    The item you are requesting requires you to enter a password. This could occur because this is a private connection or
    because the public connection password was invalid. Please enter the correct
    password now to continue.
    I originally created a public connection...and then follow the same steps from Oracle portal to create the portlet and display the
    worksheet. Worksheet is displayed properly from Portal, when users click the
    analyze link they are taken to Discoverer Viewer without having to enter a
    password. The problem with this is that when a user browses to
    http://host:port/discoverer/viewer they enter their SSO information and then
    any user with an SSO account can see the public connection...very insecure!
    When private connections are used, no connection information is displayed to
    SSO users when logging into Discoverer Viewer.
    For the very first step, when editing the Worksheet portlet from Portal, I enter the following for Database
    Connections:
    Publisher: I choose either the private or public connection that I created
    Users Logged In: Display same data to all users using connection (Publisher's Connection)
    Users Not Logged In: Do no display data
    My question is what are the best practices for creating Discoverer Database
    Connections.
    Is there a way to create a public connection, but not display it in at http://host:port/discoverer/viewer?
    Can I restrict access to http://host:port/discoverer/viewer to specific SSO users?
    So overall, I want roughly 40 users to have access to my Portal Page Group. I then want to
    display portlets with Discoverer worksheets. Certain worksheets I want to have
    the ability to display the analyze link. When the SSO user clicks on this they
    will be taken to Discoverer Viewer and prompted for no logon information. All
    SSO users will see the same data...there is no need to restrict access based on
    SSO username...1 database user will be set up in either the public or private
    connection.

    You can make it happen by creating a private connection for 40 users by capi script and when creating portlet select 2nd option in Users Logged in section. In this the portlet uses there own private connection every time user logs in.
    So that it won't ask for password.
    Another thing is there is an option of entering password or not in ASC in discoverer section, if your version 10.1.2.2. Let me know if you need more information
    thnaks
    kiran

  • Controlfile corrupted when creating a database - ORA-00202

    Hi Oracle experts,
    I have two virtual machines, the clusterware installed fine and is accessing shared disks, also ASM is running fine.
    When I created the database using dbca everything went fine until the very last end, I saw a window indicating that instances on both nodes were starting then I got this error for the second instance:
    PRKP-1001 : Error starting instance vrac2 on node monoravpc11
    CRS-0215: Could not start resource 'ora.vrac.vrac2.inst'
    In the alert there are these errors:
    Tue Jul 29 09:44:49 2008
    Hex dump of (file 0, block 1) in trace file /u01/app/oracle/admin/vrac/udump/vrac2_ora_31504.trc
    Corrupt block relative dba: 0x00000001 (file 0, block 1)
    Completely zero block found during control file header read
    Tue Jul 29 09:44:52 2008
    Errors in file /u01/app/oracle/admin/vrac/udump/vrac2_ora_31504.trc:
    ORA-00202: control file: '+DATA/vrac/controlfile/current.257.661336023'
    Then I checked the ASM disks on the second instance and everything looks fine, disks are accesible and mounted:
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM2
    SQL> select group_number, disk_number, mount_status, state from v$asm_disk
    2 /
    GROUP_NUMBER DISK_NUMBER MOUNT_S STATE
    0 2 CLOSED NORMAL
    0 3 CLOSED NORMAL
    1 1 CACHED NORMAL
    1 0 CACHED NORMAL
    SQL> select group_number, disk_number, reads, writes, read_errs, write_errs from v$asm_disk;
    GROUP_NUMBER DISK_NUMBER READS WRITES READ_ERRS WRITE_ERRS
    0 2
    0 3
    1 1 25 1 0 0
    1 0 37 0 0 0
    ASMCMD> pwd
    +data/vrac/controlfile
    ASMCMD> ls
    Current.256.661336019
    Current.257.661336023
    Then I went to the first instance, wich is up and running and query the control files:
    Valid     File Name     File Directory
    VALID     current.256.661336019     +DATA/vrac/controlfile/
    VALID     current.257.661336023     +DATA/vrac/controlfile/
    They are good and valid.
    So, any hint? any suggestion? I am lost here, I even created a new controlfile I still received the very same message.
    Regards,
    Carlos Acosta

    Yes, sorry, I was so focused on writing a well redacted message that I forgot to send the versions ;)
    OS: Linux Redhat AS 3, 32bit
    Oracle Database and clusterware: 10.2.0.1
    Here is the complete messages file for today:
    Jul 29 09:36:15 monoravpc11 rsh(pam_unix)[22309]: session opened for user oracle by (uid=0)
    Jul 29 09:36:15 monoravpc11 rsh(pam_unix)[22309]: session closed for user oracle
    Jul 29 09:36:36 monoravpc11 pam_rhosts_auth[22717]: allowed to [email protected] as oracle
    Jul 29 09:36:37 monoravpc11 rsh(pam_unix)[22717]: session opened for user oracle by (uid=0)
    Jul 29 09:36:37 monoravpc11 rsh(pam_unix)[22717]: session closed for user oracle
    Jul 29 09:36:37 monoravpc11 pam_rhosts_auth[22750]: allowed to [email protected] as oracle
    Jul 29 09:36:37 monoravpc11 rsh(pam_unix)[22750]: session opened for user oracle by (uid=0)
    Jul 29 09:36:37 monoravpc11 rsh(pam_unix)[22750]: session closed for user oracle
    Jul 29 09:36:38 monoravpc11 pam_rhosts_auth[22783]: allowed to [email protected] as oracle
    Jul 29 09:36:38 monoravpc11 rsh(pam_unix)[22783]: session opened for user oracle by (uid=0)
    Jul 29 09:36:38 monoravpc11 rsh(pam_unix)[22783]: session closed for user oracle
    Jul 29 09:36:39 monoravpc11 pam_rhosts_auth[22793]: allowed to [email protected] as oracle
    Jul 29 09:36:39 monoravpc11 rsh(pam_unix)[22793]: session opened for user oracle by (uid=0)
    Jul 29 09:36:39 monoravpc11 rsh(pam_unix)[22793]: session closed for user oracle
    Jul 29 09:36:40 monoravpc11 pam_rhosts_auth[22828]: allowed to [email protected] as oracle
    Jul 29 09:36:40 monoravpc11 rsh(pam_unix)[22828]: session opened for user oracle by (uid=0)
    Jul 29 09:36:40 monoravpc11 rsh(pam_unix)[22828]: session closed for user oracle
    Jul 29 09:36:40 monoravpc11 pam_rhosts_auth[22836]: allowed to [email protected] as oracle
    Jul 29 09:36:40 monoravpc11 rsh(pam_unix)[22836]: session opened for user oracle by (uid=0)
    Jul 29 09:36:41 monoravpc11 rsh(pam_unix)[22836]: session closed for user oracle
    Jul 29 09:36:41 monoravpc11 pam_rhosts_auth[22871]: allowed to [email protected] as oracle
    Jul 29 09:36:41 monoravpc11 rsh(pam_unix)[22871]: session opened for user oracle by (uid=0)
    Jul 29 09:36:42 monoravpc11 rsh(pam_unix)[22871]: session closed for user oracle
    Jul 29 09:36:42 monoravpc11 pam_rhosts_auth[22879]: allowed to [email protected] as oracle
    Jul 29 09:36:42 monoravpc11 rsh(pam_unix)[22879]: session opened for user oracle by (uid=0)
    Jul 29 09:36:42 monoravpc11 rsh(pam_unix)[22879]: session closed for user oracle
    Jul 29 09:36:57 monoravpc11 pam_rhosts_auth[23164]: allowed to [email protected] as oracle
    Jul 29 09:36:57 monoravpc11 rsh(pam_unix)[23164]: session opened for user oracle by (uid=0)
    Jul 29 09:36:58 monoravpc11 pam_rhosts_auth[23213]: allowed to [email protected] as oracle
    Jul 29 09:36:58 monoravpc11 rsh(pam_unix)[23213]: session opened for user oracle by (uid=0)
    Jul 29 09:36:58 monoravpc11 rsh(pam_unix)[23213]: session closed for user oracle
    Jul 29 09:36:58 monoravpc11 pam_rhosts_auth[23249]: allowed to [email protected] as oracle
    Jul 29 09:36:58 monoravpc11 rsh(pam_unix)[23249]: session opened for user oracle by (uid=0)
    Jul 29 09:36:58 monoravpc11 rsh(pam_unix)[23249]: session closed for user oracle
    Jul 29 09:37:07 monoravpc11 pam_rhosts_auth[23434]: allowed to [email protected] as oracle
    Jul 29 09:37:07 monoravpc11 rsh(pam_unix)[23434]: session opened for user oracle by (uid=0)
    Jul 29 09:37:07 monoravpc11 rsh(pam_unix)[23434]: session closed for user oracle
    Jul 29 09:37:08 monoravpc11 pam_rhosts_auth[23444]: allowed to [email protected] as oracle
    Jul 29 09:37:08 monoravpc11 rsh(pam_unix)[23444]: session opened for user oracle by (uid=0)
    Jul 29 09:37:08 monoravpc11 rsh(pam_unix)[23444]: session closed for user oracle
    Jul 29 09:37:08 monoravpc11 pam_rhosts_auth[23477]: allowed to [email protected] as oracle
    Jul 29 09:37:08 monoravpc11 rsh(pam_unix)[23477]: session opened for user oracle by (uid=0)
    Jul 29 09:39:10 monoravpc11 pam_rhosts_auth[25874]: allowed to [email protected] as oracle
    Jul 29 09:39:10 monoravpc11 rsh(pam_unix)[25874]: session opened for user oracle by (uid=0)
    Jul 29 09:40:02 monoravpc11 rsh(pam_unix)[25874]: session closed for user oracle
    Jul 29 09:40:17 monoravpc11 pam_rhosts_auth[27528]: allowed to [email protected] as oracle
    Jul 29 09:40:17 monoravpc11 rsh(pam_unix)[27528]: session opened for user oracle by (uid=0)
    Jul 29 11:55:54 monoravpc11 sshd(pam_unix)[3752]: session closed for user oracle
    Jul 29 11:55:57 monoravpc11 sshd(pam_unix)[26631]: session opened for user oracle by (uid=500)

  • How to create a database in 11g from an archive taken from 10g

    Hi
    I appreciate that some of you may find this a silly question, but it is a situation that has been given to me.
    The situation in detail is that I am working on project where a part of a company has been sold off to someone else and I am working on part of the separation of IT Systems. The old company has supplied archive (ARC) files containing data that relates to the company which is being sold off. There are files such TSN, listener, and control files. The source data originated from an Oracle 10g database, but it is not possible to download a copy of 10g anymore, and so I have downloaded the earliest version of 11g. I have installed 11g without creating a new database, and my questions are as follows:
    1) Is it possible to re-create the database on the supplied data from the archive logs
    2) If possible, how do you so it - step by step (I am not a DBA but a Microsoft .Net Developer.
    Thanks
    Andy

    user633278 wrote:
    Yes, the DBA has supplied a backup of the database. All I am looking to do is to create from this backup. Is there a simple GUI that can do this for me with minimal touch? As I said I just need step-by-step instructions that can guide me through this so I don't muck it up!
    As with many things Oracle the answer is: it depends.
    There are too many potential differences between the (unknown) features your 10g database used and the feature set of 11g.
    This doc link will give you a sense of how just 'unstraight forward' it can be.
    http://docs.oracle.com/cd/E11882_01/server.112/e17222/upgrade.htm
    In particular see this section:
    Using the Pre-Upgrade Information Tool
    After you have installed the software for Oracle Database 11g Release 2 (11.2) and any required patches, Oracle recommends that you analyze your database before upgrading it to the new release. This is done by running the Pre-Upgrade Information Tool from the environment of the database you are to upgrade. The Pre-Upgrade Information Tool is a SQL script included with Oracle Database 11g Release 2 (11.2) software. This is a required step if you are upgrading manually; otherwise, the catupgrd.sql script terminates with errors. Running the Pre-Upgrade Information Tool is also recommended if you are upgrading with DBUA, so that you can preview the items that DBUA checks.
    In other words, the normal upgrade path involves performing checks against the CURRENT 10g database to identify any real or potential problems.
    Those checks are done BEFORE you take the 10g backup.
    You should also search the net for 'oracle 11g restore 10g backup' and read some of the many threads that have been posted with your same question. They will give you a sense that the process can be problematic and dependent on the type of backup (cold, hot) and how it was taken (manually or RMAN).
    Your best chances for success are to do things the 'normal' way. That means contacting Oracle support to get the discs/download for 10g and then installing 10g and recovering the 10g database from the current 10g backup. The closer you can make the recovery environment and instance configuration the same as the original the fewer problems you are likely to have.
    Or have the old company provide either the original 10g discs or at least provide the installation, control file and configuration information so you can recover the 10g database correctly.
    As already suggested you should first make sure you have a reliable COPY of those backup files and you should use that copy for all of your testing of recovery settings.
    Please tell us if you think you will be able to obtain the 10g software for reinstallation or not.

  • Issue creating a database: SGA_MAX_SIZE and SGA_TARGET

    Hello:
    While creating a custom database, I am running into issues with the values I specify for SGA_MAX_SIZE and SGA_TARGET.
    The install manual for the product I am creating the database for says that SGA_MAX_SIZE should be >= SGA_TARGET_SIZE. It also wants a minimum of 1Gig for SGA_Target
    The Database Configuration Assistant defaulted to 0.64GB for SGA_TARGET and 0.168 for SGA_MAX_SIZE (This is clearly against the instruction in the installation manual).
    Who is right? Me or the vendor?
    I read some threads that indicate that the vendor may be wrong.
    venki

    Follow the vendor's instructions.
    DBCA has never in its existence made a correct decision yet. It puts all control files and redo logs into one directory.
    It doesn't create multiple members for the log file groups.
    And its memory management is based on a simple algorithm that has nothing to do with any specific reality.
    DBCA is intended for creating a generic database for generic purposes ... and that it does very very well.

Maybe you are looking for

  • In need of Blueprints template

    Good day SAP gurus/ veterans I have just entered a project which has just moved into the blueprinting phase and I am to assist the functional lead on the blueprint preparation. I am not experienced in the blueprint design phase so any assisting docum

  • I cannot read your e-mail to me as the e-mail is too small

    ''duplicate - https://support.mozilla.com/en-US/questions/902425'' You sent me an e-mail and I cannot read it because it is too small, I need to know how to fix it so it is the normal size. I cannot read anything on the e-mail at all.

  • IOS 6 update, no music on iptouch

    Put the update IOS 6 on the Ipod Touch, it runs..., but i cant put the music from itunes to the ipod! I tried again again again... but nothing happend! Whats wrong?

  • How create Nested Child Nodes in XML Forms

    Hello All:                     I am very new to XML Forms/KM. I am trying to figure out a way to create Nested Child Nodes schema in XML Forms. Is there a way we can do it? Thanks and Regards, Vasu.

  • BAPI or RFC to simulate an FI invoice creation

    Hi, I need to develop an RFC or BAPI that acts as the SIMULATE function of the transaction FB01 (invoice creation). Could you recommend any tips (es. standard BAPI, Function Modules, etc.) ? Thank you very much in advance. Best Regards. Mauro