import groovy.sql.Sql
sql = Sql.newInstance(
"jdbc:oracle:thin:@oraclesrv:1521:orcl",
"system",
"manager",
"oracle.jdbc.driver.OracleDriver")
// ディレクトリオブジェクトを列挙する
query = """
select owner, directory_name, directory_path
from all_directories
order by owner, directory_name
"""
sql.eachRow(query){
println("${it.owner},${it.directory_name},${it.directory_path}")
}
動作環境
groovy 1.7.5, JDK6 Update22, Oracle11g R2
関連情報
ALL_DIRECTORIES
http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/statviews_1077.htm#sthref1122
0 件のコメント:
コメントを投稿