SQL Server  «Prev  Next»

Lesson 5 Starting SQL Server services
Objective Start the Services available in Microsoft SQL Server 2012

Start Services available in Microsoft SQL Server

In the previous lesson, you learned about the services that enable you to access SQL Server. These services are configured via the Service Manager dialog box.
To invoke Service Manager, choose
Programs>>Microsoft SQL Server 2012>>Service Manager
.
Service Manager icon
Service Manager icon


Instead of using the Start menu and traversing the Windows menu system, you can invoke the Service Manager by double-clicking the Service Manager icon in the system tray in the lower-right corner of your screen, as illustrated here.

If you are using Windows, you can configure your computer to invoke SQL Server services automatically on start-up.

Automatically invoking services in Windows

There are two ways that you can ensure each service starts automatically when the system is booted:
  1. Select the check box at the bottom of SQL Server Service Manager dialog that reads Auto-start service when OS starts.
  2. If you are running Windows, bring up the Services dialog box. Here's how:
    1. Select Start>>Settings>>Control Panel
    2. Double-click the services icon to bring up the Serices dialog box, as shown in the figure below:

Services Dialog box
Services Dialog box
  1. Double-click the desired service.
  2. Select Automatic from the Type drop-down list in the Startup section, if it is not already selected.
  3. Repeat steps 3 and 4 for the other two services.
  4. You may be required to reboot your server.

The simulation below will show you how to start the MS SQL Server.
start msSql Server

Do not use Hungarian notation for Relational Databases

Often, novice database designers (particularly those who come from interpretive or procedural programming backgrounds) feel the need to use a form of Hungarian notation and include prefixes or suffixes in names to indicate the kind of object. For example, tblEmployee or tblCustomer.
Prefixes like this are generally considered a bad practice, because names in relational databases are almost always used in an obvious context. Using Hungarian notation is a good idea when writing procedural code (like Visual Basic or C#), since objects do not always have a very strict contextual meaning that can be seen immediately upon usage, especially if you are implementing one interface with many different types of objects. In SQL Server Integration Services (SSIS) packages, I commonly name each control with a three- or four-letter prefix to help identify them in logs.
However, with database objects, questioning whether a name refers to a column or a table is rare. Plus, if the object type is not obvious, querying the system catalog to determine it is easy. I will not go too far into implementation right now, but you can use the sys.objects catalog view to see the type of any object. For example, this query will list all of the different object types in the catalog

SELECT distinct type_desc
FROM sys.objects

Here is the result:
type_desc
-------------------------
CHECK_CONSTRAINT
DEFAULT_CONSTRAINT
FOREIGN_KEY_CONSTRAINT
INTERNAL_TABLE
PRIMARY_KEY_CONSTRAINT
SERVICE_QUEUE
SQL_SCALAR_FUNCTION
SQL_STORED_PROCEDURE
SQL_TABLE_VALUED_FUNCTION
SQL_TRIGGER
SYNONYM
SYSTEM_TABLE
UNIQUE_CONSTRAINT
USER_TABLE
VIEW

We will use sys.objects and other catalog views throughout this book to view properties of objects that we create.

Starting MS Sql Server Service - Exercise

Click the Exercise link below on the left to practice starting the services that are part of SQL Server 2012.
Starting MS SQL Server Service - Exercise
In the next lesson, you will learn about the SQL Server 2012 architecture.

SEMrush Software Target 5SEMrush Software Banner 5