0

我在 Windows 8.1 上安装了 Instantclient 12c x86

我可以从cmd.exe连接:

C:\Users\vagrant>sqlplus user@\"hostname:1521/SERVICE_NAME\"

SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:22:31 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options

SQL>

现在,当我从 Powershell 尝试相同的操作时:

我想被提示输入密码。这没用。

PS C:\Users\vagrant> sqlplus user@\"hostname:1521/SERVICE_NAME\"

SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:30:12 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:

在这里我提供了我的密码并且它有效

PS C:\Users\vagrant>sqlplus user/password@hostname:1521/SERVICE_NAME

SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 3 06:24:48 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> 

从 Powershell 提示使用 sqlplus 登录密码的正确语法是什么?

4

0 回答 0