oracle-Bo master take you less detours!

Source: Internet
Author: User
Tags dba

Reasons to write this blog:

Often in some operations development technology Exchange Group to see some people ask some questions about Oracle (DBA Novice or the operation of the restoration), but few people answer such questions. Problem:

1.1) + How to solve this Oracle error?

1.2) How does Oracle install it? How did the installation fail?

1.3 Oracle Permissions How to manage AH? Oracle table space is not enough how to do?

...

I have often encountered this kind of problem, not nobody answer you, but this kind of question is not good to answer at all. Even if the resolution of one, may be next to another problem, even if you search this error (may be how to solve you are in a daze, the execution of what commands do not know), and finally led to the service can not get up, the error is a lot. And the technical Exchange group other people give you advice is just advice, what happens and no one to pay you. Therefore, the key is to rely on their own.


If you feel the same about the above questions, you can go on with this blog, and you may not look at it.

##############################################################


You can envision a scene where your boss makes you do Oracle, and you don't know what you're going to do with your heart. But have to do, may be to find some documents on the Internet to see, try to install, maybe their own confused, the other is some error questions, ask some groups, seek help, all seemingly no problem, then I can be very responsible to tell you, Oracle short time you too.


that's probably why I'm writing this blog today. Share your personal experience, and if anything is wrong, welcome the old driver to point out. If you want bloggers to write something about Oracle, you can leave a message or send a direct mail blogger, if there is time, will be written in detail .


1, the installation of Oracle (of course, there are some custom-made mirrors more simple than a step-up installation)

Eg:Oracle Basic installation environment, version requirements, etc. And the installation should have a graphical interface (centos6.x)

Oracle 11g R2 Database Installation hardware configuration requirements:

Minimum memory 1 GB of RAM grep memtotal/proc/meminfo

Virtual memory capacity: grep swaptotal/proc/meminfo

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/7D/wKiom1gyRj3gqgT-AAAcWi_Y2OY249.png-wh_500x0-wm_3 -wmp_4-s_1922968950.png "title=" 1.png "alt=" Wkiom1gyrj3gqgt-aaacwi_y2oy249.png-wh_50 "/>

Hard disk Requirements: Database software hard disk space requirements:

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/7D/wKiom1gyRlDxe_8vAAASu3_YyU0601.png-wh_500x0-wm_3 -wmp_4-s_3886757713.png "title=" 2.png "alt=" Wkiom1gyrldxe_8vaaasu3_yyu0601.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/7D/wKiom1gyRmTxrw1gAAARGc1EETc515.png-wh_500x0-wm_3 -wmp_4-s_1871174176.png "title=" 3.png "alt=" Wkiom1gyrmtxrw1gaaargc1eetc515.png-wh_50 "/>


2, dependent on the environment

Installing Oracle Dependency packages is a must, here is your opinion is the system to minimize the installation, ready your Yum source,

Do the experiment first, write an installation document, not familiar before, do not engage in production environment.


3. Installation process

The installation process is relatively simple, just pay attention to write a record. Better in Word, your own configuration of things add a, do not make a text document (unless it is a step-by-step can be done, but I think the production document should generally be word or PDF format), if it is a personal research, you can take notes in the Youdao cloud notes can also, look at the individual, just must write documents. If it goes well, you should come to this step is no problem.

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8A/79/wKioL1gySYHgJqX5AAEzgyHXH2g730.png-wh_500x0-wm_3 -wmp_4-s_1510166783.png "title=" 3.png "alt=" Wkiol1gysyhgjqx5aaezgyhxh2g730.png-wh_50 "/>


4. Create a database and start | Stop Oracle Services

Normally when you finish installing Oracle, you can start the service in the console, or you can create a database with DBCA, and then start it, but you will encounter some errors when you start. (Do not worry at this time, is nothing but some parameters are not configured well, put your error Baidu or Google search for their own solution on the line), do not save the diagram, error is good, self-solve, and to understand why the error.

eg

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8A/7D/wKiom1gySlGSnaLdAABDRlm2tvs758.png-wh_500x0-wm_3 -wmp_4-s_1862132065.png "title=" 4.png "alt=" Wkiom1gyslgsnaldaabdrlm2tvs758.png-wh_50 "/>

How to resolve:

cp/home/oracle/app/admin/offcms/pfile/init.ora.6212016115627/home/oracle/app/oracle/product/11.2.0/dbhome_1/ Dbs/initorcl.ora


5. Start | Close the listening port and familiarize yourself with how to modify the default listening port

eg

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8A/7D/wKiom1gySuLjH6UqAACvc6FQ4wA232.png-wh_500x0-wm_3 -wmp_4-s_2693445753.png "title=" 4.png "alt=" Wkiom1gysuljh6uqaacvc6fq4wa232.png-wh_50 "/>

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8A/79/wKioL1gySyOBSYZuAABS_ePjgQU416.png-wh_500x0-wm_3 -wmp_4-s_159985490.png "title=" 5.png "alt=" Wkiol1gysyobsyzuaabs_epjgqu416.png-wh_50 "/>

