triz-docs/docs/getting-started/environment-setup/03-database-setup.md
Othmane Ataallah 7632672d65 intial push
2026-04-28 09:45:44 +01:00

4.4 KiB
Raw Blame History

sidebar_position title
4 Database Setup

Database Setup


Step 5 — Install Microsoft SQL Server 2012 and SSMS

5.1 — Install SQL Server 2012

  1. Obtain the SQL Server 2012 installer (SQLEXPR_x64_ENU.exe) from:
  2. Run the installer and choose New SQL Server stand-alone installation.
  3. On the "Database Engine Configuration" screen, under Authentication Mode, select Mixed Mode (SQL Server Authentication and Windows Authentication).
  4. Set the SA account password when prompted. Use the team standard password: Root123456.
  5. Complete the installation.

5.2 — Enable TCP/IP and Port 1433

SQL Server disables TCP/IP by default on fresh installations. The application needs it to connect.

  1. Open SQL Server Configuration Manager (search for it in the Start menu).
  2. Expand SQL Server Network Configuration → Protocols for MSSQLSERVER.
  3. Right-click TCP/IPEnable.
  4. Double-click TCP/IP → go to the IP Addresses tab → scroll to IPAll → set TCP Port to 1433.
  5. Click OK.

5.3 — Enable the SQL Server Browser Service

  1. In SQL Server Configuration Manager, go to SQL Server Services.
  2. Right-click SQL Server BrowserPropertiesService tab → set Start Mode to Automatic.
  3. Right-click SQL Server BrowserStart.

5.4 — Restart the SQL Server Service

  1. In SQL Server Services, right-click SQL Server (MSSQLSERVER)Restart.

5.5 — Configure the Windows Firewall

  1. Open Windows Defender Firewall with Advanced Security (search in Start menu).
  2. Click Inbound Rules → New Rule.
  3. Select Port → TCP → Specific local ports: 1433.
  4. Select Allow the connection.
  5. Apply to all profiles (Domain, Private, Public).
  6. Name the rule SQL Server 1433 and click Finish.

5.6 — Create the Application Database Login

  1. Install SQL Server Management Studio (SSMS). Download from Microsoft.
  2. Open SSMS and connect to your local instance:
    • Server name: localhost
    • Authentication: SQL Server Authentication
    • Login: sa
    • Password: Root123456

📝 Note — Check your database.properties before proceeding.

Open your database.properties file and check the value of db.username.

  • If it is sa, skip steps 39 entirely. The sa account already exists and was configured with the correct password (Root123456) during installation. No new login needs to be created.
  • If it is any other username, continue with steps 39 below to create that login.
  1. In Object Explorer, expand Security → Logins.
  2. Right-click Logins → New Login.
  3. Set the login name and password to match what is in database.properties (provided by your team lead).
  4. On the General page, make sure Login status at the bottom is set to Enabled (this is the default, but confirm it is not set to Disabled).
  5. On the Status page, under Login, confirm it is set to Enabled and under Permission to connect to database engine, confirm it is set to Grant.
  6. On the Server Roles page, check dbcreator and public.
  7. Click OK.

Step 6 — Restore the Test Database

  1. Download the Stock project test database backup file from the Gitea release assets.
  2. Open SSMS and connect to your local SQL Server instance.
  3. In Object Explorer, right-click Databases → Restore Database…
  4. Select Device as the source, click (Browse), then click Add and navigate to the downloaded .bak file. Click OK.
  5. The backup details will populate in the Backup sets to restore grid. Confirm the correct entry is checked.
  6. Click OK to restore. A success dialog will appear when complete.
  7. In Object Explorer, right-click Databases → Refresh. The TrizStockLife database should now appear.
  8. Verify the application login created in Step 5.6 has access:
    • Expand TrizStockLife → Security → Users
    • If your application login is not listed, right-click Users → New User, and map the login to this database with the db_owner role.