首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Oracle数据库SQLPLUS:如何输入密码有字符@?

Oracle数据库SQLPLUS:如何输入密码有字符@?
EN

Stack Overflow用户
提问于 2022-08-25 03:12:32
回答 2查看 49关注 0票数 0

Windows 11上的Oracle数据库21c快速版本。

我的错误

代码语言:javascript
复制
ORA-12154: TNS:could not resolve the connect identifier specified

我的密码是xxxxxa@。我看到https://stackoverflow.com/a/67141887/3728901怎么输入密码?

更新:谢谢康纳的回答。我抓到

代码语言:javascript
复制
Microsoft Windows [Version 10.0.19044.1889]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Administrator>sqlplus /nolog

SQL*Plus: Release 21.0.0.0.0 - Production on Thu Aug 25 10:21:18 2022
Version 21.3.0.0.0

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

SQL> connect sys/"123456a@"@xe
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER


SQL>

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-08-25 03:19:39

双引号是你的朋友

代码语言:javascript
复制
SQL> create user XXX identified by 123@456;
create user XXX identified by 123@456
                                 *
ERROR at line 1:
ORA-00922: missing or invalid option


SQL> create user XXX identified by "123@456";

User created.

SQL> grant create session to xxx;

Grant succeeded.

SQL> connect xxx/123@456@db19_pdb1
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Warning: You are no longer connected to ORACLE.
SQL> connect xxx/"123@456"@db19_pdb1 as sysdba
Connected.
票数 1
EN

Stack Overflow用户

发布于 2022-08-25 03:51:11

代码语言:javascript
复制
sqlplus /nolog
connect sys/"123456a@"@xe as sysdba

SQL> alter session set "_ORACLE_SCRIPT"=true;  
SQL> create user donhuvy identified by "123456a@";
SQL> grant create session to donhuvy;
SQL> connect donhuvy/"123456a@"@xe
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73481467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档