Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBeaver-SystemUserConnection-Failure-Solution #4

Open
bshclosegrip opened this issue Apr 2, 2021 · 0 comments
Open

DBeaver-SystemUserConnection-Failure-Solution #4

bshclosegrip opened this issue Apr 2, 2021 · 0 comments

Comments

@bshclosegrip
Copy link
Owner

bshclosegrip commented Apr 2, 2021

  • system 유저로 접속한 후 작업하기_21.04.02
    ALTER USER hr IDENTIFIED BY 1111;

  • 계정에 LOCK이 걸린 경우
    ALTER USER hr account unlock;

package kr.jobtc.json;

import java.sql.DriverManager;
import java.sql.Connection;

public class DBconn {
	String driver = "oracle.jdbc.driver.OracleDriver";
	String url = "jdbc:oracle:thin:@127.0.0.1:1521:ORCL";
	String user = "system";
	String pwd = "1234";
	Connection conn = null;
	
	public Connection getConn() {
		try {
			Class.forName(driver);
			conn = DriverManager.getConnection(url, user, pwd);
		} catch(Exception ex) {
			ex.printStackTrace();
		}
		return conn;	
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant