Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Psd Link Local tnsnames

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The client tool plsql developer links to tnsname-NEW on Windows, and then links to snooping on linux through NEW. To link to the database

1 verify the monitoring status on linux 1 View the monitoring status

[oracle@dan ~] $lsnrctl status

There are three essential elements in monitoring: ip, port number, and service. It indicates that linux snooping is normal. So we can link to the database through the password file through xshall.

[oracle@dan ~] $sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Mar 8 20:59:48 2020

Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

If you want to use the network, you need the following tnsnames.ora

2 View listener.ora on linux

[oracle@dan admin] $pwd

/ u01/app/oracle/product/11.2/db_1/network/admin/

[oracle@dan admin] $cat listener.ora

# listener.ora Network Configuration File: / u01/app/oracle/product/11.2/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = dan) (PORT = 1521))

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))

)

)

ADR_BASE_LISTENER = / u01/app/oracle

You can see the ip and port number from listener.ora, but you can't see the service

2 check the tnsnames.ora on linux. If not, you can add it manually.

NEW=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.56) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = orcl)

)

)

Take network verification:

[oracle@dan admin] $sqlplus system/oracle@NEW

SQL*Plus: Release 11.2.0.4.0 Production on Sun Mar 8 21:22:53 2020

Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL >

Can enter, it means that there is no problem with tnsnames.ora.

If you can't get in, check the firewall first.

Service iptables status

Sestatus

If all are turned off, you need to verify the ip, port, and service.

[oracle@dan admin] $pin g 192.168.56.56

[oracle@dan admin] $telnet 192.168.56.56 1521

If the service is provided, you can view it by viewing the service in the listening lsnrctl stauts.

You can also verify the string name:

[oracle@dan admin] $tnspin g NEW

The last. Be sure to remember the file name as tnsnames.ora. There is an s. This is stupid.

2 Local tnsnames

1 there is also a tnsnames.ora file in the local E:\ app\ Administrator\ product\ 11.2.0\ dbhome_1\ NETWORK\ ADMIN. The client tool is to monitor the linux linked through Windows's tnsnames, and then to link to the database.

2 View the tnsnames of Windows

NEW=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.56) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = orcl)

)

)

This is actually the same as that on linux. In fact, if you want to link to psd, you can do without the tnsnames on linux, because Windows is the listening on the linked linu. 3 elements of monitoring: ip, port, service

3 if the psd link is not available, verify ip, port, and service

A) verify ip. No problem

B) verify the port number. From the listening status lsnrctl status on the linux above, you know that the port number is 1521. There is no problem with entering the description port number 1521.

C) Services

The local (SERVICE_NAME = orcl) is consistent with the series in the listening state on linux.

At this point, psd can link to the database through the local link string NEW

But sys users are always unable to link.

[oracle@dan admin] $sqlplus sys/oracle@NEW as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Mar 8 21:46:41 2020

Copyright (c) 1982, 2013, Oracle. All rights reserved.

ERROR:

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER Enter user-name: EXIT

Enter password:

ERROR:

ORA-01017: invalid username/password; logon denied

Is it the wrong sys password?

SQL > alter user sys identified by oracle

User altered.

[oracle@dan admin] $sqlplus sys/oracle@NEW as sysdba

But it was the same mistake, and later, sys users were special users. A special password file is required, in $ORALE_HOME/dbs

[oracle@dan admin] $cd $ORACLE_HOME/dbs

[oracle@dan dbs] $ll

Total 97884

-rw-rw----. 1 oracle dba 1544 Mar 8 16:56 hc_orcl.dat

-rw-r--r--. 1 oracle dba 2851 May 15 2009 init.ora

-rw-r-. 1 oracle dba 24 Mar 8 12:06 lkORCL

-rw-r-. 1 oracle dba 3584 Mar 8 16:26 spfileorcl.ora

There is no orapw file in it. So I haven't been able to log in through the Internet.

[oracle@dan dbs] $orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle force=y

Verification

[oracle@dan dbs] $sqlplus sys/oracle@NEW as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Mar 8 21:55:05 2020

Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

There should be no problem. Go to psd to verify.

You can also use ip: Port number / service name

Complete

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report