SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Few tricky Questions about SQL Server 2008 that I came across...


Few tricky Questions about SQL Server 2008 that I came across...

Author
Message
Lynn Pettis
Lynn Pettis
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40422 Visits: 38567
I have a question, where is this employer located? Notice, I'm not asking who they are, just where they are located.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
beginner_dk
beginner_dk
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 70
these are an online assessment test questions called proveit
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88498 Visits: 41130
beginner_dk (3/18/2013)
these are an online assessment test questions called proveit


Yowch! You should alert the company that made you go through the "Proveit" gambit and then show them Gail's answers. As a bit of a side bar, this is why I refuse to go through such testing for any company.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
JagWalia
JagWalia
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 93
I agree. They hired me anyway and I told them about it. Proveit needs to fix this mess otherwise it is hurting lots of people. I was lucky but not everybody.....

Thanks

Jag Walia
beginner_dk
beginner_dk
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 70
the company or the recruiter is unaware of the questions and the answers. He will just receive the score card with the percentile of the candidate.
beginner_dk
beginner_dk
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 70
Hi Everyone,

I have few questions regards to Gila Monster's answers can anyone of you please help me in finding the right ones as i am new to SQL Server

Q: Which of the following allows for the truncation of a transaction log?
A. Transaction logs are truncated when you use SQL Profiler.
B. Transaction logs are truncated when you use the following syntax: truncate table A
C. Transaction logs are truncated when you backup your database.
D. You can not backup transaction log.

A: I guess C is a possible answer as the transactions logs are automatically truncated with back up

Q: Which of the following statements about unique Constraints are TRUE?
A. You can have only one unique constraint applied to a table.
B. Unique constraints can be used to establish a link between two tables.
C. You can only have one column assigned to a unique constraint.
D. If a primary key was already assigned to a table, the unique constraint would identify a special column used for indexing,

A: I am guessing B as the answer as "a link between tables" can also be a FK (FOREIGN KEY) and UC are used for FK's

Q: Which of the following is an improved performance feature that uses bitmap filters for selecting minimal rows with queries?
A. Table partitions
B. Star Join
C. Where clause
D. Outer Join

A: Star Join uses bitmap filters for performance in SQL SERVER 2008

Q. Which of the following statements can be used to provide sorted result set based in the CustomerName column?
A. SELECT ROW_NUMBER() AS RN, CustomerName from Customers order by CustomerName
B. SELECT ROW_NUMBER() OVER (ORDER BY CustomerName) AS RN, CustomerName FROM Customers
C. SELECT ROW_NUMBER() (ORDER BY CustomerName) AS RN, from Customers
D. SELECT ROW_NUMBER() AS RN, CustomerName from Customers

A: B as it is not mandatory to specify the partition by in over clause
If PARTITION BY is not specified, the function treats all rows of the query result set as a single group.

Q: Full text indexes can be backed up and restored with the rest of the database due to the ...
A. ...new index organization system
B. ...overall size of the index getting smaller.
C. ...index becoming a part of the transaction logs.
D. ...indexes no longer being stored outside of the database.

A: D as coming from SQL SERVER 2008 Full text indexes are stored in databases unlike the previous versions where they are stored on disks structured outside the database

Any Help is Greatly Appreciated!

Thanks and Regards!
:-)
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88498 Visits: 41130
beginner_dk (3/18/2013)
the company or the recruiter is unaware of the questions and the answers. He will just receive the score card with the percentile of the candidate.


That's actually a major part of the problem.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
GilaMonster
GilaMonster
SSC Guru
SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)

Group: General Forum Members
Points: 89377 Visits: 45284
beginner_dk (3/18/2013)
A: I guess C is a possible answer as the transactions logs are automatically truncated with back up


No they're not.

A: I am guessing B as the answer as "a link between tables" can also be a FK (FOREIGN KEY) and UC are used for FK's


They can be, but they're not required (either of the other 2 unique-guaranteeing structures is fine too). Still, a UQ does not in any way provide a link between tables, so no, B is wrong too.

A: B as it is not mandatory to specify the partition by in over clause
If PARTITION BY is not specified, the function treats all rows of the query result set as a single group.


B does not necessarily provide an ordered resultset. It provides row numbers ordered by the customer name, the resultset however is not necessarily ordered that way. The only one that has an ORDER BY clause (required for guaranteeing an ordered resultset) has a syntax error.

Don't confuse 'will usually work the way you want' with 'is guaranteed to work the way you want'. No order by clause, no guarantee of order.

For B to be correct, it needs ORDER BY CustomerName added at the end.

A: D as coming from SQL SERVER 2008 Full text indexes are stored in databases unlike the previous versions where they are stored on disks structured outside the database


Outside the DB doesn't mean they're not backed up with the DB. Fulltext indexes have always been backed up with the DB, that they're now in the DB files doesn't suddenly change that.

From Books Online (SQL 2005 entry)
Backup and restore treat full-text catalogs the same as database files. If the database that is being copied contains tables that have been defined for full-text indexing, then the destination computer must also have Full-Text Search installed before the full-text catalogs can be re-created and repopulated. If the Microsoft Full-Text Engine for SQL Server (MSFTESQL) service is not installed, the full-text catalog will be offline after restore.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


beginner_dk
beginner_dk
SSC Veteran
SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)SSC Veteran (203 reputation)

Group: General Forum Members
Points: 203 Visits: 70
Hi GilaMonster,

Thanks a lot for taking time to review them. The test says if you don't find correct answer in the given options, guess /choose the one which is more near to the correct answer and i was trying to do that. so it might help me if i had to take the test again.

I went through few BOL topics (Transaction Log Truncation, Over Clause, Create Login, etc) and books to find these answers and thought they might be an option near to right one.

Regarding sorting order, i went through the BOL over clause and tested on a table created my self and it worked. so i thought it might be true.

Coming to full text indexes there is a book "Mastering SQL Server 2008 By Michael Lee, Gentry Bieker" on page 626, chapter 21, second para of the new alter feature box, it is stated that FTI's are backed up with every SQL Server Back up processes because they are included in the standard catalog
so again with minimal knowledge about it, i assumed it to be true.

your help is greatly appreciated and thanks for your tip Don't confuse 'will usually work the way you want' with 'is guaranteed to work the way you want'., will keep it in mind

Thanks and Regards
DK
GilaMonster
GilaMonster
SSC Guru
SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)

Group: General Forum Members
Points: 89377 Visits: 45284
beginner_dk (3/19/2013)
Regarding sorting order, i went through the BOL over clause and tested on a table created my self and it worked. so i thought it might be true.


"It worked for me once" != "It's guaranteed to work". No order by, no guarantee of order, end of story.
Now, a simple query like that will probably come back in the correct order, but that's a side effect of how the query execution engine works, not a guaranteed behaviour

Coming to full text indexes there is a book "Mastering SQL Server 2008 By Michael Lee, Gentry Bieker" on page 626, chapter 21, second para of the new alter feature box, it is stated that FTI's are backed up with every SQL Server Back up processes because they are included in the standard catalog
so again with minimal knowledge about it, i assumed it to be true
.

It is true, but that quote in no way implies that prior to SQL 2008 FTIs were not backed up with the database because they're not included in the database.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search