Database Connection Setup - Margin Master

Margin Master Handbook

Introduction
Part I · Installing
Part II · Introducing the Main Window
Part III · Initial Configuration
Part IV · Customizing the Workspace
Part V · Basic Application Functionality
Part VI · Learning Margin Master
Part VII · Advanced Topics
Part VIII · Updates, Troubleshooting & Help
Appendix
Part I · Chapter 4 — Your DatabaseUpdated 2026-08-24

Database Connection Setup

What is this?

Margin Master stores all pricing data, strategies, and configuration in a Microsoft SQL Server database. Before you can use the application, you need to either create a new database or connect to an existing one. The Database Setup window appears automatically on first launch or whenever a valid database connection cannot be found.

Walk through it in the app: guide 1011 — Backing up your database, or guide 5002 — Changing the database server connection when your SQL Server moves. Margin Master can walk you through these steps live: turn on Training / Guide Mode from the Help menu, then type 1011 into the Lessons & Guides box — or ask Margin Master support to run it with you.

The Database Setup Window

The Connect to Database window focuses on establishing a SQL Server connection and selecting a database.

Connect to Database window with its parts numbered

  1. SQL Server — pick a discovered instance or type a server name · 2. Local / Network scan buttons
  2. Available Databases — the Margin Master databases on that server · 4. Connect

From this window you can:

  • Connect to an existing database on a SQL Server
  • Create a new database (opens a separate dialog -- see Database Creation)
  • Restore a database from a backup file (see Database Restore)

Step 1: Find Your SQL Server

You have two options to locate a SQL Server instance:

Automatic Scan

  • Click "Local" to find SQL Server instances installed on your computer
  • Click "Network" to find SQL Server instances on your local network

Tip: Local scanning is fast. Network scanning may take 10-30 seconds -- a spinning indicator and status message will keep you informed.

After scanning, the SQL Server dropdown populates with discovered instances. Select one from the list.

Scan status messages you may see:

  • "Scanning local PC for SQL Server instances..."
  • "Found 2 SQL Server instance(s) on local PC"
  • "Scanning network for SQL Server instances... (this may take 10-30 seconds)"
  • "Found 1 local and 3 network SQL Server instance(s)"
  • "No SQL Server instances found on local PC"

No SQL Server Found

If no SQL Server is found on your computer, a notice appears with an "Install SQL Server Express" button. This opens a guided installer for the free SQL Server Express edition. After installation completes, the window re-scans automatically.

Manual Entry

If your server doesn't appear in the scan, type the server name directly in the SQL Server field.

How server names are written. A dot (.) or the word (local) always means this computer - the one Margin Master is running on. Anything else is a computer name: Margin Master shows the computer's name when the instance is on another computer on your network, and sometimes for this computer too (for example STORE-PC\MARGINMASTER, which is the same instance as .\MARGINMASTER). The part after the backslash is the instance name; Margin Master's own installs are named MARGINMASTER.

Common formats:

  • . or (local) -- the default instance on this computer
  • .\MARGINMASTER or (local)\MARGINMASTER -- the Margin Master instance on this computer (.\SQLEXPRESS for a stock SQL Express install)
  • SERVERNAME -- the default instance on another computer on your network
  • SERVERNAME\INSTANCENAME -- a named instance on another computer (for example OFFICE-PC\MARGINMASTER)

The scan labels each local instance as (local) - <edition>, e.g. (local) - SQL Server 2025 Express, and each network instance by its computer name.

Step 2: Choose Authentication

  • Use Windows Authentication (checkbox, checked by default) -- Uses your Windows login credentials. No username or password required. This is the recommended option.
  • SQL Server Authentication -- Uncheck "Use Windows Authentication" to enter a SQL Server username and password.

If Windows Authentication is unchecked, additional fields appear:

  • Username -- Your SQL Server login name
  • Password -- Your SQL Server login password

Click "Test Connection" to verify the server is reachable and your credentials work. A green checkmark appears on success, a red X on failure.

Step 3: Select a Database

The Available Databases dropdown lists all databases on the selected server (system databases are excluded). Select an existing Margin Master database from this list.

When you select a database:

  • The Last Run Date is displayed
  • Store Information fields below are populated automatically from the database (vendor, store number, store name, RSC, POS system)
  • If the database is not a valid Margin Master database, a warning message appears

Step 4: Connect or Choose Another Action

Click the Connect button next to the database dropdown to connect to the selected database.

For other actions, use the File menu:

Menu Item Action
Create New Database Opens the Create New Database dialog
Restore Database Opens the Database Restore dialog
Download Demo Database Downloads a sample database for evaluation
Cancel Closes the dialog without connecting

All database screens share the same File menu, so you can navigate between them at any time.

After Connecting

Once the database connection is established, Margin Master proceeds to Store Configuration (on first launch) or loads the main application window.

SQL Edition Detection

After connecting, Margin Master detects which SQL Server edition is in use — Express, Standard, Enterprise, Developer, or Azure. The edition appears in the Database Setup window and in System Diagnostics.

Why it matters: SQL Server Express has a 10 GB per-database limit. If your database approaches this limit, a warning appears in System Diagnostics. Standard and Enterprise editions do not have this limitation.

Startup Pre-Checks

Each time Margin Master starts, it runs several pre-checks before showing the main window:

  • Required tables — Checks that key sync tables (such as AceStoreDepartmentZoneRecords) exist before showing dialogs that depend on them. If a table is missing (usually because a sync hasn't run yet), the dependent dialog is skipped.
  • Epicor store character normalization — For Epicor INDecoded users, binary store character values are automatically converted to their ASCII equivalents before any import runs. This is a one-time migration per store entry and is transparent — no action is required.

These checks prevent errors that would otherwise occur when the database is newly created or when a sync hasn't run yet.

Changing Your Database Later

Use File > Database > Connect to Database in the main application to open the Database Setup window and switch to a different database or create a new one.

Common Questions

Q: Which SQL Server edition should I use? A: Margin Master works with SQL Server Express (free), Standard, or Enterprise editions. SQL Server Express is sufficient for single-store installations. Note that Express has a 10 GB per-database size limit — Margin Master shows a warning in System Diagnostics when you're approaching this limit.

Q: Can I use a SQL Server on a different computer? A: Yes — this is how a second PC in the store shares one database. Use the "Network" scan button or type the server name manually (HOSTPC\MARGINMASTER), then clear "Use Windows Authentication" and sign in with the shared MarginMaster SQL login.

The host PC has to be set up to accept those connections first. A default SQL Server Express install accepts Windows authentication only, has no firewall rule, and needs SQL Server Browser running for a named instance — so the login exists but cannot be used across the network until that is fixed. Support has a script that checks and corrects all of it: see Enable Remote (LAN) SQL Access.

Q: I scanned but no servers were found -- what now? A: Verify that the SQL Server service is running. Open Windows Services (services.msc) and look for "SQL Server (MSSQLSERVER)" or "SQL Server (SQLEXPRESS)". If the service is stopped, start it and scan again. You can also use the "Install SQL Server Express" button if no SQL Server is installed.

Q: What if I need to create a new database? A: Click the "Create New Database" button in the setup window. This opens a separate dialog where you enter your store information, and the database is created automatically. See Database Creation for details.

Connect with us

Margin Master by RetailerSoft, Inc. © 2026. All rights reserved.

Loading...

Reconnecting to the server...

This usually takes a few seconds.