Oracle Wallet use and maintenance
Starting with ORACLE10GR2, using Oracle Wallet to reach any user without a password to log in to the database (non-operating system authentication) is useful for operating with a script to log into a database, especially for enterprise security requirements. Do not want the user name and password plaintext in the configuration file, and for password maintenance is very convenient, such as I put wallet under the specified path, when changing the password, only need to uniformly cover wallet, for a large number of application server is particularly convenient.
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, Oracle and/or its subsidiaries. All rights reserved.
Enter Password:
PKI-01002: The password is invalid. The password must be at least 8 characters long and should contain both letters and numbers (or special characters).
Enter Password:
PKI-01002: The password is invalid. The password must 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, Oracle and/or its subsidiaries. All rights reserved.
Enter Password:
Enter the password again:
E:\wallet>dir
The volume in drive E is the new volume
The serial number of the volume is a80d-eb59
Directory of E:\wallet
2018/02/05 10:34 <DIR>.
2018/02/05 10:34 <DIR>.
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 200,386,322,432 bytes available
Tnsping.ora Join
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, Oracle and/or its subsidiaries. All rights reserved.
Enter 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, 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 sign in using wallet without a password on the client:
1. Create wallet (Tnsname.ora inside the connection string, Sqlnet.ora file contents are copied to the client)
2. Copy the wallet to the client-specified path (note file permissions and owner)
3. Modify the connection string for the connection server in the client's Tnsname.ora file as the connection string at the time of creation, and add the following in the Sqlnet.ora file:
Wallet_location= (Source= (Method=file) (Method_data= (Directory=e:\wallet)))
Sqlnet. Wallet_override = TRUE
4. Test in Sqlplus no password etc
sqlplus/@scott_10.8.5.206
The connection database password form in JDBC is as follows:
public static Connection getconnection () throws SQLException {
Drivermanager.registerdriver (New Oracledriver ());
Connection conn = drivermanagerbr/>.getconnection ("jdbc:oracle:oci:/@scott_10.8.5.206");
Return conn;
}
Oracle No password login