Você está na página 1de 21

5/25/2019 SQL Answer Set-1 – basasql

basasql

SQL Answer Set-1

June 14, 2015June 14, 2015 | basasql


1)What does SQL stand for?
c) Structured Query Language

2) Which SQL statement is used to extract data from a database?


d) SELECT

3) Which SQL statement is used to update data in a database?


a) UPDATE

4) Which SQL statement is used to delete data from a database?


b) DELETE

5) Which SQL statement is used to insert new data in a database?


c) INSERT

6) With SQL, how do you select a column named “FirstName” from a table named “Persons”?
b) SELECT FirstName FROM Persons

7) With SQL, how do you select all the columns from a table named “Persons”?
d) SELECT * FROM Persons

8) With SQL, how do you select all the records from a table named “Persons” where the value of the
column “FirstName” is “Peter”?
eter’
d)SELECT * FROM Persons WHERE FirstName=’Peter’

9) With SQL, how do you select all the records from a table named “Persons” where the value of the
column “FirstName” starts with an “a”?
d) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’

10) The OR operator displays a record if ANY conditions listed are true. The AND operator displays a
record if ALL of the conditions listed are true
a) True

11) With SQL, how do you select all the records from a table named “Persons” where the “FirstName” is
“Peter” and the “LastName” is “Jackson”?
b) SELECT * FROM Persons WHERE FirstName=’Peter’ AND LastName=’Jackson’

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 1/21
5/25/2019 SQL Answer Set-1 – basasql

12) With SQL, how do you select all the records from a table named “Persons” where the “LastName” is
alphabetically between (and including) “Hansen” and “Pe ersen”?
b) SELECT * FROM Persons WHERE LastName BETWEEN ‘Hansen’ AND ‘Pe ersen’

13) Which SQL statement is used to return only different values?


d) SELECT DISTINCT

14) Which SQL keyword is used to sort the result-set?


c) ORDER BY

15) With SQL, how can you return all the records from a table named “Persons” sorted descending by
“FirstName”?
b) SELECT * FROM Persons ORDER BY FirstName DESC

16) With SQL, how can you insert a new record into the “Persons” table?
a) INSERT INTO Persons VALUES (‘Jimmy’, ‘Jackson’)

17) With SQL, how can you insert “Olsen” as the “LastName” in the “Persons” table?
a) INSERT INTO Persons (LastName) VALUES (‘Olsen’)

18) How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
b) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

19) With SQL, how can you delete the records where the “FirstName” is “Peter” in the Persons Table?
a) DELETE FROM Persons WHERE FirstName = ‘Peter’

20) With SQL, how can you return the number of records in the “Persons” table?
b) SELECT COUNT(*) FROM Persons

21) Given an employees table as follows: empid name managerid a1 bob NULL b1 jim a1 B2 tom a1
What value will select count(*) from employees return?
c) 3

22) The result of a SELECT statement can contain duplicate rows.


a) True

23) Sometimes the expression “select count(*)” will return fewer rows than the expression “select
count(value)”.
b) False

24) What type of lock will deny users any access to a table?
c) EXCLUSIVE

25) Which of the following is the correct SQL statement to use to remove rows from a table?
c) DELETE

26) The only way to join two tables is by using standard, ANSI syntax.
b) False

27) A NULL value is treated as a blank or 0.


b) False

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 2/21
5/25/2019 SQL Answer Set-1 – basasql

28) The left outer join is one type of outer join. Another one is the.
e)all of the above

Question 1
Examine the two SQL statements given below:
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC
The second statement returns an error

Question 2
Which of the following is not a numeric group function?
Highest

Question 3
Examine the data in the EMPLOYEES table given below:
ALLEN 10 3000
MILLER 20 1500
KING 20 2200
DAVIS 30 5000
Which of the following Subqueries work?
SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM
employees GROUP BY department_id);
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM
employees GROUP BY department_id);

Question 4
Which of the following statements are true?
With DDL you can create and remove tables, schemas, domains, indexes and views

Question 5
Which of the following clauses are not allowed in a single row sub-query?
Order by

Question 6
What is the collection of information stored in a database at a particular moment called?
Instance

Question 7
The overall logical structure of a database can be expressed graphically by:
Entity-Relationship Diagram

Question 8
Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 3/21
5/25/2019 SQL Answer Set-1 – basasql

Languag? (such AS French, English, German etc)


Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which German books(if any) are more popular than all the French?
select bookname from books where language=’German’ and popularityrating> (select
max(popularityrating) from books where language=’French’)

Question 9
Which statements are true for views?
The definition of a view is stored in data dictionary
Views provide a more secure way of retrieving data

Question 10
Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)
Languag? (such AS French, English, German etc)
Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which Authors have wri en books on two or more subjects?
select AuthorName from Authors where Authorid in (select Authorid from Books group by SubjectId
having count(*)>1)

Question 11
What does the term DDL stand for?
Data Definition Language

Question 12
The concept of data independence is similar to the concept of ________
Abstract data type

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 4/21
5/25/2019 SQL Answer Set-1 – basasql

Question 13
What are the programs that execute automatically whenever DML operations are performed on tables
called?
Triggers

Question 14
What clause should be used to display the rows of a table in ascending order of a particular column?
Order By

Question 15
What is the error in the following query if the Students table contains several records?
SELECT name FROM students WHERE name =
(SELECT name FROM students ORDER BY name);
= should be replace by in operator
An order by clause is not allowed in a subquery

Question 16
How can data be accessed by users who do not have direct access to the tables?
By creating views

Question 17
Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)
Languag? (such AS French, English, German etc)
Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which Authors have wri en at least 1 book with a popularity rating of
less than 5?
select authorname from authors where authorid in (select authorid from books where
popularityrating<5) Question 18 An RDBMS performs the following steps: 1)It calculates the results of
the group functions of each group 2)It groups those rows together based on the group by clause 3)It
orders the groups based on the results of the group functions in the order by clause 4)It chooses and
eliminates groups based on the having clause 5)It chooses rows based on the where clause Arrange the
above steps in the correct order of execution: 5,2,1,4,3 Question 19 _________ is the operation that
displays certain columns from the table. Selection Question 20 There is a column c1 in the table t to
which a primary key pk is to be added. What will be the correct syntax? Alter table t add primary

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 5/21
5/25/2019 SQL Answer Set-1 – basasql

key(c1); Question 21 Which of the following are aggregate functions in SQL? Avg Sum Question 22 A
table Students has a column called name which stores the names of the students. What will be the correct
query to display the names of the students in reverse order? Select name from students order by name
desc; Question 23 The primary key index does not allow ________ data in a field. Null Duplicate1) What
does SQL stand for? c) Structured Query Language 2) Which SQL statement is used to extract data from
a database? d) SELECT 3) Which SQL statement is used to update data in a database? a) UPDATE 4)
Which SQL statement is used to delete data from a database? b) DELETE 5) Which SQL statement is
used to insert new data in a database? c) INSERT 6) With SQL, how do you select a column named
“FirstName” from a table named “Persons”? b) SELECT FirstName FROM Persons 7) With SQL, how do
you select all the columns from a table named “Persons”? d) SELECT * FROM Persons 8) With SQL,
how do you select all the records from a table named “Persons” where the value of the column
“FirstName” is “Peter”? eter’ d)SELECT * FROM Persons WHERE FirstName=’Peter’ 9) With SQL, how
do you select all the records from a table named “Persons” where the value of the column “FirstName”
starts with an “a”? d) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’ 10) The OR operator
displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the
conditions listed are true a) True 11) With SQL, how do you select all the records from a table named
“Persons” where the “FirstName” is “Peter” and the “LastName” is “Jackson”? b) SELECT * FROM
Persons WHERE FirstName=’Peter’ AND LastName=’Jackson’ 12) With SQL, how do you select all the
records from a table named “Persons” where the “LastName” is alphabetically between (and including)
“Hansen” and “Pe ersen”? b) SELECT * FROM Persons WHERE LastName BETWEEN ‘Hansen’ AND
‘Pe ersen’ 13) Which SQL statement is used to return only different values? d) SELECT DISTINCT 14)
Which SQL keyword is used to sort the result-set? c) ORDER BY 15) With SQL, how can you return all
the records from a table named “Persons” sorted descending by “FirstName”? b) SELECT * FROM
Persons ORDER BY FirstName DESC 16) With SQL, how can you insert a new record into the “Persons”
table? a) INSERT INTO Persons VALUES (‘Jimmy’, ‘Jackson’) 17) With SQL, how can you insert “Olsen”
as the “LastName” in the “Persons” table? a) INSERT INTO Persons (LastName) VALUES (‘Olsen’) 18)
How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table? b)
UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’ 19) With SQL, how can you
delete the records where the “FirstName” is “Peter” in the Persons Table? a) DELETE FROM Persons
WHERE FirstName = ‘Peter’ 20) With SQL, how can you return the number of records in the “Persons”
table? b) SELECT COUNT(*) FROM Persons 21) Given an employees table as follows: empid name
managerid a1 bob NULL b1 jim a1 B2 tom a1 What value will select count(*) from employees return? c) 3
22) The result of a SELECT statement can contain duplicate rows. a) True 23) Sometimes the expression
“select count(*)” will return fewer rows than the expression “select count(value)”. b) False 24) What type
of lock will deny users any access to a table? c) EXCLUSIVE 25) Which of the following is the correct
SQL statement to use to remove rows from a table? c) DELETE 26) The only way to join two tables is by
using standard, ANSI syntax. b) False 27) A NULL value is treated as a blank or 0. b) False 28) The left
outer join is one type of outer join. Another one is the. e)all of the above Question 1 Examine the two
SQL statements given below: SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY
salary DESC SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC The second
statement returns an error Question 2 Which of the following is not a numeric group function? Highest
Question 3 Examine the data in the EMPLOYEES table given below: ALLEN 10 3000
MILLER 20 1500 KING 20 2200 DAVIS 30
5000 Which of the following Subqueries work? SELECT distinct department_id FROM employees Where
salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM
employees GROUP BY department_id);

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 6/21
5/25/2019 SQL Answer Set-1 – basasql

Question 4
Which of the following statements are true?
With DDL you can create and remove tables, schemas, domains, indexes and views

Question 5
Which of the following clauses are not allowed in a single row sub-query?
Order by

Question 6
What is the collection of information stored in a database at a particular moment called?
Instance

Question 7
The overall logical structure of a database can be expressed graphically by:
Entity-Relationship Diagram

Question 8
Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)
Languag? (such AS French, English, German etc)
Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which German books(if any) are more popular than all the French?
select bookname from books where language=’German’ and popularityrating> (select
max(popularityrating) from books where language=’French’)

Question 9
Which statements are true for views?
The definition of a view is stored in data dictionary
Views provide a more secure way of retrieving data

Question 10
Consider the following tables:
Books
——
BookId
BookName
https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 7/21
5/25/2019 SQL Answer Set-1 – basasql

AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)
Languag? (such AS French, English, German etc)
Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which Authors have wri en books on two or more subjects?
select AuthorName from Authors where Authorid in (select Authorid from Books group by SubjectId
having count(*)>1)

Question 11
What does the term DDL stand for?
Data Definition Language

Question 12
The concept of data independence is similar to the concept of ________
Abstract data type

Question 13
What are the programs that execute automatically whenever DML operations are performed on tables
called?
Triggers

Question 14
What clause should be used to display the rows of a table in ascending order of a particular column?
Order By

Question 15
What is the error in the following query if the Students table contains several records?
SELECT name FROM students WHERE name =
(SELECT name FROM students ORDER BY name);
= should be replace by in operator
An order by clause is not allowed in a subquery

Question 16
How can data be accessed by users who do not have direct access to the tables?
By creating views

Question 17
Consider the following tables:
Books
——
BookId
https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 8/21
5/25/2019 SQL Answer Set-1 – basasql

BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book ON a scale of 1 TO 10)
Languag? (such AS French, English, German etc)
Subjects
———
SubjectId
Subject (such AS History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which Authors have wri en at least 1 book with a popularity rating of
less than 5?
select authorname from authors where authorid in (select authorid from books where
popularityrating<5)

Question 18
An RDBMS performs the following steps:
1)It calculates the results of the group functions of each group
2)It groups those rows together based on the group by clause
3)It orders the groups based on the results of the group functions in the order by clause
4)It chooses and eliminates groups based on the having clause
5)It chooses rows based on the where clause
Arrange the above steps in the correct order of execution:
5,2,1,4,3

Question 19

_________ is the operation that displays certain columns from the table.
Selection

Question 20
There is a column c1 in the table t to which a primary key pk is to be added. What will be the correct
syntax?
Alter table t add primary key(c1);

Question 21
Which of the following are aggregate functions in SQL?
Avg
Sum

Question 22
A table Students has a column called name which stores the names of the students. What will be the
correct query to display the names of the students in reverse order?
Select name from students order by name desc;

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 9/21
5/25/2019 SQL Answer Set-1 – basasql

Question 23
The primary key index does not allow ________ data in a field.
Null
Duplicate

1. Trigger is special type of __________ procedure.


a) Stored
b) Function
c) View
d) Table
View Answer

Answer: a
Explanation: Triggers are used to assess/evaluate data before or after data modification using DDL and
DML statements.

2. Point out the correct statement :


a) Triggers are database object
b) Three types of triggers are present in SQL Server
c) A DDL trigger is an action programmed to execute when a data manipulation language (DML)
event occurs in the database server
d) None of the mentioned
View Answer

Answer: a
Explanation:Triggers are special type of stored procedure that automatically execute when a DDL or
DML statement associated with the trigger is executed.

3. How many types of triggers are present in SQL Server ?


a) 4
b) 5
c) 8
d) 9
View Answer

Answer: a
Explanation:In Sql Server we can create four types of triggers Data Definition Language (DDL) triggers,
Data Manipulation Language (DML) triggers, CLR triggers and Logon triggers.

4. How many types of DML triggers are present in SQL Server ?


a) 1
b) 3
c) 5
d) None of of the mentioned
View Answer

Answer: d
Explanation:We have two types of DML triggers-AFTER and INSTEAD OF.

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 10/21
5/25/2019 SQL Answer Set-1 – basasql

5. Point out the wrong statement :


a) We can have an INSTEAD OF insert/update/delete trigger on a table that successfully executed
b) DML Triggers are used to evaluate data after data manipulation using DML statements
c) INSTEAD OF triggers cause their source DML operation to skip
d) AFTER triggers cause their source DML operation to skip
View Answer

Answer:d
Explanation:INSTEAD OF triggers cause their source DML operation to skip and they just execute the
code provided inside them.

6. AFTER trigger in SQL Server can be applied to :


a) Table
b) Views
c) Table and Views
d) function
View Answer

Answer: c
Explanation:AFTER trigger fires after SQL Server completes the execution of the action successfully that
fired it.

7. DML triggers in SQL Server is applicable to :


a) Insert
b) Update
c) Delete
d) All of the mentioned
View Answer

Answer: d
Explanation:In SQL Server we can create triggers on DML statements (like INSERT, UPDATE, and
DELETE) and stored procedures that perform DML-like operations.

8. Triggers created with FOR or AFTER keywords is :


a) AFTER
b) INSTEAD OF
c) CLR
d) All of the mentioned
View Answer

Answer: a
Explanation:AFTER triggers do not work for views.

9. Which of the following is not a typical trigger action ?


a) Insert
b) Select
c) Delete
d) All of the mentioned
View Answer

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 11/21
5/25/2019 SQL Answer Set-1 – basasql

Answer: b
Explanation:Valid trigger actions are INSERT, UPDATE and DELETE, or a combination of several,
separated by commas.

10. Triggers can beenabled or disabled with the ________ statement.


a) ALTER TABLE statement
b) DROP TABLE statement
c) DELETE TABLE statement
d) None of the mentioned
View Answer

Answer: a
Explanation:You can also use the ALL keyword instead of a trigger name to enable/disable all of the
triggers on a table in question.

1. _____________ is special type of trigger based on CLR environment.


a) DML
b) DDL
c) LOGON
d) CLR
View Answer

Answer: d
Explanation:CLR integration of triggers has been introduced with SQL Server 2008 and allows for
triggers to be coded in one of .NET languages like C#, Visual Basic and F#.

2. Point out the correct statement :


a) Logon triggers are special type of trigger that fire when LOGON event of Sql Server is raised.
b) DDL triggers are special type of trigger that fire when LOGON event of Sql Server is raised.
c) DML triggers are special type of trigger that fire when LOGON event of Sql Server is raised.
d) None of the mentioned
View Answer

Answer: a
Explanation:Logon event is raised when a user session is being established with Sql Server that is made
after the authentication phase finishes.

3. DDL trigggers can be applied to __________ statement.


a) CREATE
b) UPDATE
c) DELETE
d) INSERT
View Answer

Answer: a
Explanation:In SQL Server we can create triggers on DDL statements (like CREATE, ALTER, and DROP).

4. INSTEAD of clause cannot be used for ____________ trigger.


a) DML
b) DDL

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 12/21
5/25/2019 SQL Answer Set-1 – basasql

c) LOGON
d) CLR
View Answer

Answer: b
Explanation:We can use only FOR/AFTER clause in DDL triggers not INSTEAD OF clause means we can
make only After Trigger on DDL statements.

5. Point out the wrong statement :


a) DDL trigger can be used to observe and control actions performed on the server, and to audit these
operations.
b) DML trigger can be used to observe and control actions performed on the server, and to audit
these operations.
c) DDL triggers can be used to manage administrator tasks such as auditing and regulating database
operations.
d) None of the mentioned
View Answer

Answer: b
Explanation:DDL triggers are a special kind of trigger that fire in response to Data Definition Language
(DDL) statements.

6. Purpose of DDL Trigger is to :


a) Perform administrative tasks
b) Audit
c) Regulating database operations.
d) All of the mentioned
View Answer

Answer: d
Explanation:DDL triggers fire in response to a variety of Data Definition Language (DDL) events.

7. DDL triggers can only fire after the ______ statement has occurred.
a) DML
b) CLR
c) DDL
d) All of the mentioned
View Answer

Answer: c
Explanation:DDL Triggers can be set with either a Server scope or database scope.

8. How many types of DDL Trigger is present in SQL Server ?


a) 1
b) 2
c) 3
d) 4
View Answer

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 13/21
5/25/2019 SQL Answer Set-1 – basasql

Answer: b
Explanation:Transact-SQL DDL Trigger and CLR DDL Trigger are two types of DDL Trigger.

9. ____________ triggers do not create the special inserted and deleted tables.
a) DML
b) CLR
c) DDL
d) All of the mentioned
View Answer

Answer: c
Explanation:DDL triggers do not fire in response to events that affect local or global temporary tables
and stored procedures.

10. Scope of DDL triggers in SQL Server can be :


a) Server
b) Client
c) Views
d) None of the mentioned
View Answer

Answer: a
Explanation:DDL triggers can be server-scoped or database-scoped. A database-scoped DDL trigger is
simply called a database trigger.

1. How many ways of auditing the schema is available in SQL Server ?


a) 2
b) 3
c) 4
d) 5
View Answer

Answer: a
Explanation:There are mainly two ways to audit:Using backups and Scripts in SQL Server.

2. Point out the correct statement :


a) You can use Source control to audit schema changes
b) The SQL Server Audit feature enables you to audit column level groups of events and individual
events
c) Audit level actions encompass data manipulation languages (DML) and data definition language
(DDL) operations
d) None of the mentioned
View Answer

Answer: a
Explanation:Whether you do or not, this code in source control will need to be stored separately from
your development code in order to isolate keeping track of production changes from your development
processor.

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 14/21
5/25/2019 SQL Answer Set-1 – basasql

3. Which of the following event is not intrinsically audited ?


a) ALTER DATABASE AUDIT SPECIFICATION
b) CREATE SERVER AUDIT SPECIFICATION
c) DROP SERVER AUDIT SPECIFICATION
d) All of the mentioned
View Answer

Answer: d
Explanation:All audits are disabled when initially created.

4. Which of the following is server-level audit action group ?


a) BACK_RESTORE_GROUP
b) BACKUP_RESTORE_GROUP
c) DB_LOGOUT_GROUP
d) None of the mentioned
View Answer

Answer: b
Explanation:BACKUP_RESTORE_GROUP event is raised whenever a backup or restore command is
issued.

5. Point out the wrong statement :


a) When the query processor parameterizes the query, the parameter can appear in the audit event
log instead of the column values of the query
b) To access the triggering event we can use the EventData function in our DDL trigger
c) AUDIT_DATABASE_CHANGE_GROUP event is raised whenever CREATE DATABASE AUDIT is
issued
d) None of the mentioned
View Answer

Answer: c
Explanation:AUDIT_ CHANGE_GROUP event is raised whenever CREATE SERVER AUDIT is issued.

6. AUDIT_CHANGE_GROUP event is raised whenever any audit is :


a) created
b) modified
c) delete
d) All of the mentioned
View Answer

Answer: d
Explanation:Any change to an audit is audited in that audit.Equivalent to the Audit Change Audit Event
Class.

7. __________ could potentially lead to large audit records.


a) DATABASE_OBJECT_ACCESS_GROUP
b) DATABASE_MIRRORING_LOGIN_GROUP
c) DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
d) DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
View Answer

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 15/21
5/25/2019 SQL Answer Set-1 – basasql

Answer: a
Explanation:DATABASE_OBJECT_ACCESS_GROUP event is raised for any access to any database.

8. You can use the handy event name of __________ to make sure your trigger covers all DDL events.
a) DDL_DATABASE_EVENTS
b) DDL_DATABASE_LEVEL_EVENTS
c) DDL_DATABASE_LEVEL
d) All of the mentioned
View Answer

Answer: b
Explanation:DDL_DATABASE_LEVEL_EVENTS is used for auding database objects in SQL Server.

9. DDL Trigger can capture the information about the EVENT that fired it by using __________
function.
a) EVENTDATA()
b) EVENT()
c) EVENTS()
d) None of the mentioned
View Answer

Answer: a
Explanation:The EventData xml value includes the triggering SQL statement, the event time, the type of
event and depending on what type of event was called, extra information such as the database name.

10. Which of the following database level event si raised whenever a REFERENCESpermission is
checked. ?
a) EXECUTE
b) REFERENCES
c) UPDATE
d) SELECT
View Answer

Answer: b
Explanation:Database-level audit actions do not apply to Columns.

1. Which of the following is not a system database ?


a) Northwind
b) Master
c) Tempdb
d) All of the mentioned
View Answer

Answer: a
Explanation:Northwind is a sample database.

2. Point out the correct statement :


a) By default, tempdb autogrows as needed while SQL Server is running.
b) By default, master autogrows as needed while SQL Server is running.
c) By default, pubs autogrows as needed while SQL Server is running.

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 16/21
5/25/2019 SQL Answer Set-1 – basasql

d) By default, msdb autogrows as needed while SQL Server is running.


View Answer

Answer: a
Explanation:Tempdb holds all temporary tables and temporary stored procedures.

3. Which of the following holds temporary data ?


a) Northwind
b) Master
c) Tempdb
d) Msdb
View Answer
4. Which is the most important system database ?
a) Northwind
b) Master
c) Tempdb
d) All of the mentioned
View Answer

Answer: b
Explanation:The master database records all of the system level information for a SQL Server system.

5. Point out the wrong statement related to master database :


a) They are used to provide details of an backup plans
b) master records the information for SQL Server temporarily.
c) master records theinitialization information for SQL Server
d) None of the mentioned
View Answer

Answer: b
Explanation: Master is the database that records the existence of all other databases.

6. Which database is used as template for all databases ?


a) Northwind
b) Master
c) Tempdb
d) Model
View Answer

Answer: d
Explanation:When a CREATE DATABASE statement is issued, the first part of the database is created by
copying in the contents of the modeldatabase.

7. Which of the following database is used by SQL Server Agent ?


a) Pubs
b) Msdb
c) Tempdb
d) Model
View Answer

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 17/21
5/25/2019 SQL Answer Set-1 – basasql

Answer: b
Explanation:The msdb database is used by SQL Server Agent for scheduling alerts and jobs, and
recording operators.

