11

Unix 環境で以下のコマンドを使用して、Oracle データベースに接続しています。

sqlplus test/test@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname.com )(PORT=1521)))(CONNECT_DATA=(SID=mysid))'

しかし、私は以下のエラーを取得しています:

Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.

Usage 1: sqlplus -H | -V

    -H             Displays the SQL*Plus version and the
                   usage help.
    -V             Displays the SQL*Plus version.

Usage 2: sqlplus [ [<option>] [{logon | /nolog}] [<start>] ]

  <option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]

コマンドの使用で間違いを犯している場所を教えてください。

4

8 に答える 8

10

これを試して: sqlplus USER/PW@//hostname:1521/SID

于 2013-09-24T14:02:28.643 に答える
4

sqlplus ユーザー名/パスワード@データベース

例えば:

sqlplus hr/hr@orcl

于 2013-03-31T12:25:23.200 に答える
0

Oracleデータベースに接続したい場合

  1. SQLプロンプトを開く
  2. sysdba for XE- conn / as sysdba for IE- conn sys as sysdba に接続
  3. 次に、以下のコマンド起動でデータベースを起動します。

開始すると、Oracleデータベースにアクセスできるようになります。別のユーザーに接続したい場合は、conn ユーザー名/パスワードを書くことができます。例: conn scott/tiger; 接続済みと表示されます........

于 2013-04-06T08:25:09.853 に答える
0
tnsping xe --if you have installed express edition
tnsping orcl --or if you have installed enterprise or standard edition then try to run
--if you get a response with your description then you will write the below command
sqlplus  --this will prompt for user
hr --user that you have created or use system
password --inputted at the time of user creation for hr, or put the password given at the time of setup for system user
hope this will connect if db run at your localhost.
--if db host in a remote host then you must use tns name for our example orcl or xe
try this to connect remote
hr/pass...@orcl or hr/pass...@xe --based on what edition you have installed
于 2016-11-05T16:57:05.577 に答える