Orcle Class Note 2

Source: Internet
Author: User

1.sqlplus is a user process that can open more than one command to a server-side server process. The database is used for disk space.
2. Physical structure (what) + Logical Structure->oracle instance (how)
Three parts of the core content
3. Query how large the Oracle data block is: Select Name,value from v$parameter (parameter) where name = ' db_block_size ' (parameter name);
db_block_size:8192 (8k size)
Data block structure: Row space free space row Directory table Directory block header
The data block is the smallest space stored
4. Disk area: Multiple data blocks linked together
The disk area is the smallest unit of storage allocation
5. Segments are composed of a series of extents, independent logical storage structures
Data segment, index segment, temporary segment, fallback segment, LOB segment
6. Tablespace: The maximum logical storage structure that can be used in Oracle
Multiple table spaces are databases
Select Tablespace_name View Table space
From Dba_tablespaces (DBA system)
Tablespace_name
------------------------------
System (A. Numeric dictionary internal Systems base table B.pl/sql Program source code and parsing code c. Definition of data object)
UNDOTBS1 (undo Table Space Drop undo segment)
Sysaux (Automatic maintenance of auxiliary system system)
Temp (temp table space)
Users (User space)
EXAMPLE (example)
7. Physical structure (data file + control file + Diary file + parameter file)
Startup problem, see if File error
Data files and log files, such as data files and log files, control file, control file (multiple), initial parameters file (with problem recovery, no problem)
8. parameter file (backup required): Client and server Side
Pfile D:\oracle\product\10.2.0\admin\orcl\pfile
Important information about initialization in init.ora.332015101242: which database + control file is
Editable files
Spfiledh. ORA D:\oracle\product\10.2.0\db_1\dbs
Show if SPFile is being used
Show parameter SPFile (show file address and name)
9. Control files: Very small binary files, non-change, very important
What control files are displayed
Select name from V$controlfile
NAME
-------------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01. Ctl
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02. Ctl
D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03. Ctl

Show parameter control_files;
Select Name,value from V$parameter where name= ' control_files ';
10. Data files: Where the user data is stored, a tablespace is physically corresponding to one or more data files, and 21 data files belong to only one table space
Check data file select name from V$datafile;
11. Redo the log file. log
12. User unlock: Alter user Scott account unlock; (cannot be deleted first)
Change Password conn Scott/tiger
ERROR:
ora-28001:the Password has expired
Change Scott's password
New Password: * * * *
Retype the new password: * * * *
Password has changed
is connected.
Scott is not a DBA and cannot do anything beyond the scope of the work
Show user
Select table_name from user_tables; (User current users)
13. User authorization, give SCOTT,DBA right
Sql> Conn/as SYSDBA
is connected.
Sql> Grant SYSDBA to Scott;

Authorization is successful.

Sql> Conn Scott/tiger as Sysdba
is connected.
Sql> revoke SYSDBA from Scott; Reclaim permissions
SELECT * from v$pwfile_users View user identity

Orcle Class Note 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.