oracle遠程鏈接:sql
方法一:使用Net Configuration Assistant,配置 "本地網絡服務名配置"數據庫
方法二:在D:\app\DR\product\12.1.0\dbhome_1\NETWORK\ADMIN服務器
tnsnames.ora中添加:網絡
OLCLASS =oracle
(DESCRIPTION =app
(ADDRESS_LIST =ide
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.18.12)(PORT = 1521))spa
)orm
(CONNECT_DATA =ci
(SERVICE_NAME = olclass)
)
)
方法三:下載instantclient_11_2,將裝有oracle服務器的tnsnames.ora複製到目錄下,按方法二配置。
plsql遠程鏈接oracle:
先按上面的方法三配置。而後
PL/SQL Developer中,在perference->Connection裏面設置OCI Library和Oracle_Home,例如本機設置爲:
Oracle Home :D:\Oracle\app\Dell\product\instantclient_11_2
OCI Library :D:\Oracle\app\Dell\product\instantclient_11_2\oci.dll
右擊"個人電腦" - "屬性" - "高級" - "環境變量" - "系統環境變量":
1>.選擇"Path" - 點擊"編輯", 把 "D:\Oracle\app\Dell\product\instantclient_11_2;" 加入;
2>.點擊"新建", 變量名設置爲"TNS_ADMIN", 變量值設置爲"D:\Oracle\app\Dell\product\instantclient_11_2;", 點擊"肯定";
3>.點擊"新建", 變量名設置爲"NLS_LANG", 變量值設置爲"SIMPLIFIED CHINESE_CHINA.ZHS16GBK", 點擊"肯定";
最後點擊"肯定"退出.
忘記了oracle帳號:
win+r運行cmd
跳轉到安裝目錄的bin,好比:D:\app\DR\product\12.1.0\dbhome_1\BIN
echo %ORACLE_SID%
set ORACLE_SID=orcl
orcl是你的數據庫實例名
sqlplus.exe / as sysdba
alter user your_username identified by new_password