sqlsrv_configure

(No version information available, might only be in Git)

sqlsrv_configureAltera as configurações de tratamento de erros e registro do driver

Descrição

sqlsrv_configure(string $setting, mixed $value): bool

Altera as configurações de tratamento de erros e registro do driver.

Parâmetros

setting

O nome da configuração a ser definida. Os valores possíveis são "WarningsReturnAsErrors", "LogSubsystems" e "LogSeverity".

value

O valor da configuração especificada. A tabela a seguir mostra os valores possíveis:

Opções de Configuração de Erro e Registro
Configuração Opções
WarningsReturnAsErrors 1 (true) or 0 (false)
LogSubsystems SQLSRV_LOG_SYSTEM_ALL (-1) SQLSRV_LOG_SYSTEM_CONN (2) SQLSRV_LOG_SYSTEM_INIT (1) SQLSRV_LOG_SYSTEM_OFF (0) SQLSRV_LOG_SYSTEM_STMT (4) SQLSRV_LOG_SYSTEM_UTIL (8)
LogSeverity SQLSRV_LOG_SEVERITY_ALL (-1) SQLSRV_LOG_SEVERITY_ERROR (1) SQLSRV_LOG_SEVERITY_NOTICE (4) SQLSRV_LOG_SEVERITY_WARNING (2)

Valor Retornado

Retorna true em caso de sucesso ou false em caso de falha.

add a note

User Contributed Notes 1 note

up
-11
smhahmadi
11 years ago
Performance tip:

Beware of the performance penalty involved with unchecked use of logging options. In my case, although I was using the buffered cursor, sqlsrv_fetch_array was running too slowly. The solution was to remove my lavish use of those configuration options (using both SQLSRV_LOG_SYSTEM_ALL and SQLSRV_LOG_SEVERITY_ALL).
To Top