Optionally provide private feedback to help us improve this article...

Thank you for your feedback!

Creating the InstantKB Database

InstantKB supports SQL Server 2008, 2008 RC2, 2012, 2016 & 2019. All SQL Server Express editions are also supported.

In this example we'll use SQL Server 2012 & the SQL Server 2012 Management Studio to create the InstantKB database, tables & stored procedures.

To create the various database tables & stored procedures required by InstantKB you'll need to execute a SQL script provided within the download against your database.

The InstantKB 2018 SQL script can be found within "src\DatabaseScripts\InstantKB2018_Install.sql".

Should i use an existing database or create a new one?

You can use an existing database or create a new database to host the InstantKB tables and stored procedures. Ideally you would create a separate database to host the InstantKB tables and stored procedures. We appreciate however this is not possible for some users and we've designed our tables & stored procedures to use a unique naming convention allowing you to use an existing database without any naming conflicts.

Creating the tables & stored procedures

In the example we will be connecting to a local SQL Server 2012 instance using Windows Authentication.If you wish to add the InstantKB tables and stored procedures to a remote database you should enter the connection details for your database. If your not sure how to connect to your SQL Server instance please consult the Authentication Modes section of your SQL Server documentation. If your using shared or dedicated hosting your hosting company should have sent you your SQL Server connection & login details via email.
  1. Connect to your SQL Server instance. You may need to provide your server address and if your using SQL Server authentication you'll need to provide your SQL Server username & password to connect...

  2. In this example we are going to create a new database called InstantKB2018 to host the InstantKB tables and stored procedures. To create a new database simply right click your "Databases" node and choose "New Database" as shown below..

  3. Provide a name for your new database. In this example we'll call our database "InstantKB2018" as shown below...

  4. Once you've provided a name for your database click "OK". You'll see the new database appear within your database list as shown below...

  5. Now you'll need to open the "src\DatabaseScripts\InstantKB2018_Install.sql" file to execute against the new InstantKB2018 database, Open the file as shown below and navigate to the InstantKB2015 folder and open the "DatabaseScripts\InstantKB2015_Install.sql" file.

  6. Once you've opened InstantKB2018_Install.sql you'll see the script load as shown below.

  7. At this stage before executing the script against your database it's important to ensure you have selected the correct database from the database selection drop down list as shown below. The database you select within this list will determine which database the InstantKB tables and stored procedures are created within.

  8. Once your sure you have selected the correct database simply click the "Execute" button as shown below. This may take a few minutes depending on your server and connection.

  9. Once the script has completed execution you'll see the results pane as shown below. You'll notice a number of warning messages with regard to "sysdepends". These can safely be ignored and won't effect your installation.

You've now populated the InstantKB 2018 database with all the tables, stored procedures and default data required by InstantKB.

SQL Server Security

By default the InstantKB database connection string within the "Web.Config" file uses a trusted connection. This is intended to allow you to get up & running quickly with InstantKB & avoids the need to create a SQL Server user account for local development.

To ensure the default trusted connection works you should added the Network Service Windows Account as a User of your database and provide this account with "db_owner" privileges.

When uploading InstantKB  into a production environment you will want to use a dedicated SQL Server user account with it's own username & password to access your database. This SQL Server user account should have at least "db_datareader" & "db_datawriter" privileges.