Is it possible to use sqlplus to programmatically check a database connection (in particular, the SYS account)?
I'm thinking something along this line
- Run sql plus (using Process.Start) with some parameter, giving the sys username and password
- Check the exit code (or even the stdout), whether it is successful or not. The best way I can come up so far is to check the stdout string whether the substring "ERROR" exist, but I don't think this is very clean
Is this something possible? What parameter do you suggest I use? The reason I want to do this is because System.Data.OracleClient doesn't support connection as SYSDBA