First, Database creation:
1, the use of database Configuration Assistant (dbca,database Configuration Assistant) Graphical Way
2, after the completion of the creation, find D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN under the Tnsnames.ora listening configuration file Open
Configure the database name and SID for the new database
3, and then restart Pl\sql Landing can
Second, create a temporary tablespace: (Use default temporary tablespace if not created)
Create temporary tablespace temp_hjb tempfile ' temp_file.dbf ' size 10m;
Modify table space name: Alter tablespace TEMP_HJB rename to Hjb_temp;
Third, create a permanent tablespace: (Use default permanent table space if not created)
Create tablespace hjb_data datafile ' hjb_data.dbf ' size 10m;
Modify the table space (online or offline) status: Alter Tablespace hjb_data Online|offline;
To view the file name of a tablespace: select file_name from dba_data_files where tablespace_name = ' hjb_data '; (table space name to capitalize)
Add Delete table space data file: Alter tablespace hjb_data add/drop data_file ' hjb_data.dbf ';
Create a User: (specify both its temporary and permanent tablespace spaces)
Create user WBS identified by wbs123 account unlock
Default Tablespace HJB
Temporary tablespace hjb_temp;
Delete users: Drop user hjb_wbs;
V. Empowering newly created Users
Grant Connect,resource to WBS; -Grant Connect,resource permissions to new users
Grant DBA to WBS; -Delegating DBA authority to new users
Note:
Grant XXX to User;,grant is the role of authorization, where XXX can be a role or a privilege
DBA: With full privileges, the system has the highest privileges, and only DBAs can create the database structure.
RESOURCE: Users with RESOURCE permissions can create entities only and cannot create database structures.
Connect: Users who have connect permissions can only log on to Oracle and cannot create entities and cannot create database structures.
For ordinary users: Grant Connect, resource permissions.
For DBA administration User: Grant Connect,resource, dba authority.
Database user creation completed.