Linux operating under oracle database

linux install oracle Service

Slightly, reference https://www.cnblogs.com/zhangboyu/p/7449203.html

And create a user table space

1. Log linux, oracle user login (if the root user login, login by su - oracle handover command to the user oracle)

2. sysdba ways to open sqlplus, the following command: sqlplus / as sysdba

3. Create a temporary table space:

- to the absolute path of the temporary table space for files. If desired, you can set the absolute path to write a query. $ {ORACLE_HOME} general use   
SELECT name from V $ the tempfile;   
Create Temporary TABLESPACE CJQ_TEMP the tempfile '$ {ORACLE_HOME} \ oradata \ CJQ_TEMP.bdf' size 100m 20m Next Reuse AUTOEXTEND ON MAXSIZE Unlimited;  
View Code

4. Create a table space official

- the absolute path of the file table space user query: 
SELECT name from V $ datafile; 
Create the CJQ TABLESPACE datafile '$ {ORACLE_HOME} \ oradata \ CJQ.dbf' size 100M Reuse AUTOEXTEND Next 4OM ON MAXSIZE Unlimited default Storage (Initial Next 128K 128K minextents 2 maxextents unlimited);
View Code

5. Create user and password, specify the top-created temporary table space and table space

create user cjq identified by cjq default tablespace CJQ temporary tablespace CJQ_TEMP;

User Empowerment

grant dba to cjq;
grant connect,resource to cjq;
grant select any table to cjq;
grant delete any table to cjq;
grant update any table to cjq;
grant insert any table to cjq;

ORA-01045: user lacks CREATE SESSION privilege solutions

There is no reason to give permission error

Solution: grant create session, resource to username;

ORA-12145: TNS: could not resolve the connect identifier specified

Check the tnsnames.ora configuration

In the installation path of the client, I is D: \ oracle \ instantclient_12_1 \ NETWORK \ ADMIN, create a file named: tnsnames.ora, if you create too before, live in open directly added to the line. Append the following in the tnsnames.ora:

SID name =

  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SID名)
  )

Note that the previous SID name can not have any other characters, especially the space!

 





Guess you like

Origin www.cnblogs.com/1234cjq/p/11243830.html