StuertzCloud - Creating Local SQL Database : Différence entre versions

[version en cours de rédaction][version en cours de rédaction]
Ligne 37 : Ligne 37 :
 
|Step_Content=<translate>👉 [https://www.microsoft.com/en-us/download/details.aspx?id=104781 Download SQL Server Express 2022]
 
|Step_Content=<translate>👉 [https://www.microsoft.com/en-us/download/details.aspx?id=104781 Download SQL Server Express 2022]
  
* '''Run the Installer''': Locate the downloaded file named <code data-start="33" data-end="56">SQL2022-SSEI-Expr.exe</code> and double-click it to launch the installer.​[https://www.microsoft.com/en-us/download/details.aspx?id=104781&utm_source=chatgpt.com Microsoft+5Microsoft+5Microsoft+5]
+
*'''Run the Installer''': Locate the downloaded file named
* '''Choose Installation Type''': In the installer window, select the '''Basic''' installation option. This will install SQL Server Express with default settings.
+
 
* '''Accept License Terms''': Read and accept the license terms to proceed with the installation.
+
<code data-start="33" data-end="56">SQL2022-SSEI-Expr.exe</code>  
* '''Installation Progress''': The installer will download and install the necessary components. This process may take several minutes.
+
 
* '''Installation Complete''': Once the installation is complete, you'll see a confirmation screen. You can note the instance name (usually <code data-start="109" data-end="121">SQLEXPRESS</code>) for future reference.
+
*and double-click it to launch the installer.​
 +
*'''Choose Installation Type''': In the installer window, select the '''Basic''' installation option. This will install SQL Server Express with default settings.
 +
*'''Accept License Terms''': Read and accept the license terms to proceed with the installation.
 +
*'''Installation Progress''': The installer will download and install the necessary components. This process may take several minutes.
 +
*'''Installation Complete''': Once the installation is complete, you'll see a confirmation screen. You can note the instance name (usually <code data-start="109" data-end="121">SQLEXPRESS</code>) for future reference.
 +
*SA password
  
 
<br /></translate>
 
<br /></translate>
Ligne 49 : Ligne 54 :
 
|Step_Content=<translate>After installation, you can verify that SQL Server Express is running by:
 
|Step_Content=<translate>After installation, you can verify that SQL Server Express is running by:
  
* Opening '''SQL Server Management Studio (SSMS)'''.​
+
*Opening '''SQL Server Management Studio (SSMS)'''.​
* Connecting to the server using the instance name (e.g., <code data-start="56" data-end="70">.\SQLEXPRESS</code>).
+
*Connecting to the server using the instance name  
* Ensuring that the connection is successful and that you can see the server objects.</translate>
+
 
 +
(e.g., <code data-start="56" data-end="70">.\SQLEXPRESS</code>)
 +
 
 +
<br />
 +
 
 +
*Ensuring that the connection is successful and that you can see the server objects.</translate>
 
}}
 
}}
 
{{Tuto Step
 
{{Tuto Step
Ligne 59 : Ligne 69 :
 
{{Tuto Step
 
{{Tuto Step
 
|Step_Title=<translate>Open SQL Server Management Studio (SSMS)</translate>
 
|Step_Title=<translate>Open SQL Server Management Studio (SSMS)</translate>
|Step_Content=<translate>Launch SSMS and connect to your local server. If you used default settings, the server name will be:<syntaxhighlight>
+
|Step_Content=<translate>Launch SSMS and connect to your local server. If you used default settings, the server name will be:
 +
<br /><syntaxhighlight>
 
.\SQLEXPRESS
 
.\SQLEXPRESS
  
</syntaxhighlight>Use “Windows Authentication” unless you specifically created an SQL login.
+
</syntaxhighlight>
 +
 
 +
 
 +
Use “Windows Authentication”
 +
 
 +
Tick trust Server certificate<br />{{Info|...We will set up SQL Authentication later}}
 +
 
 +
 
 
<br /></translate>
 
<br /></translate>
 +
}}
 +
{{Tuto Step
 +
|Step_Title=<translate>Enable SQL Server Authentication Mode</translate>
 +
|Step_Content=<translate>* In '''Object Explorer''', right-click your server and select '''Properties'''.
 +
* Go to the '''Security''' page.
 +
* Under ''Server authentication'', select:  '''SQL Server and Windows Authentication mode'''
 +
* Click '''OK'''.</translate>
 +
}}
 +
{{Tuto Step
 +
|Step_Title=<translate>Restart SQL Service</translate>
 +
|Step_Content=<translate># In SSMS, open '''Object Explorer'''.
 +
# Right-click the server name at the top
 +
# Click '''Restart''' and confirm.
 +
 +
 +
Alternatively, you can use '''SQL Server Configuration Manager''' if SSMS doesn’t show the restart option:
 +
 +
* Open
 +
 +
<code data-start="340" data-end="374">SQL Server Configuration Manager</code>
 +
 +
<br />
 +
 +
* Expand '''SQL Server Services'''
 +
* Right-click '''SQL Server (SQLEXPRESS)''' and choose '''Restart'''</translate>
 +
}}
 +
{{Tuto Step
 +
|Step_Title=<translate>Enable the "sa" Login and Set a Password</translate>
 +
|Step_Content=<translate>* In SSMS, expand:
 +
 +
<code data-start="592" data-end="611">Security > Logins</code>
 +
 +
* Right-click on sa and choose '''Properties'''
 +
* In the '''General''' page:
 +
** Set a strong password (and confirm it)
 +
* Switch to the '''Status''' page:
 +
** Set '''Login''' to: '''Enabled'''
 +
* Click '''OK''' to save changes</translate>
 +
}}
 +
{{Tuto Step
 +
|Step_Title=<translate>Test the sa Login</translate>
 +
|Step_Content=<translate>confirm that SQL Authentication works:
 +
 +
# Disconnect your current session in SSMS.
 +
# Click '''Connect''' again.
 +
# Set:
 +
#* '''Server name''': <code data-start="234" data-end="248">.\SQLEXPRESS</code>
 +
#* '''Authentication''': '''SQL Server Authentication'''
 +
#* '''Login''': <code data-start="320" data-end="324">sa</code>
 +
#* '''Password''': (use the one you just set)</translate>
 
}}
 
}}
 
{{Tuto Step
 
{{Tuto Step
 
|Step_Title=<translate>Open the SQL Script</translate>
 
|Step_Title=<translate>Open the SQL Script</translate>
|Step_Content=<translate>* Go to '''File > Open > File…'''
+
|Step_Content=<translate>*Go to '''File > Open > File…'''
* Browse to and open the script file: <code data-start="533" data-end="590">ProOpt-StuertzCloud-Reference-Database-20240131 (4).sql</code></translate>
+
*Browse to and open the script file:  
 +
 
 +
<code data-start="533" data-end="590">ProOpt-StuertzCloud-Reference-Database-20240131 (4).sql</code></translate>
 
}}
 
}}
 
{{Tuto Step
 
{{Tuto Step

Version du 23 avril 2025 à 16:41

Auteur avatarGareth Green | Dernière modification 24/04/2025 par Gareth Green en cours de rédaction

Introduction

See StuertzCloud - Setup Overview for an overview of the setup.


This tutorial covers the setup of the Local SQL Express database instance and creating a "ProOpt" database structure on it.


  • This database installed on the 'Location' local network.
  • The 'Machines' write their production data to it
  • The 'Gateway' software uploads this data to the StuertzCloud server


See Also

StuertzCloud - Installing Gateway

StuertzCloud - Setting up Stuga Machine to Write Production Data

StuertzCloud - Creating a Customer Location


...You must have SQL Server Management Studio (SSMS) installed to manage the databases

Étape 1 - Download and Install SQL Server Express 2022

👉 Download SQL Server Express 2022

  • Run the Installer: Locate the downloaded file named

SQL2022-SSEI-Expr.exe

  • and double-click it to launch the installer.
  • Choose Installation Type: In the installer window, select the Basic installation option. This will install SQL Server Express with default settings.
  • Accept License Terms: Read and accept the license terms to proceed with the installation.
  • Installation Progress: The installer will download and install the necessary components. This process may take several minutes.
  • Installation Complete: Once the installation is complete, you'll see a confirmation screen. You can note the instance name (usually SQLEXPRESS) for future reference.
  • SA password


Étape 2 - Verify Installation

After installation, you can verify that SQL Server Express is running by:

  • Opening SQL Server Management Studio (SSMS).
  • Connecting to the server using the instance name

(e.g., .\SQLEXPRESS)


  • Ensuring that the connection is successful and that you can see the server objects.

Étape 3 - Download the ProOpt sql schema

This is stored on the Software versions Monday Board

Étape 4 - Open SQL Server Management Studio (SSMS)

Launch SSMS and connect to your local server. If you used default settings, the server name will be:


.\SQLEXPRESS


Use “Windows Authentication”

Tick trust Server certificate
...We will set up SQL Authentication later



Étape 5 - Enable SQL Server Authentication Mode

  • In Object Explorer, right-click your server and select Properties.
  • Go to the Security page.
  • Under Server authentication, select: SQL Server and Windows Authentication mode
  • Click OK.

Étape 6 - Restart SQL Service

  1. In SSMS, open Object Explorer.
  2. Right-click the server name at the top
  3. Click Restart and confirm.


Alternatively, you can use SQL Server Configuration Manager if SSMS doesn’t show the restart option:

  • Open

SQL Server Configuration Manager


  • Expand SQL Server Services
  • Right-click SQL Server (SQLEXPRESS) and choose Restart

Étape 7 - Enable the "sa" Login and Set a Password

  • In SSMS, expand:

Security > Logins

  • Right-click on sa and choose Properties
  • In the General page:
    • Set a strong password (and confirm it)
  • Switch to the Status page:
    • Set Login to: Enabled
  • Click OK to save changes

Étape 8 - Test the sa Login

confirm that SQL Authentication works:

  1. Disconnect your current session in SSMS.
  2. Click Connect again.
  3. Set:
    • Server name: .\SQLEXPRESS
    • Authentication: SQL Server Authentication
    • Login: sa
    • Password: (use the one you just set)

Étape 9 - Open the SQL Script

  • Go to File > Open > File…
  • Browse to and open the script file:

ProOpt-StuertzCloud-Reference-Database-20240131 (4).sql

Étape 10 -

Commentaires

Draft