【问题标题】:SQL command to prompt a pop up box to have a user input a username to add the value to the alter user "username" commandSQL 命令提示弹出框让用户输入用户名以将值添加到 alter user "username" 命令
【发布时间】:2019-03-19 13:52:24
【问题描述】:

我正在尝试编写一个脚本,该脚本可以运行以从 oracle 数据库中解锁用户。我可以连接到sqlserver,然后手动运行命令,但是id喜欢弹出一个输入框,询问用户名,然后将该值输入到alter user username account unlock;命令。

【问题讨论】:

  • 信息不可用
  • 已经回答了。
  • 作为审核任务来找我,我做了一些清理工作。回答与否无关紧要;)

标签: sql oracle sqlplus


【解决方案1】:

使用替换变量 (&variable_name)

SQL> ALTER USER &user_name ACCOUNT UNLOCK;
Enter value for user_name: hr

old:ALTER USER &user_name ACCOUNT UNLOCK
new:ALTER USER hr ACCOUNT UNLOCK

User HR altered.

【讨论】:

  • 哥们,你是救命稻草
  • 还有一件事,如果我希望在用户更改后关闭窗口怎么办?
猜你喜欢
  • 1970-01-01
  • 2023-03-25
  • 2018-11-15
  • 1970-01-01
  • 1970-01-01
  • 2012-11-08
  • 1970-01-01
  • 2013-02-08
  • 1970-01-01
相关资源
最近更新 更多