Install and Configure SQL Sever for Automation project
Capturing data from the devices are very important for automation project. There are many ways to capturing, processing and storing data. It can be stored to the local database or can be stored to cloud and then it can be processed there. In this tutorial, we shall focus on how to capture data by using Microsoft SQL server.
Downloading and installing SQL server and management studio is not difficult. But configuration of the SQL server can be tricky and in worst case it can be frustrating. I have sometimes tried to similar computers with different result.
=>Download SQL server developer edition from https://www.microsoft.com/en-us/sql-server/sql-server-downloads
=>Download SQL Server Management Studio from https://docs.microsoft.com/fi-fi/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15
=> After installing SQL Server, configure it
=> Now follow these to continue the SQL configuration
SQL Server management studio login failed reason
=> Now we need to create a user and password for the database
=> In management studio, create login | new login, this provides the following dialog
=> If we don’t have user and password then we can’t create tables by using script
=> Now select the root of SQL server in the management studio | properties and make sure that SQL Server and Windows Authentication is selected.
=> In the server role page, allow all, meaning select all permission
=> In the status page grant login and connection permission to database. Now the user should be able to connect to database by program.
=> As a final step, select the SQL server and properties | Security | SQL Server and authentication mode.
=> If you want to drop a user you could execute the following command in SSMS
DROP LOGIN testUser ;
If no user has been created but you are trying to use the user by script then we get the following message.
Msg 15007, Level 16, State 1, Server DESKTOP-0GSQE8L, Line 2
‘databaseusername’ is not a valid login or you do not have permission.
Now our database is ready and we shall be able to connect to the database.
I found a tutorial on Fluent Nhibernate in YouTube, I did not see the source code by adapted the sample and that can be downloaded from this link.
As we are progressing this tutorial text for automation system, in the mean time we can take a look in this site: