Problemi di connessione con il database

Answered Problemi di connessione con il database

  • Saturday, May 12, 2012 4:45 PM
     
     

    Salve a tutti,
    non so se è qui è il posto giusto per questo thread scusatemi se non dovesse esserlo.

    E' in produzione da un mio cliente un'applicazione da me sviluppata, perfettamente funzionante e che non ha subito modifiche da diverso tempo.
    L'applicazione all'avvio presenta una classica maschera di login che effettua un tentativo di accesso matchando le credenziali, user & password, su una tabella di SQL.
    Come dicevo non ha mai dato problemi sino a quando il cliente non ha cambiato la macchina dove è installato il database.

    Praticamente ora succede questo: al primo tentativo di accesso dà errore di connessione, ma se tra il primo tentativo ed il secondo passa un tempo maggiore di circa 30 secondi la connessione al database e l'accesso vanno a buon fine.

    Premetto che il firewall ha tutte le eccezioni censite: ho aperto praticamente in TCP e UDP tutte le porte possibili ed immaginabili (1434, 1433, 443, 2382,135 praticamente tutte anche se inutili) ed il problema si presenta lo stesso.
    Ma se il firewall è disabilitato il problema non si verifica e la connessione avviene correttamente al primo colpo.

    Ora secondo voi:
    1) aumento il timeout nella stringa di connessione? al momento non è presente il timeout nella stringa di connessione;
    2) potrebbe essere un problema di tipo hardware, forse della scheda di rete che non risponde subito? dico al cliente di cambiare la scheda di rete?;
    3) imposto una ripetizione del tentativo di accesso più di una volta?ma mi sembra una porcata!!!.

    Note:

    - il database utilizzato è SQL SERVER 2008 R2 EXPRESS EDITION

    - il S.O. del "server" è XP con SP3 aggiornatissimo

    Grazie a tutti.
    Saluti.

All Replies

  • Saturday, May 12, 2012 6:32 PM
    Moderator
     
     Answered

    Hello Richar4You,

    This is a US forum where the current language is english but a part of the posters or moderators are people for whom english is not the mother tongue. It is my case and i am doing all i can do to reply in english.

    Please, could you rewrite your 1st post in english ?

    I think that your language is italian or spanish or at laest a language coming from latin.

    All i have be able to understand :

    - you are using SQL SERVER 2008 R2 Express ( basic,with Reporting Services,with Advanced Service ?) . Have you installed the SP1 ?

    - you have problems of connection timeout. But your firewall is disabled and the main TCP/UDP ports are open

    As you have an Express Edition, have you checked wih the SQL Server Configuration Manager that the TCP/IP provider is enabled ( with Express Edition , the default is disabled... )

    Please, could you provide the full connection string used by your application ? Don't forget to replace your SQL login and password by ***** ( question of security for you ).

    Please, could you provide the full error message you are getting when your connection is failing ? ( be careful, often error messages are long but the cause of the fail may be found in the 1st,2nd or 3rd part of this message )

    When you install a SQL Server Express, the default name proposed is SQLEXPRESS. The name of the SQL Server to use in the connection string is MyComputerName\SQLEXPRESS where MyComputerName is the Windows name of the computer where the SQL Server is installed.

    You can also do a default install with a name set to empty ( by rubbing off the SQLEXPRESS proposed name ). In this case, the name of tha datasource in the connection string is MyComputerName only.

    I have also a XP Pro SP3 and 2 SQL Server instance ( Developer 2008 and Express with Advanced Services , both with SP3 Service pack ) and on another computer Windows 7 + 2 SQL Server Express 2008 R2 SP1 ( a no-named one and a named one )

    We are waiting for your feedback to try to help you more efficiently.

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

  • Sunday, May 13, 2012 7:58 AM
     
     

    Thank you so much for your response. I apologise for my error, but I was convinced to write on Italian forum. Sorry! ;(

    I'll write on Italian Forum ... I hope well!!! :)))

    However thanks for your indications.

    I'm Italian .... pizza, spaghetti and ..... ! :)))))

    Regards.