How to configure SQL Server to listen on a specific port

When SQL Server 2005 or SQL Server 2008 Developer Edition, Express Edition, or Evaluation Edition is running on Windows XP Professional or Windows 7 and Developers want to connect to this instance from another computer, they must open a communication port in the firewall. The default instance of the Database Engine listens on port […]

How to enable TCP/IP connections from another computer

If Developers plan to connect to the Database Engine from another computer, they have to enable a protocol, such as TCP/IP. In this case Developers should follow the next steps:

1. Start SQL Server Surface Area Configuration, and click Surface Area Configuration for Services and Connections.

2. In […]

How to connect to the Database Engine

Developers are already done steps described in the articles How to determine the name of the instance of the Database Engine and How to verify that Database Engine is running. Now they should follow the next steps:

1. On the File menu, click Connect Object Explorer.

The Connect […]

How to verify that Database Engine is running

If developers know how to determine the name of the instance of the Database Engine they can follow the next steps:

1. In Registered Servers, if the name of their instance of SQL Server has a green dot with a white arrow next to the name, the Database Engine is running and no […]

How to determine the name of the instance of the Database Engine

Developers should follow the next steps:

1. Log into Windows as a member of the Administrators group, and open either Management Studio or Management Studio Express Edition

2. Click Cancel in the Connect to Server dialog box.

3. Click Registered Servers, on the View menu, if Registered […]

How to show column names in the Diagram Pane in SQL server

When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to show column names, they should follow the next steps:

1. Right-click the table in the Diagram Pane of the Query and View Designer.

2. Choose Column Names from the shortcut menu.

Related TutorialsHow to […]

How to hide column names in the Diagram Pane in SQL server

When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to hide column names, they should follow the next steps:

1. Right-click the table in the Diagram Pane of the Query and View Designer.

2. Choose Name Only from the shortcut menu.

Related TutorialsHow to […]

How to use a User-Defined Function in Place of a Table in SQL server

In Microsoft SQL Server 2000 or higher, developers can create a user-defined function that returns a table. Such functions are useful for performing complex or procedural logic. Developers can write a query that uses the fn_GetSomeData function as a source of data. The resulting SQL might look like this:

SELECT *

FROM

fn_GetSomeData […]

How to use a View in place of a Table in SQL server

Developers can select rows from a View. For example, suppose the database includes a view called “LargeLCD,” in which each row describes a PC monitor which diagonal exceed 19 inches. The view definition might look like this:

 

SELECT *

FROM monitors

WHERE diagonal > 21

 

Developers can select the expensive monitors merely […]

How to use a Query in place of a Table in SQL Server

Developers can select rows from a query. For example, suppose they have already written a query retrieving patents and identifiers of the coinventorred patents — the patents with more than one inventor. The SQL might look like this:

 

SELECT

patents.patent_id,

description,

area

FROM

patentinventor

INNER JOIN

inventors

ON patentinventor.patent_id

=  inventors.patent_id

GROUP BY

Recommended ASP.NET Examples