0% found this document useful (0 votes)
23 views6 pages

Database Admin Q&A

The document outlines the roles and responsibilities of a Database Administrator (DBA), including planning installations, monitoring database efficiency, and maintaining data standards. It discusses SQL Server integrity checks, backup strategies for various databases, and methods for data management and performance optimization. Additionally, it covers the implementation of security measures and auditing processes for database access.

Uploaded by

njerugeorge57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views6 pages

Database Admin Q&A

The document outlines the roles and responsibilities of a Database Administrator (DBA), including planning installations, monitoring database efficiency, and maintaining data standards. It discusses SQL Server integrity checks, backup strategies for various databases, and methods for data management and performance optimization. Additionally, it covers the implementation of security measures and auditing processes for database access.

Uploaded by

njerugeorge57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

QUESTION ONE

There are several functions of a Database Administrator, outline at least three functions and
explain how they are accomplished [6 Marks]
 Actively participates in planning the installation of new organization-wide systems and
applications. He also assists during the installation as per specific functions.
 Monitors the efficiency and effectiveness of all database resources and thus, keep the flow
of work uninterrupted owing to technology.
 Continuous review and evaluation of the software, hardware, service delivery, and updates
as and when required.
 Maintains a data standard and security measures through the implementation of
information technology plans, policies, and standards.

You are a DBA for a large phone company. You need to design a database integrity check job in
SQL Server Agent. During a planning meeting, your manager asks you the following questions
about your integrity job.
a. In large databases, what options will you use with the DBCC CHECKDB statement to minimize a
performance impact of running the statement? [4 Marks]
DBCC CHECKDB command supports multi-threading by default. In order to limit its CPU usage,
users can reduce the parallelism in the following ways:
 Trace Flag 2528 can be used to turn off parallelism during processing of DBCC CHECKDB
 The user can use SQL Server in-built feature “Maximum Degree of Parallelism” to specify
the limit of CPU allocation.
b. What other options will you use when you run the DBCC CHECKDB statement against all
databases? [4 Marks]
On a regular basis, DBCC CHECKDB can be used with other attributes, which can optimize the
DBCC processing. Various options such as PHYSICAL_ONLY combined with CHECKSUM allows
user to evaluate only physical record, thus helps in saving time and resource allocation.
c. How can you make sure that the integrity-check job finds an issue, you can correct the
problem and ensure the database integrity? [6 Marks]
After the CheckDB standard execution, we will have information about possible damaged pages.
The CheckDB itself can fix these damages. CheckDB has an option that allows the correction of
the database structure, but the data allocated into the repaired page will be lost. This option is
“REPAIR_ALLOW_DATA_LOSS”, and this option changes the damaged page for a new one. This
way, we save the integrity of the database. Another option is “REPAIR_REBUILD” used to correct
non-clustered indexes. On this option we don’t lose data

Define the term Rule as used in database administration (SQL. Server) [2 Marks]
This is a statement that imposes some form of constraint on a specific aspect of the database, such
as the elements within a field specification for a particular field or the characteristics of a given
relationship.
How different are they from check constraints? [2 Marks]
The major difference is reusability. Check constraint is associated with columns in a Table. So these
can't be re-used. Rules are defined with in a database and can be applied to any number of columns.
Write a code of RULE that will validate the email field of a customer_address table
SELECT * FROM customer_address WHERE email NOT LIKE '%_@__%.__%'

APPENDIX A
Wide World Importers is implementing a new set of applications to manage several lines of
business. Within the corporate data centre, they need the ability to store large volumes of data
that can be accessed from anywhere in the world.
Several business managers need to access to operational reports that cover the current workload
of their employees, along with new and pending customer requests. The same business managers
also need access to large volumes of historical data and to spot trends and optimize their staffing
and inventory levels.
A large sales force makes customer calls all over the world and needs access to data on the
customers that a sales rep is servicing, along with potential prospects. The data for the sales force
needs to be available even when the salespeople are not connected to the Internet or the
corporate network. Periodically sales reps will connect to the corporate network and synchronize
their data with the corporate databases.
A variety of Windows applications have been created Visual Studio.NET and all data access is
performed using stored procedures. The same set of applications are deployed for users
connecting directly to the corporate database server as well as for sales reps connecting to their
own local database servers

QUESTION TWO (USE APPENDIX A TO ATTEMPT ALL QUESTIONS)


What edition of SQL Server 2005 should be installed on the laptops of the sales force to minimize
the cost? [7 Marks]
Because sales reps need to be disconnected and synchronize data, you could install either the
Express or the Compact edition of SQL Server 2005. However, applications installed on the sales
reps’ laptops require stored procedure support. Express is the only edition that will minimize cost
while also supporting replication and stored procedures.
What edition of SQL Server 2005 should be installed within the corporate data centre? [4 Marks]
SQL Server 2005 Enterprise needs to be installed on the corporate database server. Enterprise can
scale to handle any activity volume while also providing advanced analytical services
What SQL Server services need to be installed to meet the needs of the business managers? [6
Marks]
You need to install at least SSAS and SSRS. SSAS handles the analytical applications required for
trend analysis, and SSRS provides the reporting infrastructure required for all operational reports
What versions of Windows need to be installed on the corporate database server? [3 Marks]
You need to install either Windows 2003 Server Enterprise SP2 and later or Windows Server 2008
Enterprise and later to support SQL Server 2008 Enterprise

QUESTION THREE (USE APPENDIX A TO ATTEMPT ALL QUESTIONS)


How should you design the tables to allow product manuals to be stored within the database? [6
Marks]
The product manuals should be stored in a table with a VARBINARY(MAX) column designated for
FILESTREAM. In addition, you should also include a column to designate the type of fi le stored in the
row so that applications can interpret the data correctly. The product manuals table should have a
foreign key to the product table to ensure that you are loading only manuals for products that exist
in the database.
How should you design the table to hold product descriptions in multiple languages? [8 Marks]
You could specify an XML data type for the product description column and then create an XML
document for each of the description translations that is loaded into the XML column. However, you
would have to parse the XML document to locate the description in the language that you wanted.
While incurring a little maintenance, the most straightforward way of storing product descriptions in
multiple languages is to add a separate column for each language and use the COLLATE property to
set the appropriate collation sequence for the column.
How should you design the tables so that you can assign customers to sales reps while also
ensuring that a customer cannot be assigned to a sales rep that does not exist? [6 Marks]
You could add a SalesRep column to the Customers table with a foreign key to the sales rep table to
enforce integrity. You could also create a new table that includes the CustomerID and SalesRepID,
add a primary key on both columns, and then create foreign keys to both the customer and sales rep
tables.

OTHER QUESTIONS (USE APPENDIX A TO ATTEMPT ALL QUESTIONS)


What features of SQL Server 2008 should be used to store the product manuals? [6 Marks]
You should store the product manuals in a VARBINARY(MAX) column that is enabled for
FILESTREAM. The table should also contain a column that designates what type of document is
stored within the row to be able to build a full text index on the table.
What should you configure to allow users to perform searches against a product manual? [6
Marks]
You need to create a full text catalogue as well as a full text index on the table that contains the
product manuals. By using the capabilities of the full text indexer to employ filters that interpret
document formats, you do not have to make any changes to index the documents and make the
content immediately available to users.
To provide the best possible results for searches, which objects should be configured? [8 Marks]
Because your users will not always use the exact terms that you have defined within your
documentation, you should configure expansion and replacement lists within a thesaurus fi le to
provide synonyms to users as well as replace common misspellings or abbreviations. To manage
multiple languages for product descriptions, you should add a separate column for each language
that contains each language-specific translation. The full text index should be created against each
translated column using the appropriate language specification to maximize the effectiveness of
word breakers as well as to allow stemmers to create inflectional forms for each language.

APPENDIX B
Company Overview
Banana Vineyard was founded in 1984 as a local, family-run winery. Due to the award-winning
wines, it has produced over the last several decades, Banana Vineyards has experienced significant
growth. To continue expanding, the company acquired several additional wineries over the years.
Today, the company owns 16 wineries; 9 wineries are in Kisii, Nyamira, and Kampala, and the
remaining 7 wineries are located in Nairobi and Mombasa. The wineries employ 532 people, 162
of whom work in the central office that houses servers critical to the business. The company has
122 salespeople who travel around Africa and need access to up-to-date inventory information.
Planned Changes
Until now, each of the 16 wineries owned by Banana Vineyard has run a separate Web site locally
on the premises. Banana Vineyard wants to consolidate the Web presence of these wineries so
that Web visitors can purchase products from all 16 wineries from a single online store. All data
associated with this Web site will be stored in databases in the central office. After the data is
consolidated at the central office, merge replication will be used to deliver data to the salespeople
and allow them to enter orders. To meet the needs of the salespeople until the consolidation
project is completed, inventory data at each winery will be sent to the central office at the end of
each day
EXISTING DATA ENVIRONMENT
Databases
Each winery presently maintains its own database to store all business information. At the end of
each month, this information is brought to the central office and transferred into databases.

QUESTION FOUR (USE APPENDIX B TO ATTEMPT ALL QUESTIONS)


What backups do you need for the Account, Inventory, and Promotions databases? [6 Marks]
Because you can lose a maximum of 5 minutes of data, the databases should have transaction log
backups taken every 5 minutes. To meet the 20-minute maximum outage window, you need to
minimize the number of transaction log backups that are restored, so differential backups should be
taken several times per day; for example, every 4 or 6 hours. If enough storage space exists for full
backups, you should also take a full backup every day.
What backup do you need for the Customer and Order databases? [7 Marks]
The Customer and Order databases implement partitioning. Data older than two months is stored in
an archive table that resides in a separate filegroup, so you can take advantage of filegroup backups.
By using filegroup backups, you can restore the active portions of the Customer and Order databases
separately. Because the archive data can be offline for a longer period of time, a filegroup backup
allows you to get the applications online more quickly while a restore of the archive data occurs in
the background. You should also schedule transaction log and differential backups on the same
schedule as the Account, Inventory, and Promotions databases.
What backup do you need for the HR database? [7 Marks]
Because the HR database implements TDE, you must have a backup of both the public and private
keys for the certificate in the master database that the HR database encryption key is based upon.
You should also have backups of the service master key, the master key for the master database,
and the master key for the HR database. The HR database should have full, differential, and
transaction log backups scheduled at the same intervals as the rest of the databases. The backups of
the master keys and certificate should be stored in a location separate from the database backups.

QUESTION FIVE (USE APPENDIX B TO ATTEMPT ALL QUESTIONS)


How should you configure the databases for maximum performance? [6 Marks]
To maximize the performance in the Order database, you should use the bulk-logged recovery model
during the import of the EDI transactions. Because you cannot recover a database to a point in time
during a minimally logged transaction, you should leave the database in bulk-logged recovery model
only for the minimum amount of time necessary.
How should the databases be configured to meet recovery obligations? [6 Marks]
To ensure a maximum data loss of 5 minutes, you need to create transaction log backups for all
databases. Transaction log backups can be created only for databases in either the full or bulk-
logged recovery model. With the exception of the load operations into the Order database, all
databases should be in the full recovery model at all times.
What policies would you implement to check and enforce the business requirements for Banana
Vineyard? [8 Marks]
The HR database is required to be protected using TDE, so you should create polices to ensure that a
database encryption key exists, encryption is enabled on the HR database, and the certificate that
TDE is using exists in the master database. Because the Salary table is encrypted using a certificate,
you should create a policy that ensures that the certificate exists in the HR database to support
encryption. You should also create a policy to ensure that the data in the Salary table has been
encrypted. Management does not want the CLR or Ad Hoc Remote Queries enabled, so you need to
create a policy to check enforcement for the surface area configuration. Finally, backups are
required to ensure recoverability, so you should create one or more policies to check the last
successful backup date.

OTHER QUESTIONS (USE APPENDIX B TO ATTEMPT ALL QUESTIONS)


What method should be used to move the data from each winery into the central database?
You could design an export routine to transfer data from each winery to the central office using the
Import and Export Wizard. However, you most likely also want to perform notifications, data
validation, and other business checks against the data prior to loading into the central database.
Therefore, you have a better process using the full capabilities of SSIS.
What method would provide the most flexible way to handle all the EDI submissions?
You could use BCP or BULK INSERT to move the EDI data into a table prior to running a stored
procedure that shreds the XML and performs all the business processing. By using the full power of
SSIS, you could build a more robust import process that could handle multiple files in parallel,
validate the XML structures, and even parse the XML during the data import.

How do you configure the instance to provide access to the applications without giving the
applications sysadmin authority?
If possible, you should create a login for each user of the Web-based applications, ideally by passing
the Windows credentials of the user to the database server. The logins should be added as users
within the appropriate database. The users should be added to database roles on which permissions
have been granted to provide the necessary access to objects.
How do you ensure that credit card numbers are encrypted within the database?
You should create a database master key in the Customers database. After the master key has been
created, you should create either a symmetric key or a certificate that can be used to encrypt the
credit cards in the table.
What would you implement to audit access to the HR database?
To audit the HR database, you need to create a server audit and then a database audit specification
mapped to the server audit object.

What would you configure to ensure that administrative processes were automated?
Database backups should be configured using three different jobs—one job for full backups, one for
differential backups, and one for transaction log backups. Although you could configure merge
replication to be run from the central office on a continuous basis, a better solution would be to
allow manual initiation of the synchronization process. The inventory loads from the wineries should
be built using Integration Services packages that are executed from SQL Server Agent jobs. Because
you cannot predict the time that files from your EDI partners will arrive, you could create a WMI
alert that will be triggered when a file is created in the EDI directory. The alert could then start a job
that runs an SSIS package to import the file for further processing. Finally, a job should be configured
to execute at the end of each month that archives data in the Customer and Order databases.

How do you determine the cause of performance issues?


Because performance issues are occurring on a sporadic basis, the most likely cause is blocking. You
should create a process that periodically captures the contents of sys.dm_exec_ requests to
determine if blocking is occurring. You can then use the sql_handle column to retrieve the
commands being executed that contribute to blocking.
How can you reduce or eliminate the blocking problems during the nightly consolidation run?
During the nightly consolidation run, you are making a large number of modifications to data. At the
same time, merge replication is attempting to read the changes and send them out to any subscriber
that is connected. You can eliminate the contention due to replication by preventing the merge
process from synchronizing changes. If merge is configured to run by a job or jobs within SQL Server
Agent, you stop the merge agent. If merge is being initiated from the subscriber, then you can
implement a logon trigger that prevents a connection by the merge process during the nightly
processing window.
How do you troubleshoot the errors that are occurring at the wineries?
You should review the SQL Server error logs and Windows Event logs to determine the source of the
errors. Device activation errors are usually due to SQL Server suddenly not being able to access a
data or transaction log file underneath a database, either because of insufficient permissions or
because the disk volume is inaccessible. Blue screens on the servers generally indicate processor or
memory issues and should be diagnosed with the diagnostic utilities that are included by your
hardware vendor.
How do you determine the cause of performance issues?
Each of the challenges or problems faced by Coho Vineyard requires output from SQL Trace as well
as a counter log. Although the errors and performance issues might be recent, you still need to
establish a longer-term strategy. Instead of capturing data only when problems occur, you should
implement a Performance Data Warehouse and configure data collection using the Performance
Counter, Query Activity, and SQL Trace collector types.
How do you troubleshoot the errors that are occurring at the wineries?
You can diagnose the performance issues as well as the errors by using the data stored in the
Performance Data Warehouse. When fixed, you can use the data in the Performance Data
Warehouse to establish a baseline and then build reports that highlight when the system has
deviated from the variances that you establish as acceptable within your environment.

You might also like