程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> oracle 11G創建表空間、用戶、配置監聽和TNS,11gtns

oracle 11G創建表空間、用戶、配置監聽和TNS,11gtns

編輯:Oracle教程

oracle 11G創建表空間、用戶、配置監聽和TNS,11gtns


最近總在安裝各種版本的oralce數據庫做測試,11G,32位的,64位的,12C的,每次都折騰表空間,用戶、tns啥的,這裡記錄下,再也不用現用現百度找了

一、創建表空間、用戶 

在plsql工具中執行以下語句,可建立Oracle表空間。

/*分為四步 */
/*第1步:創建臨時表空間  */
create temporary tablespace tempdb
tempfile 'C:\oracledata\cognos_temp.dbf'
size 50m 
autoextend on 
next 50m maxsize 20480m 
extent management local; 

/*第2步:創建數據表空間  */
create tablespace budget 
--logging 
datafile 'C:\oracledata\cognos_data.dbf'
size 50m 
autoextend on 
next 50m maxsize 20480m 
extent management local;


/*第3步:創建用戶並指定表空間  */
create user aicognos identified by qaz#1234
default tablespace budget
temporary tablespace tempdb; 

/*第4步:給用戶授予權限  */
grant connect,resource,dba to aicognos;

二、配置服務器端監聽文件

c$\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN的listener.ora

COGNOSDB86 =
  (ADDRESS_LIST =
        (ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCCOGNOSDB86))
        (ADDRESS= (PROTOCOL= TCP)(Host= 10.1.1.86)(Port= 1521))
  )

SID_LIST_COGNOSDB86 =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME= C:\app\Administrator\product\11.2.0\dbhome_1)
      (SID_NAME = COGNOSDB86)
    )
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
    )
  )

STARTUP_WAIT_TIME_COGNOSDB86 = 0
CONNECT_TIMEOUT_COGNOSDB86 = 10
TRACE_LEVEL_COGNOSDB86 = OFF

 

三、配置TNS

c$\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN的tnsnames.ora

COGNOSDB86 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = COGNOSTEST4.ai.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cognosdb86.ai.com)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved