【问题标题】:Missing or invalid password(s) with password parameter Oracle密码参数 Oracle 丢失或无效密码
【发布时间】:2021-06-16 00:36:43
【问题描述】:

我尝试在数据库中创建一个用户,但我希望我的密码是这样的参数:

CREATE USER testuser IDENTIFIED BY ''&TESTUSER_PASSWORD''
                    DEFAULT TABLESPACE test_DATA TEMPORARY TABLESPACE temp 
                    PROFILE testprofile';

运行此代码后,我收到此错误:ORA-00988:密码丢失或无效

如果我在没有''的情况下运行:

CREATE USER testuser IDENTIFIED BY &TESTUSER_PASSWORD
                    DEFAULT TABLESPACE test_DATA TEMPORARY TABLESPACE temp 
                    PROFILE testprofile';

我收到此错误消息:ORA-00922:缺少或无效选项。

如果我把密码不作为参数,一切都很好,并且脚本工作正常。

【问题讨论】:

标签: oracle ddl


【解决方案1】:

我不确定是什么让您感到困扰,因为如果您操作得当,替换变量只会起作用

SQL> create user testuser
  2  identified by &testuser_password
  3  default tablespace users
  4  temporary tablespace temp
  5  profile default;
Enter value for testuser_password: abc
old   2: identified by &testuser_password
new   2: identified by abc

User created.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-20
    • 2016-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-31
    • 2015-07-19
    相关资源
    最近更新 更多