我是Oracle 12c的新手。在安装步骤中,我需要在tnsnames.ora文件中添加服务orclpdb。为什么我需要添加此服务?
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
答案 0 :(得分:0)
实际上不需要任何sqlplus @ORCLPDB
文件。
但是,编写sqlplus @(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orclpdb)))
比编写tnsnames.ora
要简单得多。 >>> list_1 = ["1111","2222","3333","4444","5555"]
>>> list_2 = ["k1 1111", "k2 2222", "k3 3333", "k4 4444", "k5 5555", "k6 6666", "k7 7777", "k8 8888" ,"k9 1111"]
>>> [x for x in list_2 if not any( y in x for y in list_1)]
['k6 6666', 'k7 7777', 'k8 8888']
提供了简单的别名,而不是使用相当复杂的全名。