Knowledge Base

How do I add a Microsoft SQL Server database to CodeGuard?

Overview

By the end of this article, you will have added a Microsoft SQL Server (MS-SQL) database to your CodeGuard account and started its first backup. The article lists the connection details you need to collect before starting, the network requirements the database must meet — a publicly reachable IP address on a supported port, open to both CodeGuard backup addresses — and the steps to run the connection test, enter your credentials, and add the database. It closes with how to verify the first backup and common troubleshooting situations.

Connection details you need

Collect the following before you begin. Each value is entered during the process described below.

  • Microsoft SQL Server database name
  • Microsoft SQL Server username
  • Microsoft SQL Server password
  • Database management IP address — the publicly reachable address of the database server

If your database is hosted on Rackspace Cloud Sites, your hosting provider documents where to find these values in the control panel.

Network requirements for the database

CodeGuard connects to your Microsoft SQL Server (MS-SQL) database over the public internet, so the database must be reachable before it can be added.

  • The database must be available on a public IP address.
  • The connection must use port 1433 or port 4120. If your database listens on a different port, contact CodeGuard Support before continuing.
  • Both CodeGuard primary backup IP addresses must be allowed through your firewall. The connection test screen displays these two addresses — allow both, not only the first.

Steps to add a Microsoft SQL Server database

Step 1 — Open the add-database option for the website

For a website you have just activated, select the button to add a database shown at the end of activation. For a website already on your account, open its Website page and select the add-database link at the bottom of that page.

 

Figure 1: Website page in CodeGuard with the option to add a database

Step 2 — Run the database connection test

Enter the publicly reachable IP address of your database server in the connection test box and confirm it is available on port 1433 or port 4120. CodeGuard uses this test to check that it can reach the database before you enter any credentials.

Figure 2 Database connection test box with the field for the public IP address of the database server

Step 3 — Allow both CodeGuard backup IP addresses

Confirm that both of the CodeGuard primary backup IP addresses shown on screen are permitted to connect to your Microsoft SQL Server database. If your firewall blocks either address, the connection test will not succeed.

Figure 3: Connection test screen listing both CodeGuard primary backup IP addresses

Step 4 — Continue to the credential entry page

Select Next Step until the credential entry page is displayed. When CodeGuard has connected to your database successfully, the MS-SQL button on this page is enabled and selected, and the IP address and port fields are already filled in with the values from the connection test.

Figure 4:  Credential entry page with the MS-SQL option selected and connection fields pre-filled

Step 5 — Enter your credentials and add the database

Enter your Microsoft SQL Server username and password in the fields provided. Enter the name of the database you want to back up in the Database Name field, then select Add Database.

Figure 5: Credential fields and Database Name field with the Add Database button

How to verify the database was added successfully

After you select Add Database, CodeGuard begins the first backup of the database, and you can follow its progress in your account. CodeGuard sends you an email once the first backup of your Microsoft SQL Server database has completed successfully. Receiving that email confirms the database is connected and protected.

Troubleshooting

Issue: The connection test does not succeed and the credential page cannot be reached.

Cause: The database is not reachable from the public internet, or your firewall is blocking one or both of the CodeGuard backup IP addresses.

Solution: Confirm the database is published on a public IP address using port 1433 or 4120, and allow both backup addresses shown on the connection test screen.

Issue: The MS-SQL option is not enabled on the credential entry page.

Cause: CodeGuard was not able to connect to the database during the connection test, so the page cannot pre-fill the connection values.

Solution: Return to the connection test, correct the IP address or port, and run the test again before continuing.

Issue: The database uses a port other than 1433 or 4120.

Cause: CodeGuard connects on these two ports only.

Solution: Contact CodeGuard Support to request assistance with a non-standard port.

Similar questions

  • How do I back up a Microsoft SQL Server database with CodeGuard?
  • What ports does CodeGuard use to connect to MS-SQL?
  • Which IP addresses do I need to allow for CodeGuard database backups?
  • CodeGuard add MS-SQL database
  • What information do I need to connect my SQL Server database to CodeGuard?

Need assistance?

Contact our team for help with your purchase or issuing your certificate.

Live chat

Call us today