Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set SQL Connection Timeout
Message
 
 
À
09/04/2021 14:26:38
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01679714
Message ID:
01679735
Vues:
26
>>>>I did try to restart the service and all works fine. So, in my opinion, stopping/pausing/restarting the service is not what I am looking for. I need to be able to set something to have the connection time out. But maybe such thing does not even exist.
>>>
>>>You'd need another box, with SQL server on it, express version would suffice. It may be virtual. And then you just yank the network cable (simulate network breakup), or suspend that machine (server down - works the same with virtual), or go for a walk and see if it timed out on you when you come back.
>>
>>I do have another PC, Windows 10, which is on the same "network" since both PCs are working through the same router. I need to re-learn how to be able to "view" the Windows 10 from this, Windows 7.
>
>Good luck. I think on the machine where you put the SQL you only need to open port 1433 both ways (in and out) in the firewall settings. I did that on a few 2012 or 2016 servers (perhaps ever newer ones) when the customers had partially installed the SQL server, leaving everything on default. And we know this server is written by the world champion in the category of wrong defaults. Sometimes I think they add a feature only in order to annoy us, so we'd have to find where it's set (or more often tamed, disabled or just shot). So I sort of remember what the usual steps were: enable direct logins (default is to use windows/domain logins), change collation to that of the country (specially if the server is in Slovakia and the owners from Canada, they'd never remember to set this)... and then fiddle with the rest if annoying, this alone should be enough to make it work.

After rethinking of what I am trying to do, your suggestion to "yank" the cable is not what I need. If I yank the cable, the SQL Server is down and of course the application will crash.
I am trying to simulate the situation where the SQL Server is up and running nicely. But the application "falls asleep" and loses connection. Then the application tries to restore the connection.
I will try to open the application and then wait for my PC to "fall asleep." Maybe this will create the situation I am looking for. Actually I am leaving in about an hour for about an hour and half. I will start the application and leave it on. I will see what happens when I come back.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform