How to read the information inside DSN?(編號:3323)

Given a DSN, how to read the server, database,uid,pwd,etc. informations?