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

Oracle login without password

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Use and maintenance of oracle wallet

Starting with Oracle10gR2, any user can log in to the database without a password (non-operating system authentication) by using Oracle Wallet, which is very useful for using scripts to log in to the database Especially for the enterprise security requirements are very high, do not want the user name and password plaintext in the configuration file, and for password maintenance is extremely convenient, for example, I put wallet under the specified path, when changing the password, only need to uniformly cover wallet, especially convenient for a large number of application servers.

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > mkstore-wrl e:\ wallet-create

Oracle Secret Store Tool: version 12.2.0.1.0

Copyright (c) 2004, 2016, Oracle and / or its subsidiaries. All rights reserved.

Enter the password:

PKI-01002: the password is invalid. Passwords should be at least 8 characters long and should contain both letters and numbers (or special characters).

Enter the password:

PKI-01002: the password is invalid. Passwords should be at least 8 characters long and should contain both letters and numbers (or special characters).

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > mkstore-wrl e:\ wallet-create

Oracle Secret Store Tool: version 12.2.0.1.0

Copyright (c) 2004, 2016, Oracle and / or its subsidiaries. All rights reserved.

Enter the password:

Enter the password again:

E:\ wallet > dir

The volume in drive E is newly added.

The serial number of the volume is A80D-EB59

Directory of e:\ wallet

2018-02-05 10:34.

2018-02-05 10:34..

2018-02-05 10:34 194 cwallet.sso

2018-02-05 10:34 0 cwallet.sso.lck

2018-02-05 10:34 149 ewallet.p12

2018-02-05 10:34 0 ewallet.p12.lck

4 files 343 bytes

2 directories 200386322432 available bytes

Tnsping.ora joining

Scott_10.8.5.206 =

(DESCRIPTION =

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

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = newtest)

)

)

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > mkstore-wrl e:\ wallet-createCredential scott_10.8.5.206 c##scott tiger

Oracle Secret Store Tool: version 12.2.0.1.0

Copyright (c) 2004, 2016, Oracle and / or its subsidiaries. All rights reserved.

Enter the Wallet password:

E:\ wallet > sqlplus / @ scott_10.8.5.206

SQL*Plus: Release 12.2.0.1.0 Production on Monday February 5 11:08:58 2018

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

Last successful login time: Monday February 05 2018 11:08:36 + 08:00

Connect to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production

To log in without a password using wallet on the client:

1. Create wallet (the connection string in tnsname.ora, the contents of sqlnet.ora file must be copied to the client)

two。 Copy the wallet to the client specified path (pay attention to file permissions and ownership)

3. Modify the connection string of the connection server in the client's tnsname.ora file to the connection string when it was created, and add the following to the sqlnet.ora file:

WALLET_LOCATION= (SOURCE= (METHOD=FILE) (METHOD_DATA= (DIRECTORY=e:\ wallet)

SQLNET.WALLET_OVERRIDE = TRUE

4. Test in sqlplus without password, etc.

Sqlplus / @ scott_10.8.5.206

The password for connecting to the database in jdbc is as follows:

Public static Connection getConnection () throws SQLException {

DriverManager.registerDriver (new OracleDriver ())

Connection conn = DriverManager.getConnection ("jdbc:oracle:oci:/@scott_10.8.5.206"); br/ > .getConnection ("jdbc:oracle:oci:/@scott_10.8.5.206")

Return conn

}

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