Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/01/2015, 13:17
Avatar de hackcrack
hackcrack
 
Fecha de Ingreso: abril-2011
Mensajes: 331
Antigüedad: 13 años
Puntos: 9
Respuesta: Problema lentitud conexión con base SQL

El script que uso para abrir la conexion es el siguiente:

Código PHP:
Ver original
  1. $this->activeConnections[$name] = new PDO(
  2.               self::$connections[$name]['dsn'],
  3.               self::$connections[$name]['username'],
  4.               self::$connections[$name]['password'],
  5.               $options
  6.             );
  7.             $this->activeConnections[$name]->fetch_mode = PDO::FETCH_OBJ;
  8.             $this->activeConnections[$name]->setAttribute(PDO::ATTR_PERSISTENT, true); 
  9.             $this->activeConnections[$name]->setAttribute(PDO::ATTR_DRIVER_NAME , PDO::SQLSRV_TXN_READ_UNCOMMITTED);
  10.             $this->activeConnections[$name]->setAttribute(PDO::ATTR_TIMEOUT, 50);
  11.             $this->activeConnections[$name]->setAttribute(PDO::SQLSRV_ATTR_QUERY_TIMEOUT, 50);
  12.             $this->activeConnections[$name]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
__________________
Los mejores juegos de PC gratis en ******