23 Ekim 2014 Perşembe

sqlplus ve C# ile oracle db baglantı

sqlplus system@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521))(CONNECT_DATA=(SID=xxxxxxxx)))"


C# Oracle DB Baglantı :


         
OracleConnection con = new OracleConnection();

  //using connection string attributes to connect to Oracle Database

con.ConnectionString = "User Id=SIS_SW;Password=xxx;Data Source="
+ "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)"
+ "(HOST=xxxx)(PORT=1521))(CONNECT_DATA="
+ "(SERVICE_NAME=xxxx)))";

con.Open();

                // Close and Dispose OracleConnection object
             
 con.Close();
 con.Dispose();

             

Hiç yorum yok: