oracle instantclient 12c EZCONNECT in Powershell提示输入密码

时间:2015-12-03 14:35:43

标签: oracle powershell instantclient

我在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提示输入密码的正确语法是什么?

0 个答案:

没有答案