Oracle Database Cmd command to create a new user and connection
- ORACLE configuration
- Oracle's three users
- Super administrator connection
- Create a new user
- connection
- Adding database table
- Delete User Data
ORACLE configuration
- where the configuration file path
C: \ App \ Administrator \ Product \ 11.2.0 \ dbhome_1 \ the NETWORK \ ADMIN
- server configuration of
the listener.ora
the tnsnames.ora
use Notepad to open two documents, modify the position:
modify the host file, it can be said localhost or computer name or ip address of the computer
- Enable monitoring service
Entering management items, select the following services:
two more: the properties panel - Startup type: Manual - OK.
After changing the need to restart the service, click:
Restart the service can be.
Oracle's three users
-SYS User: Super Administrator, the highest authority, its role is DBA.
-SYSTEM users: system administrators, in addition to not start an instance, the other can operate
-scott: client accounts, the ordinary user permissions are SYS or SYSTEM user to the user. So create a user and operate independently requires authorization
Super administrator connection
C: \ Documents and Settings \ Administrator > sqlplus "/ as sysdba"
create a new user: SQL> PKR IDENTIFIED by the Create the User Manager;
(the user has created.)
Fu privileges: SQL> Grant the CREATE SESSION to PKR;
(authorization success.)
SQL> Grant Connect, Resource to XG;
(authorization is successful.)
connection
Connection: SQL> conn username / password;
Adding database table
Using the .sql script file to add the database table: SQL> @c; \ data.sql;
(for example, a file named data.sql)
Delete User Data
drop user &1 cascade;