Select Statement  «Prev 

PUBs Database Access

Microsoft SQL Server Database Set Up

In most SQL Server installations, you will automatically have access to the PUBS database, which contains the data used throughout this course.
To begin with SQL Server, confirm the following:
  1. You have installed the client utilities that are part of the SQL Server installation set.
  2. You have obtained a login ID for SQL Server.
  3. You have been granted rights for the PUBS database.

Microsoft SQL Server 2022 Installation

The installation process of Microsoft SQL Server 2022 can be performed through the following steps:
  1. Download the Installer: Visit the official Microsoft Download Center. Look for the SQL Server 2022 download link and initiate the download process.
  2. Start the Installation: Once downloaded, locate the installer file, it's typically named something like SQLServer2022-SSEI-Expr.exe or SQLServer2022-SSEI-Dev.exe, depending on the edition you've downloaded. Double click on the file to begin the installation process.
  3. Select Installation Type: A SQL Server 2022 Center window will open. Select the "Installation" tab from the left panel.
  4. Choose the New Installation: Click on the "New SQL Server stand-alone installation or add features to an existing installation" link. This will begin the setup process.
  5. Enter the Product Key: If you have purchased a license, you can enter your product key at this stage. If you're using the free Developer or Express version, you can select that option. Click "Next" to proceed.
  6. Accept the License Terms: You will be presented with license terms for SQL Server 2022. Check the box to accept the license terms and click "Next".
  7. Choose Features to Install: Choose the features you want to install. This includes the Database Engine Services, SQL Server Replication, Full-Text and Semantic Extractions for Search, Data Quality Services, and more. Once you've selected the desired features, click "Next".
  8. Configure Instance: Choose either a Default instance or Named instance, according to your requirements. If you are installing SQL Server for the first time, it is generally advisable to choose the Default instance. Click "Next" to proceed.
  9. Server Configuration: Set up the server configuration. Here, you will set the SQL Server Agent and SQL Server Database Engine to either manual or automatic. Typically, these are set to automatic.
  10. Database Engine Configuration: You will need to configure the authentication mode. You can choose between Windows authentication mode and Mixed mode (SQL Server authentication and Windows authentication). If you select Mixed mode, you will need to add a SQL Server administrator password. Additionally, you can add current user or other SQL Server administrators. Click "Next" to proceed.
  11. Complete the Installation: The wizard will show a summary of your actions. Confirm the settings and then click "Install". The installation process will start.
  12. Finish the Installation: Once the installation is completed, you will receive a confirmation message. Click "Next", then "Close" to finish the installation process.

Remember, the installation steps might slightly differ based on your specific system configuration and the SQL Server edition you're installing. Always refer to the official Microsoft SQL Server installation guide for precise instructions related to your requirements.
The SQL Server Installation Wizard provides a single feature tree to install all SQL Server components:
  1. Database Engine
  2. Analysis Services
  3. Reporting Services
  4. Integration Services
  5. Master Data Services
  6. Data Quality Services
  7. Connectivity components
Starting with SQL Server 2016 (13.x), SQL Server Management Tools is no longer installed from the main feature tree. You can install each component individually or select a combination of the components listed above. To make the best choice among the editions and components available in SQL Server, see the features supported by your version of SQL Server:
Regardless of whether you use the SQL Server Installation Wizard or the command prompt to install SQL Server, Setup involves the following steps:
Install SQL-Server

From here, all you need to do to confirm that you are able to connect and query the database is to open the Start menu and select Programs and then Microsoft SQL Server 2012 Utilities. The resulting menu will have an option, ISQL_W, that represents the query manager for SQL Server. Select this option and you will be prompted for the user ID and password provided to you by your DBA.
As soon as you have logged in successfully, select the PUBS database from the Database drop-down list box. This will tell the server which database you need to work with, and it will make querying the database much simpler. The final step in the test is to issue a simple query. All you need to do is type in the following:

SELECT * FROM authors

Press the green Execute button on the toolbar of the window, and the query will be sent to the server.
If you have any troubles, download the scripts necessary to build the PUBS database from the Resources page and try the test again after you have confirmed with your DBA that the database is available.