eclipse下的tomcat配数据源,文件名为context.xml:
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="100" maxIdle="10" maxWait="5000" name="iac" password="dd" type="javax.sql.DataSource" url="jdbc:oracle:thin:@10.85.144.36:1521:IMS" username="ims"/>
其中name="iac"为jndi的名字[dataSourceName=java:comp/env/iac](前面加"java:comp/env/")
password="dd" 为数据库登录密码
username="ims"为数据库名
plsql的登录配置,文件名为tnsnames.ora,路径D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
其中name1、name2为plsql登录页面Database的下拉框选项。
name1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 主机名/ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 数据库的服务名)
)
)
name2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 主机名/ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 数据库的服务名)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)[这个跟其他的不太一样,不知道为什么]
。。。