How to connect to another database using sqlplus?
2005-03-25 09:34
627 查看
Assume you already logged into an oracle database, now you want to log into another database.
The following are suggestion for you:
- Connect to a local oracle database:
Method: connect username/password
- Connect to a remote oracle database:
Method: connect username/password@net_service_name
[net service name]: A simple name for a service that resovle to a connect descriptor.
Its format likes "SID_OracleHost".
Depends on your needs, net service name can be stored in a variety of places, including:
(1) Local configure file, tnsnames.ora, on each client
(2) Directory server
(3) Oracle Names server
(4) External naming service, such as NIS or CDS
For oracle9i,you can simply connect to the host database using Oracle Enterprise Manager
Console, the net service name is stored in tnsnames.ora aotumatically. And you only can
remove the net service name by modifying tnsnames.ora manually.
The following are suggestion for you:
- Connect to a local oracle database:
Method: connect username/password
- Connect to a remote oracle database:
Method: connect username/password@net_service_name
[net service name]: A simple name for a service that resovle to a connect descriptor.
Its format likes "SID_OracleHost".
Depends on your needs, net service name can be stored in a variety of places, including:
(1) Local configure file, tnsnames.ora, on each client
(2) Directory server
(3) Oracle Names server
(4) External naming service, such as NIS or CDS
For oracle9i,you can simply connect to the host database using Oracle Enterprise Manager
Console, the net service name is stored in tnsnames.ora aotumatically. And you only can
remove the net service name by modifying tnsnames.ora manually.
相关文章推荐
- How To Connect Using A Sqlplus Preliminary Connection (Doc ID 986640.1)
- How to connect SQLPlus without tnsnames.ora
- How to Enable SQL_TRACE for Another Session or in MTS Using Oradebug(文档 ID 1058210.6)
- SQL: How to get a series of dates in sql using connect by
- How can I connect Unity to an SQL database in order to implement an MMO?
- Using C# to connect to and query from a SQL database
- How to read and save Images in a Sql Server Database using ADO.NET and C#
- How to move databases between computers that are running SQL Server
- How to select the data type in SQLserver database such as varchar, nvarchar
- Backup or Restore SQL Server Database to another server.
- How to Convert 10g Single-Instance database to 10g RAC using Manual Conversion procedure [ID 747457.
- [Windows Azure] How to Scale a SQL Database Solution
- 查找网站搬迁错误Unable to connect to your database server using the provided settings
- SQL Server How to Perform Database Mirroring
- How to Convert 10g Single-Instance database to 10g RAC using Manual Conversion procedure
- How to use SQLPlus export data to csv format
- How to collate SQL_Latin1_General_CP1_CI_AS using IN operator
- How to implement a many-to-many relationship using Linq to Sql ? (转)
- How to change the language of oracle sqlplus from chinese to english in windows(如何将oracle sql plus中的中文变成英文版)
- How to recreate the msdb database in SQL Server 2005