一。什么是Oracle操作系统用户认证登录方式. 即只要在数据库中创建一个os认证用户。然后,就可以在服务器本机或远程客户端上 创建和登录一个相同用户名,就可以不需要密码连接上本地或远程的数据库了。 最典型的就是“sql / as sysdba”即不用给出用户名和密
一。什么是Oracle操作系统用户认证登录方式.
即只要在数据库中创建一个os认证用户。然后,就可以在服务器本机或远程客户端上创建和登录一个相同用户名,就可以不需要密码连接上本地或远程的数据库了。
最典型的就是“sql / as sysdba”即不用给出用户名和密码就可以登录到数据库系统中。
二。如何用os用户认证,在本机或远程登录数据库。
1.检查是否已打开了操作系统认证
$ORACLE_HOME/network/admin/sqlnet.ora
Windows下检查是否设为NTS.这个NTS为Oracle针对Windows专用的。
SQLNET.AUTHENTICATION_SERVICES= (NTS)
UNIX/Linux下,检查是否设为NONE,如果是,则要更改成ALL或注释掉那行。
2.检查密码文件参数是否为EXCLUSIVE
show parameter REMOTE_LOGIN_PASSWORDFILE
如不是,可以下面命令更改:
alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;
并且检查密码文件是否有创建,如没有,用下列命令创建并输入sys用户的密码。
orapwd file=orapw$ORACLE_SID passwd=xcl entries=5 force=y;
可用下面命令来检查sys用户是否有放入密码文件。
select * from v$pwfile_users;
附上参数remote_login_passwordfile的参数值说明:
None: 使得oracle不使用密码文件,只能使用OS认证,不允许通过不安全网络进行远程管理。
Exclusive: 可以使用唯一的密码文件,但只限一个数据库。密码文件中可以包括除了sys用户的其他用户。
Shared: 可以在多个数据库上使用共享的密码文件。但是密码文件中只能包含sys用户。通常用于一个dba管理多个数据库的时候。
3.检查远程操作系统认证参数是否为TRUE
show parameter remote_os_authent
如不是,可以下面命令更改:
alter system set remote_os_authent=true scope=spfile;
4. 现有的OS认证关键字与认证用户
--查看当前数据库OS认证关键字,常为 ops$
show parameter os_authent_prefix
--查看现在有无OS认证用户
SELECT username,password FROM dba_users WHERE username like 'ops$%';
也可用 alter system set os_authent_prefix="" scope=spfile; 去掉前缀
5. 如有更改过参数,请重启数据库,使参数更改生效。否则略过.
shutdown immediate
startup
6. 在数据库创建一个OS认证用户
a. 在数据库服务上,创建一个myosuser操作系统用户.
useradd myosuser
passwd myosuser
b.在数据库中创建,记得用户名前要加前缀-- IDENTIFIED EXTERNALLY 表明此用户通过操作系统来认证
CREATE USER ops$myosuser IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO ops$myosuser;
你也可以将myosuser改成administrator,这样windows客户端连远程数据库时,更明显,更方便。
另一个要注意的地方是OS认证优先于密码文件认证.
7.数据库服务器上,用其本机os用户登录测试
export ORACLE_SID=xcldb
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
su - myosuser
/u01/app/oracle/product/11.2.0/db_1/bin/sqlplus /
show user
注意: myosuser用户要属于dba组角色。
8. 在远程客户端机器连接服务器上的数据库
在客户端机器上,用myosuser用户登录远程数据库.
Windows为例:
a. 创建一个myosuser用户
b. 授权ORA_DBA或ORA_OPER角色
c. 检查sqlnet.ora是否为SQLNET.AUTHENTICATION_SERVICES= (NTS)
d. 输入sqlplus /@remote_xcldb 就可以登录
当然如果是用administrator用户测试,就没这么麻烦。
三。禁用远程操作系统认证
a.alter system set remote_os_authent=false scope=spfile;
b.重启数据库
四。如何禁用OS认证用户登录
在$ORACLE_HOME/network/admin/sqlnet.ora 加上下面的语句设为NONE即可。
SQLNET.AUTHENTICATION_SERVICES=(NONE)
Windows和UNIX/Linux都这样做。
五。给sqlnet.ora文件提高安全等级
chown root:root sqlnet.ora
chmod 744 sqlnet.ora
这样,以后只有root用户可以更改里面的值了.
简洁流程:
远程客户端发起连接 --> 检查库是否可远程连接(remote_os_authent = true)
--> 检查是否可使用密码文件(remote_login_passwordfile = EXCLUSIVE) --> 检查密码文件
--> 检查 sqlnet.ora可否用os认证用户 ( AUTHENTICATION_SERVICES != NONE)
--> 检查OS认证用户名是否存在 --> 核对密码 -->登录成功.
MAIL: xcl_168@aliyun.com
BLOG: http://blog.csdn.net/xcl168

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.