PL\SQL数据库创建表空间+导入导出.txt+listener.ora文件+tnsnames.ora文件

创建表空间
表空间:
CREATE SMALLFILE TABLESPACE LISCNPC DATAFILE 'D:\oracle\bus' SIZE 10M
AUTOEXTEND ON NEXT 10M MAXSIZE 120M
LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
用户语句:
create user liscnpc identified by liscnpc default tablespace liscnpc;
grant dba to liscnpc;
grant connect,resource to liscnpc;
grant select any table to liscnpc;

删除用户
drop user liscnpc cascade

导入:
cmd/
imp liscnpc/liscnpc file=D:\shop.dmp fromuser=liscnpc


导出:exp liscnpc/liscnpc@ORCL1 file=xshopxx.dmp

1.listener.ora文件:

# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = ZHUYONG)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)

2.tnsnames.ora文件

# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCL1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = zhuyong)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = L0COB6ZITNXIUNF)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

你可能感兴趣的:(tnsnames.ora)