If this is the step, you can understand the installation and launch of Oracle, at which point you can probably understand the basic installation.


6. The directory structure of Oracle installation

eg

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/79/wKioL1gyTB3TjxEHAACzeLkGtSU304.png-wh_500x0-wm_3 -wmp_4-s_3539441129.png "title=" 7.png "alt=" Wkiol1gytb3tjxehaaczelkgtsu304.png-wh_50 "/>

Note: The directory structure varies slightly depending on the installation path you have defined, and different versions of Oracle.


7. Authority issues (emphasis)

Oracle permissions issue is a saying, here is more, need to organize their own permissions.

eg

First, the Classification of rights:

System permissions: The system specifies the user's permission to use the database. (System permissions are for users).

Entity permissions: A permission user's access to other users ' tables or views. (For a table or view).

Second, System Rights Management:

1 , System permissions classification:

DBA: with full privileges, the system has the highest privileges and only the DBA can create the database structure.

RESOURCE: users with resource permissions can only create entities and cannot create a database structure.

CONNECT: users with Connect permissions can only log on to Oracle, not create entities, and cannot create database structures.

For normal users: Grant Connect, resource permissions.

For DBA administration users: Grant Connect,resource, dba authority.

2 , System permission authorization command:

[ system permissions can only be granted by DBA User: Sys,system (only two users at the beginning)]

Authorization Command:sql> Grant Connect, resource, Dbato username 1 [, user name 2] ...;

[ an ordinary user with authorization can have the same user rights as the system, but never the same permissions as the SYS user, and the permissions of the system user can also be recycled.] ]

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/7D/wKiom1gyS76g8CWyAAB8IzVJV6A085.png-wh_500x0-wm_3 -wmp_4-s_323244969.png "title=" 6.png "alt=" Wkiom1gys76g8cwyaab8izvjv6a085.png-wh_50 "/>


8. Table Space creation and management (authorization) for Oracle Database (priority)

eg

Create a data table space

Createtablespace yzhfdb datafile '/home/oracle/app/oradata/orcl/yzhfdb.dbf ' size1024m autoextend on;

Createtablespace yzhfdata datafile '/home/oracle/app/oradata/orcl/yzhfdata.dbf ' size2048m autoextend on;

Create tablespace tencrwindb datafile '/home/oracle/app/oradata/orcl/tencrwindb01.dbf ' size 1024m autoextend on;

Create a database user and authorize

Create Useryzhfdata identified by yzhfdata default Tablespace yzhfdata;

Create Useryzhfdb identified by yzhfdb default Tablespace yzhfdb;

createdirectory my_dir as '/home/oracle/expdp_bak ';-- for backup restore

Grantconnect,resource,dba to Yzhfdb;

Grantconnect,resource,dba to Yzhfdata;

Grantread,write on directory My_dir to Yzhfdb;

Grant Read,write on directory My_dir to Yzhfdata;


9. Backup and restore of database (focus)

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8A/7D/wKiom1gyTO6A9m16AAELLpqPK70419.png-wh_500x0-wm_3 -wmp_4-s_2957129903.png "title=" 7.png "alt=" Wkiom1gyto6a9m16aaellpqpk70419.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/79/wKioL1gyTSGCz1DvAAB9Ve1W2cM647.png-wh_500x0-wm_3 -wmp_4-s_4239542526.png "title=" 8.png "alt=" Wkiol1gytsgcz1dvaab9ve1w2cm647.png-wh_50 "/>

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/79/wKioL1gyTTyz5tpKAADNitLt59g021.png-wh_500x0-wm_3 -wmp_4-s_4069690983.png "title=" 9.png "alt=" Wkiol1gyttyz5tpkaadnitlt59g021.png-wh_50 "/>

If you are familiar with your own command backup, you can learn about other backup methods.


10. EM Management

eg

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/79/wKioL1gyTY2jJvOyAALxTSkQzd8865.png-wh_500x0-wm_3 -wmp_4-s_1420350887.png "title=" 10.png "alt=" Wkiol1gyty2jjvoyaalxtskqzd8865.png-wh_50 "/>

At this stage you will basically manage Oracle.


11. In-depth Oracle

Log management, table space management, common error management, master-slave management, etc.


12. Precautions and Suggestions

Oracle is a complex database and does not expect to simply install the configuration on the line. According to my experience, can buy some books, combined with some video, production environment encountered problems to solve problems, and constantly accumulate themselves. To be in awe of the production environment, data should not be confused. Note Backup and availability of databases


write here today, what questions are welcome to point out. http://renzhiyuan.blog.51cto.com/




This article from "Ningzhiyuan 51CTO blog" blog, declined reprint!

oracle-Bo master take you less detours!

Related Article

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.