Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
SQL Server 2000/2005/2008, Express, Access, MySQL, Oracle
[sql server 2005] lentezza apertura connessione
mercoledì 09 gennaio 2008 - 13.47
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
escaflowne
Profilo
| Junior Member
180
messaggi | Data Invio:
mer 9 gen 2008 - 13:47
Ciao a tutti,
il programma che ho fatto (vb.net 2005) ci mette troppo (secondo me) a partire perchè il server su cui risiede il db (sql server) ci mette abbastanza a rispondere (solo alla prima connessione, poi tutto procede abbastanza velocemente).
Per velocizzare la connessione, non ci ho ancora studiato a fondo ma, secondo voi, come posso fare?
Avevo pensato, su due piedi, ad un servizio da far partire all'avvio dei client che impostasse la connessione ma poi, tale connessione, la posso richiamare dal programma?
Grazie
lbenaglia
Profilo
| Guru
5.625
messaggi | Data Invio:
mer 9 gen 2008 - 14:12
>il programma che ho fatto (vb.net 2005) ci mette troppo (secondo
>me) a partire perchè il server su cui risiede il db (sql server)
>ci mette abbastanza a rispondere (solo alla prima connessione,
>poi tutto procede abbastanza velocemente).
Verifica che il database non sia impostato in autoclose.
Se utilizzi SQL Server 2005 seleziona il db in SSMS, tasto DX, Properties..., Options, e verifica che Auto Close sia a False.
>Grazie
Prego.
Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://blogs.dotnethell.it/lorenzo/
http://italy.mvps.org
escaflowne
Profilo
| Junior Member
180
messaggi | Data Invio:
mer 9 gen 2008 - 14:22
in effetti autoclose è su true.
Incide tanto?
Un eventuale servizio allora, non chiudendosi se setto a false (giusto?) la connessione, non servirebbe a niente?
Intanto grazie mille!!!
lbenaglia
Profilo
| Guru
5.625
messaggi | Data Invio:
mer 9 gen 2008 - 14:44
>in effetti autoclose è su true.
>Incide tanto?
Si, allungando i tempi di connessione dato che il database deve essere rimesso online prima che qualcuno possa accedervi.
Se Autoclose = True, SQL Server "chiuderà" automaticamente il database dopo un certo tempo di inutilizzo.
Dai BOL:
AUTO_CLOSE { ON | OFF }
ON
The database is shut down cleanly and its resources are freed after the last user exits.
The database automatically reopens when a user tries to use the database again. For example, by issuing a USE database_name statement. If the database is shut down cleanly while AUTO_CLOSE is set to ON, the database is not reopened until a user tries to use the database the next time the Database Engine is restarted.
OFF
The database remains open after the last user exits.
The AUTO_CLOSE option is useful for desktop databases because it allows for database files to be managed as regular files. They can be moved, copied to make backups, or even e-mailed to other users.
Note:
In earlier versions of SQL Server, AUTO_CLOSE is a synchronous process that can degrade performance when the database is accessed by an application that repeatedly makes and breaks connections to the Database Engine. In SQL Server 2005, the AUTO_CLOSE process is asynchronous; repeatedly opening and closing the database no longer reduces performance.
>Un eventuale servizio allora, non chiudendosi se setto a false
>(giusto?) la connessione, non servirebbe a niente?
E' una configurazione a livello di database che entra in gioco quando non ci sono più connessioni attive per un certo periodo di tempo, quindi risulta indipendente dalle applicazioni client che vi accedono.
>Intanto grazie mille!!!
Prego.
Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://blogs.dotnethell.it/lorenzo/
http://italy.mvps.org
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !