카테고리 없음
[oracle] SID / Service Name 접속시 차이 (sqlplus, jdbc)
냐옴
2024. 11. 5. 15:06
sqlplus 로 접속
# SID 로 접속 (:orcl)
sqlplus username/password@127.0.0.1:1521:orcl
# Service Name 으로 접속 (/orcl)
sqlplus username/password@127.0.0.1:1521/orcl
jdbc 로 연결
# SID 로 연결시 ( @hostname, :SID )
jdbc:oracle:thin:@hostname:port:SID
# ServiceName 으로 연결시 ( @//hostname, /ServiceName )
jdbc:oracle:thin:@//hostname:port/servicename
# SID 로 연결시
jdbc:oracle:thin:@127.0.0.1:1521:ORCL
# ServiceName 으로 연결시
jdbc:oracle:thin:@//127.0.0.1:1521/ORCL