8. How many types of system databases are present in SQL Server 2008?
a) 3
b) 4
c) 5
d) 6
View Answer

Answer: b
Explanation:Microsoft SQL Server 2008 have four system databases.

9. Which of the following system database occupies more space and memory ?
a) Master
b) Msdb
c) Tempdb
d) Model
View Answer

Answer: a
Explanation:The master database records all of the system level information for a SQL Server system.

10. The _________ database stores basic configuration information for the server.
a) Master
b) Msdb
c) Tempdb
d) Model
View Answer

Answer: a
Explanation:Master database includes information about the file locations of the user databases, as well
as logon accounts, server configuration se ings, and a number of other items such as linked servers and
startup stored procedures.

1. . __________ is a Microsoft Windows service that executes scheduled administrative tasks, which are
called jobs in SQL Server 2014.
a) Log shipping
b) Task
c)Agent
d) None of the mentioned
View Answer

Answer: c
Explanation:The SQL Server Agent is a service that lets you configure scheduled tasks and system alerts.

2. Point out the correct statement :


a) SQL ServerAgentuses SQL Server to store job information
b) SQL Server Agent can run a job on a schedule

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 18/21
5/25/2019 SQL Answer Set-1 – basasql

c) By default, the SQL Server Agent service is disabled when SQL Server 2014 is installed
d) All of the mentioned
View Answer

Answer: d
Explanation:SQL Server Agent runs continuously in the background as a Windows Service.

3. SQL ServerAgentconsist of _____ component.


a) 2
b) 3
c) 4
d) 5
View Answer
4. SQLAgentJob definitions are specified in which database ?
a) msdb
b) master
c) tempdb
d) All of the mentioned
View Answer

Answer: a
Explanation:msdb is a system database that is created when you first install SQL Server.

5. Point out the wrong statement :


a) SQL Server Log shipping allows you to automate a variety of administrative task
b) SQL Server task manager allows you to automate a variety of administrative task
c) SQL ServerAgentallows you to automate a variety of administrative task
d) All of the mentioned
View Answer

Answer: c
Explanation:SQL Server Agent is used to create and schedule a job that automates database
administration.

6. _________start and stop the SQL ServerAgentService .


a) SSMS
b) Windows Services console
c) QL Server Service Manager
d) All of the mentioned
View Answer

Answer: d
Explanation:Open up Microsoft SQL Server Configuration Manager and locate the SQL
Server Agent service. If the status of that service is “RUNNING”, you do not need to do anything.

7. Which of the following condition is considered for schedule ?


a) Whenever SQL ServerAgentstarts
b) On a recurring schedule.
c) SQL Server performance conditions

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 19/21
5/25/2019 SQL Answer Set-1 – basasql

d) All of the mentioned


View Answer

Answer: d
Explanation:A schedule specifies when a job runs.

8. An alert can respond to one of the following conditions :


a) Whenever SQL ServerAgentstarts
b) On a recurring schedule.
c) SQL Server performance conditions
d) All of the mentioned
View Answer

Answer: c
Explanation:An alert is an automatic response to a specific event. For example, an event can be a job that
starts or system resources that reach a specific threshold.

9. SQL Server can notify operators of alerts through :


a) E-mail
b) net send
c) Pager
d) All of the mentioned
View Answer

Answer: d
Explanation:An operator defines contact information for an individual responsible for the maintenance
of one or more instances of SQL Server.

10. Which of the following members has access to SQL ServerAgent?


a) members of the systemadmin
b) members of the sysadmin
c) members of the sysadministraion
d) None of the mentioned
View Answer

Answer: b
Explanation:Members of the SQLAgentUserRole, SQLAgentReaderRole, and SQLAgentOperatorRole
fixed database roles in msdb, and members of the sysadmin fixed server role have access to SQL
Server Agent

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 20/21
5/25/2019 SQL Answer Set-1 – basasql

Advertisements

REPORT THIS AD

CREATE A FREE WEBSITE OR BLOG AT WORDPRESS.COM.

https://basasql.wordpress.com/2015/06/14/sql-answer-set-1/ 21/21

Você também pode gostar