Related differences

Ques 21. How do you know if SQL Server is running on your local system?

After installing SQL Server 2006 Express Edition, it will be running on your local system quietly as a background process.

If you want to see this process is running, run Windows Task Manager. You should see a process called sqlservr.exe running in the process list:

sqlservr.exe 00 1,316 K

If you select sqlservr.exe and click the "End Process" button, SQL Server will be stopped.

If you can not find sqlservr.exe in the process list, you know that your SQL Server is running.

Is it helpful? Add Comment View Comments
 

Ques 22. How to set database to be READ_ONLY in MS SQL Server?

Databases in SQL Server have two update options:

* READ_WRITE - Data objects are allowed to be queried and modified. This is the default.
* READ_ONLY - Data objects are allowed to be queried, but not allowed to be modified.

You can use the "ALTER DATABASE" to change database update options as shown in the tutorial below:

USE withoutbookDB
GO

INSERT Links (Name) VALUES ('www.withoutbook.com')
GO
(1 rows affected)

ALTER DATABASE withoutbookDB SET READ_ONLY
GO

INSERT Links (Name) VALUES ('www.withoutbook.com')
GO
Msg 3906, Level 16, State 1, Server SQLEXPRESS, Line 1
Failed to update database "withoutbookDB" because
the database is read-only.

SELECT * FROM Links
GO
Name
www.withoutbook.com

ALTER DATABASE withoutbookDB SET READ_WRITE
GO

INSERT Links (Name) VALUES ('www.withoutbook.com')
GO
(1 rows affected)

As you can see from the output, inserting data into a table is not allowed if the database is in READ_ONLY mode.

Is it helpful? Add Comment View Comments
 

Ques 23. How to connect SQL Server Management Studio Express to SQL Server 2005 Express?

Once you have SQL Server 2005 Express installed and running on your local machine, you are ready to connect SQL Server Management Studio Express to the server:

Click Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express to launch SQL Server Management Studio Express.

The "Connect to Server" box shows up. The Server Name field has a default value of "LOCALHOSTSQLEXPRESS". So don't change it. Select "SQL Server Authentication" as the Authentication. Enter enter "sa" as the Login, and "WithoutBook" as the Password. SQL Server 2005 Connect Window.

Click the Connect button, you should see the SQL Server Management Studio Express window comes up.

Is it helpful? Add Comment View Comments
 

Ques 24. How to set database to be SINGLE_USER in MS SQL Server?

Databases in SQL Server have three user access options:

* MULTI_USER - All users that have the appropriate permissions to connect to the database are allowed. This is the default.
* SINGLE_USER - One user at a time is allowed to connect to the database. All other user connections are broken.
* RESTRICTED_USER - Only members of the db_owner fixed database role and dbcreator and sysadmin fixed server roles are allowed to connect to the database, but it does not limit their number.

You can use the "ALTER DATABASE" to change database user access options as shown in the tutorial below:

USE withoutbookDatabase
GO

ALTER DATABASE withoutbookDatabase SET SINGLE_USER
GO

Now connect to server with another client session and try:

USE withoutbookDatabase
GO
Msg 924, Level 14, State 1, Line 1
Database 'withoutbookDatabase' is already open and can only
have one user at a time.

Go back to the first session and re-set the database to MULTI_USER:

ALTER DATABASE withoutbookDatabase SET MULTI_USER
GO

Is it helpful? Add Comment View Comments
 

Ques 25. How to download and install Microsoft SQL Server Management Studio Express?

Microsoft SQL Server Management Studio Express (SSMSE) is a free, easy-to-use graphical management tool for managing SQL Server 2005 Express Edition and SQL Server 2005 Express Edition with Advanced Services. If you want to download and install it to your system, follow this tutorial:

1. Go to SQL Server Management Studio Express home page.

2. Go to the "Files in This Download" section.

3. Click the Download button next to "SQLServer2005_SSMSEE.msi - 38.5 MB" And save it to c:temp directory.

4. Look at and compare the downloaded file properties with:

Name: SQLServer2005_SSMSEE.msi
Location: C:temp
Size: 40,364,032 bytes

5. Double click to install. The setup window shows up. Follow the instructions to finish the installation process.

6. When installation is done, you will see a new program menu entry as: Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: