Don't use databases

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Setting integrated security to false makes it worse for now it asks for username and password. I hate usernames and passwords
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Dann Corbit wrote: Fri Nov 09, 2018 9:54 pm
Henk wrote: Fri Nov 09, 2018 3:34 pm "Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was "



I had to wait at least five minutes before data connection to database could be used.
Maybe because my computer was too busy.

Why don't they give a warning if you want to install SQL server on a slow computer.

I don't know what is going on.

Might be windows 10 secret services being overly busy. I don't know.

Or maybe this database contains too many chess positions? Makes no sense too.
SQL Server (when installed with defaults) makes lots of assumptions about resources that are not necessarily valid.
One of them is "all your resources are belong to us!", since the SS team is probably run by aliens.
SQL Server will use all the available memory. Then when you run some other task that consumes a lot of memory, you have paging madness.
So limit SQL Server to a sensible amount of memory (under: server properties/memory/maximum memory). Also, don't install SS on a wimpy machine unless you want wimpy data access.
The suggestion of using an embedded database like SQLite is a good one. An embedded database tends to be quite fast, but the down side is it is normally limited to a single user. If that is OK for your application, it is often a good idea.

Once you get used to doing database access, you will never want to go back to files.
With sql server object inspector I can only view these properties like maximum memory but can't change them for they are disabled (greyed out)
Same holds for sql memory studio


Visual studio 2017 now using 850MB memory while I'm doing nothing right now. Using two sql server windows nt 64 processes consuming both about 200 MB. I even don't understand why it needs two processes is one not enough?
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Henk wrote: Sat Nov 24, 2018 12:35 pm
Dann Corbit wrote: Fri Nov 09, 2018 9:54 pm
Henk wrote: Fri Nov 09, 2018 3:34 pm "Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was "



I had to wait at least five minutes before data connection to database could be used.
Maybe because my computer was too busy.

Why don't they give a warning if you want to install SQL server on a slow computer.

I don't know what is going on.

Might be windows 10 secret services being overly busy. I don't know.

Or maybe this database contains too many chess positions? Makes no sense too.
SQL Server (when installed with defaults) makes lots of assumptions about resources that are not necessarily valid.
One of them is "all your resources are belong to us!", since the SS team is probably run by aliens.
SQL Server will use all the available memory. Then when you run some other task that consumes a lot of memory, you have paging madness.
So limit SQL Server to a sensible amount of memory (under: server properties/memory/maximum memory). Also, don't install SS on a wimpy machine unless you want wimpy data access.
The suggestion of using an embedded database like SQLite is a good one. An embedded database tends to be quite fast, but the down side is it is normally limited to a single user. If that is OK for your application, it is often a good idea.

Once you get used to doing database access, you will never want to go back to files.
With sql server object inspector I can only view these properties like maximum memory but can't change them for they are disabled (greyed out)
Same holds for sql memory studio


Visual studio 2017 now using 850MB memory while I'm doing nothing right now. Using two sql server windows nt 64 processes consuming both about 200 MB. I even don't understand why it needs two processes is one not enough?
Of course I meant sql management studio. At least not fool proof for I don't know how to change maximum memory.
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Code word for windows 10 is services.msc.
I write it down here otherwise I might forget and would not know how to restore.

By the way viruschecker and 'Nt Kernel and system' are still blocking my disk too much.
So problem not solved.
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Only had to wait about three hours after start up until my computer is reasonably working normal today.
Could be worse.

By the way if something is really blocking my slow disk it is the virus checker.

As we all know one should have two devices. One connected to outer world and one totally disconnected.
So on the second one you don't need a viruschecker that may block your activities.
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Actually one should store network structure also in database.
Parameters are not enough.
Otherwise you get to much duplicate C# code when using many networks.
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

Somehow signalR did not work for monitoring a position analysis
I'm sure it used to work for playing a game. But therefor it needs usernames.
I can't remember where user names were stored. I remember somewhere in a database.
But now sql management studio does not work anymore. For I was too busy few weeks ago to remove software I did not use.

So now I have to re-install sql server management studio.

What a mess.

I might have removed the sql database with user names.

Er is een netwerkfout of een exemplaarspecifieke fout opgetreden tijdens het maken van verbinding met SQL Server. De server is niet gevonden of is niet toegankelijk. Controleer of de exemplaarnaam correct is en of in de instellingen van SQL Server externe verbindingen zijn toegestaan. (provider: SQL Network Interfaces, error: 26 - Fout bij zoeken van opgegeven server/exemplaar)
Beschrijving: Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.

Details van uitzondering: System.Data.SqlClient.SqlException: Er is een netwerkfout of een exemplaarspecifieke fout opgetreden tijdens het maken van verbinding met SQL Server. De server is niet gevonden of is niet toegankelijk. Controleer of de exemplaarnaam correct is en of in de instellingen van SQL Server externe verbindingen zijn toegestaan. (provider: SQL Network Interfaces, error: 26 - Fout bij zoeken van opgegeven server/exemplaar)

Fout in bron:


Regel 73: // This doesn't count login failures towards account lockout
Regel 74: // To enable password failures to trigger account lockout, change to shouldLockout: true
Regel 75: var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
Regel 76: switch (result)
Regel 77: {
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

===================================

Cannot connect to HP\SQLEXPRESS.

===================================

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName ... nkId=20476

------------------------------
Error Number: 2
Severity: 20
State: 0


------------------------------
Program Location:

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

===================================

Het systeem kan het opgegeven bestand niet vinden
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

I had to start SQLServer sqlexpress manually using windows services.
Now it can connect.

Still a problem that I can't find sql configuration manager.

User names and passwords in asp.net mvc 4 are stored in database DefaultConnection it seems.
Can't remember passwords for it has been a year ago.
So I probably have to register a new user.
Henk
Posts: 7234
Joined: Mon May 27, 2013 10:31 am

Re: Don't use databases

Post by Henk »

SignalR does work on my computer but I had to re-install an older version.
Maybe best would be to use .net core instead of .net framework.

Chess position analysis still does not work with signalR . Might be it never did.
So I have to debug if I have time.