The following are all Oracle database connection strings. The summary is very detailed, but I did not summarize them. I just learned from Oracle. Paste it out. The first is
The following are all Oracle database connection strings. The summary is very detailed, but I did not summarize them. I just learned from Oracle. Paste it out. The first is
The following are all Oracle database connection strings. The summary is very detailed, but I did not summarize them. I just learned from Oracle. Paste it out. First, it is convenient for you to search for it later, and second, it also provides convenience for you who need it. If you forget it, right. Very useful. Learning !!!
ODBC
New Version
Driver = {Microsoft ODBC for Oracle}; Server = myServerAddress; Uid = myUsername; Pwd = myPassword;
Old Version
Driver = {Microsoft ODBC Driver for Oracle}; ConnectString = OracleServer. world; Uid = myUsername; Pwd = myPassword;
Ole db, OleDbConnection (. NET)
Standard connection. This connection string applies to Microsoft drivers.
Provider = msdaora; Data Source = MyOracleDB; User Id = myUsername; Password = myPassword;
Trusted connection
Provider = msdaora; Data Source = MyOracleDB; Persist Security Info = False; Integrated Security = Yes;
Standard connection, driven by Oracle.
Provider = OraOLEDB. Oracle; Data Source = MyOracleDB; User Id = myUsername; Password = myPassword;
Trusted connection
Provider = OraOLEDB. Oracle; Data Source = MyOracleDB; paiuthent = 1;
Oracle. DataAccess. Client. OracleConnection
Data Source = TORCL; User Id = myUsername; Password = myPassword;
Standard secure connection
Data Source = TORCL; Integrated Security = SSPI;
Use ODP. NET instead of tnsnames. ora
Data Source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = MyHost) (PORT = MyPort) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MyOracleSID); User Id = myUsername; Password = myPassword;
OracleConnection, Oracle Data Provider, ODP. NET, System. Data. OracleClient. OracleConnection
Standard
Data Source = MyOracleDB; Integrated Security = yes;
For 8i RC3 and later versions
User name and password
Data Source = MyOracleDB; User Id = myUsername; Password = myPassword; Integrated Security = no;
For 8i RC3 and later versions
Ignore tnsnames. ora. The other connection method does not need to use DSN.
SERVER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = MyHost) (PORT = MyPort) (CONNECT_DATA = (SERVICE_NAME = MyOracleSID); uid = myUsername; pwd = myPassword;
Using the above connection string may cause Visual Studio to report errors. If you encounter these problems during use, use the following connection method.
Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = MyHost) (PORT = MyPort) (CONNECT_DATA = (SERVICE_NAME = MyOracleSID ))); user Id = myUsername; Password = myPassword;
Use connection pool
If the connection pool service program cannot find an existing connection pool, it creates a new pool based on the connection string. Otherwise, the existing connection in the pool will be used cyclically.
Data Source = myOracleDB; User Id = myUsername; Password = myPassword; Min Pool Size = 10; Connection Lifetime = 120; Connection Timeout = 60; Incr Pool Size = 5; decr Pool Size = 2;
Windows Authentication
Data Source = myOracleDB; User Id = /;
Privileged connection
Use SYSDBA
Data Source = myOracleDB; User Id = SYS; Password = SYS; DBA Privilege = SYSDBA;
Privileged connection
Use SYSOPER
Data Source = myOracleDB; User Id = SYS; Password = SYS; DBA Privilege = SYSOPER;
Copy
Password Expiration Process
When a "password expired" error occurs when you connect to the database using a connection string, run the OpenWithNewPassword command to provide the new password.
Data Source = myOracleDB; User Id = myUsername; Password = myPassword;
OConn. OpenWithNewPassword (sTheNewPassword );
Proxy Verification
Data Source = myOracleDB; User Id = myUsername; Password = myPassword; Proxy User Id = pUserId; Proxy Password = pPassword;
Core Labs OraDirect (. NET)
User ID = myUsername; Password = myPassword; Host = ora; Pooling = true; Min Pool Size = 0; Max Pool Size = 100; Connection Lifetime = 0;
MS Data Shape
Provider = MSDataShape.1; Persist Security Info = False; Data Provider = MSDAORA; Data Source = orac; User Id = myUsername; Password = myPassword;