oracle - 在 SQL 加载程序命令中获取无效的用户名和密码
问题描述
sqlldr system/(giving my password) control='E:\sqlloader\load_test.ctl'
但它会引发错误
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
解决方案
那是因为您提供了无效的密码。
这就是我真正所做的;xxx
当然不是system
的密码:
c:\Temp>sqlldr system/xxx control=a.ctl
SQL*Loader: Release 11.2.0.2.0 - Production on Pet Lis 29 20:17:58 2021
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
但是,如果我提供一个有效的密码(不过我不会透露),它会起作用:
c:\Temp>sqlldr system/valid_password control=a.ctl
SQL*Loader: Release 11.2.0.2.0 - Production on Pet Lis 29 20:18:11 2021
<snip>
另外,正如巴巴罗斯告诉你的那样,不要使用system
(nor sys
) 来娱乐。创建任何其他用户并将其架构用于您的游乐场。下面是方法(在我的 11gXE 数据库上): 连接为sys
:
c:\Temp>sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Pet Lis 29 20:21:05 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
检查你有哪些表空间:
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
创建用户:
SQL> create user vicky
2 identified by barba --> this is the password
3 default tablespace users
4 temporary tablespace temp
5 quota unlimited on users;
User created.
授予一些特权;稍后,根据需要授予他人:
SQL> grant create session, create table to vicky;
Grant succeeded.
让我们尝试一下:
SQL> connect vicky/barba
Connected.
SQL> create table test as select 1 id, sysdate datum from dual;
Table created.
SQL> select * From test;
ID DATUM
---------- --------
1 29.10.21
SQL>
推荐阅读
- android - 如何从firebase实时数据库中删除
- discord.js - 如何通过他们的 js api 使用谷歌自定义搜索 discord.js?
- c# - 使用 UnityEngine -- 无法启动资源
- machine-learning - 如何构建像 Kaggle 这样的数据科学游戏
- firebase - 尝试将颤振与firebase消息ios集成时出现白屏
- sql-server - 像 `User::filePath` 这样的变量如何传递给由 SQL 代理作业运行的 SSIS 包中的脚本?
- c# - 如何修复命名空间“WebApplication1”中不存在类型或命名空间“App_Code”
- javascript - 尽管导航到多个 html/js 文件,但当我的站点加载并获取任何传入消息时,我可以使用 javascript 连接到 MQTT 代理吗?
- rest - 不向客户端返回任何内容的 POST 方法是否需要 Accept 标头?
- spring-boot-actuator - 如何在 SpringBoot Admin UI 中启用关闭功能?