Sunday, December 20, 2009

SQL Server Database Administrator Interview Questions and Answers Series 9

What is the basic functions for master, msdb, model, tempdb databases?
1. The Master database
holds information for all databases located on the SQL Server instance and is the glue that holds the engine together. Because SQL Server cannot start without a functioning master database, you must administer this database with care. The master database records all the system-level information for a SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and system configuration settings. Also, master is the database that records the existence of all other databases and the location of those database files and records the initialization information for SQL Server. Therefore, SQL Server cannot start if the master database is unavailable. In SQL Server, system objects are no longer stored in the master database; instead, they are stored in the Resource database.
2. The msdb database stores information regarding database backups, SQL Agent information, DTS
packages, scheduling alerts and jobs and by other features such as Service Broker and Database Mail, and some replication information such as for log shipping . 
3. The tempdb holds temporary objects such as global and local temporary tables and stored procedures.
4. The model is essentially a template database used in the creation of any new user database created in
the instance. The model database is used as the template for all databases created on an instance of SQL Server. Because tempdb is created every time SQL Server is started, the model database must always exist on a SQL Server system.

How to rebuild Master Database?
1. Shutdown Microsoft® SQL Server™ 2000, and then run Rebuildm.exe. This is located in the Program Files\Microsoft SQL Server\80\Tools\Binn directory.
2. In the Rebuild Master dialog box, click Browse.
3. In the Browse for Folder dialog box, select the \Data folder on the SQL Server 2000 compact disc or in the shared network directory from which SQL Server 2000 was installed, and then click OK.
4. Click Settings. In the Collation Settings dialog box, verify or change settings used for the master database and all other databases.

     Initially, the default collation settings are shown, but these may not match the collation selected during setup. You can select the same settings used during setup or select new collation settings. When done, click OK.
5. In the Rebuild Master dialog box, click Rebuild to start the process. 
    The Rebuild Master utility reinstalls the master database.
Note  To continue, you may need to stop a server that is running.
Source: http://msdn2.microsoft.com/en-us/library/aa197950(SQL.80).aspx

What are the Operations Cannot Performed on the master database?
1.    Adding files or filegroups.
2.    Changing collation. The default collation is the server collation.
3.    Changing the database owner. master is owned by dbo.
4.    Creating a full-text catalog or full-text index.
5.    Creating triggers on system tables in the database.
6.    Dropping the database.
7.    Dropping the guest user from the database.
8.    Enabling change data capture.
9.    Participating in database mirroring.
10.    Removing the primary filegroup, primary data file, or log file.
11.    Renaming the database or primary filegroup.
12.    Setting the database to OFFLINE.
13.    Setting the database or primary filegroup to READ_ONLY.

What are the Operations Cannot Performed on the model database?
1. Adding files or filegroups.
2. Changing collation. The default collation is the server collation.
3. Changing the database owner. model is owned by dbo.
4. Dropping the database.
5. Dropping the guest user from the database.
6. Enabling change data capture.
7. Participating in database mirroring.
8. Removing the primary filegroup, primary data file, or log file.
9. Renaming the database or primary filegroup.
10. Setting the database to OFFLINE.
11. Setting the database or primary filegroup to READ_ONLY.

What are the Operations Cannot Performed on the tempdb database?
1.    Adding filegroups.
2.    Backing up or restoring the database.
3.    Changing collation. The default collation is the server collation.
4.    Changing the database owner. tempdb is owned by dbo.
5.    Creating a database snapshot.
6.    Dropping the database.
7.    Dropping the guest user from the database.
8.    Enabling change data capture.
9.    Participating in database mirroring.
10.    Removing the primary filegroup, primary data file, or log file.
11.    Renaming the database or primary filegroup.
12.    Running DBCC CHECKALLOC.
13.    Running DBCC CHECKCATALOG.
14.    Setting the database to OFFLINE.
15.    Setting the database or primary filegroup to READ_ONLY.

What are the Operations Cannot Performed on the msdb database? 
1.    Changing collation. The default collation is the server collation.
2.     Dropping the database.
3.    Dropping the guest user from the database.
4.    Enabling change data capture.
5.     Participating in database mirroring.
6.     Removing the primary filegroup, primary data file, or log file.
7.    Renaming the database or primary filegroup.
8.    Setting the database to OFFLINE.
9.    Setting the primary filegroup to READ_ONLY.

Please check these interview questions as well. 
[SQL Server Database Administrator Interview Questions and Answers - Part #12] 
Tags: sql server interview questions. sql server 2008 interview questions. sql server 2008 interview questions and answers . sql server interview questions and answers for experienced. sql server interview questions and answers for freshers. sql server interview questions and answers. sql server dba interview questions and answers. sql server dba interview questions. sql server database administration interview questions . sql server 2008 database administration interview questions. sql server 2012 interview question and answers. sql server 2012 FAQ. sql server 2012 dba interview. sql dba 2012 interview question and answers. sql server 2008 r2 interview question and answers. sql 2012. sql 2008 r2. sql 200 r2 interview question and answers. sql server question and answers. sql server developer interview question and answers. sql developer interview question and answers.  sql server interview questions. sql server 2008 interview questions. sql server 2008 interview questions and answers. sql server interview questions and answers for experienced. sql server interview questions and answers for freshers. sql server interview questions and answers. sql server dba interview questions and answers. sql server dba interview questions. sql server database administration interview questions. sql server 2012 database administration interview questions. sql server interview questions for entry level. sql server interview questions for experienced.

0 comments:

Post a Comment