I just got started with Oracle. Below are some simple configurations. I hope it will be helpful for beginners. I hope you can give some comments.
1. Create a database
1) start-ProgramNext, find Database Configuration assistant to enter the database creation wizard.
2) follow the Wizard to continue the next step until the creation is complete. Note the following: the database name/Sid must be set to the two places,
Next, select character set. Here, select zhs16gbk. Select Unicode.
There is also the database creation option, which should be saved as a database template.
2. Create a user
In the program menu, select the Enterprise Manager Console to start the management platform and select start independently. Select sysdba as the first login connection identity.
After entering, select the database you just created, expand -- Security -- Right-click the user and choose create to enter the create user interface.
In this example, the general information is the default one. In the tablespace, the default and temporary options are user and temp respectively.
Then select the permissions you grant to the user in the role and assign permissions as needed. You can grant DBA permissions without special requirements.
You can use other default options.
Below are some SQL commands
It168 College
0: create a user space first. That is, all operations of the user use the space.
Create tablespace datafile "/opt/Oracle/oradata/MySpace. DBF "size 7000 m;
This statement creates a 7 GB tablespace in the/opt/Oracle/oradat directory, the file name is MySpace. DBF.
1. Create a new user
create user cydba identified by cydbapwd defalut tablespace MySpace;
This SQL statement is used to create a new military user named cydba and set its password to cydbapwd. The default tablespace used is MySpace.
2. Create a role to control various resources.
grant
Create session, create any table, create any view, create any index, create any procedure,
alter any table, alter any procedure,
drop any table, drop any view, drop any index, drop any procedure,
select any table, insert any table, update any table, delete any table,
to cyrole;
This statement grants various permissions to the cyrole role.
3. Assign the cyrole role to cydba, that is, enable the cydba user to manage and use resources owned by cyrole.
grant cyrole to cydba;
so far, we have created a new user for ourselves, which uses a specified space, it also specifies the operations that can be performed in the tablespace. :)