interview questions

  • Hi Could any one tell me the answers for these questions.

    1. how do we troubleshoot a datbase if it is in suspect mode.What is the reason for a database to be in suspect mode.

    2. how can we move a file from C drive to D drive, so that the file location in C drive is completely moved .

    3.In a particular primary file group there are many objects.

    How can we move some of the objects from this primary file group in to another file group.

    4. can we install a sql server on a remote server so that it will not ask any inputs like domain name, authentication modes. .

    5.If we want to implement clustering , can we use the virtual ip address on clustering as the ip address of our system or we have to use another ip address for clustering

    6. In 2000 we have DTs package.can we run the same DTS package in 2005.

  • If these are interview questions for you trying to get a job, I'd have to say the answer is, "I don't know, but I can look it up." If that's the honest answer, for you, then that's the answer to give.

    (I have to admit, I don't understand question 4, and don't know the answer to 5, but the rest seem pretty basic. 5 I'd look up, 4 I'd have to ask for clarification.)

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Is this for a written interview test, or did someone ask you these?

    If you're trying to memorise answers for an interview, don't. A good interviewer can see through that very quickly.

    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
  • sorry for late, might be you already got the answer. I am just answering on my behalf and you can judge how correct I am :-

    1. how do we troubleshoot a datbase if it is in suspect mode.What is the reason for a database to be in suspect mode :- Check the errorlog of sql. If 2005 then it will be good as you can filter based on database. Check data/log files are at its place. Worse scenario when power failure and transaction is corrupt which make this situation, start implementing disaster recovery.

    2. how can we move a file from C drive to D drive, so that the file location in C drive is completely moved . :- take database offline/online. Use detach/attach. If the same configuration you want for all coming databse, make this setting in msdb.

    3.In a particular primary file group there are many objects.

    How can we move some of the objects from this primary file group in to another file group. :-

    I think alter database can help. for perticular table, create index and mention the perticular filegroup.

    4. can we install a sql server on a remote server so that it will not ask any inputs like domain name, authentication modes. .

    even if you install on remote server, it will ask.

    5.If we want to implement clustering , can we use the virtual ip address on clustering as the ip address of our system or we have to use another ip address for clustering

    There are in total 5 ip used for cluster which are physical ip.

    6. In 2000 we have DTs package.can we run the same DTS package in 2005.

    yes, open the DTS using SSIS.

    ----------
    Ashish

  • Hi,

    Find the interview questions and answers here http://www.sqlserverpeoples.com/Examples.aspx

  • rahul.neekhra 81176 (11/26/2014)


    Hi,

    Find the interview questions and answers here http://www.sqlserverpeoples.com/Examples.aspx%5B/quote%5D

    Not sure about that being useful in the real world, a comment from a script (first one I looked at) from the website:-

    exclude these databases as these are system databases which you might not be interested to take backup

    OK - I'll remember that :w00t:

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Stuart Davies (11/26/2014)


    rahul.neekhra 81176 (11/26/2014)


    Hi,

    Find the interview questions and answers here http://www.sqlserverpeoples.com/Examples.aspx%5B/quote%5D

    Not sure about that being useful in the real world, a comment from a script (first one I looked at) from the website:-

    exclude these databases as these are system databases which you might not be interested to take backup

    OK - I'll remember that :w00t:

    They're great if he's trying to sabotage other people by giving them stupid answers that will cause them to fail interviews.

    A couple other gems (that if told to me in an interview would persuade me fast that the person I'm interviewing has no clue)

    Use of Inner join instead of IN clause gives performance advantage.

    I have to assume that this is a statement that was never tested. Common myth though, great for seeing if someone takes statements at face value or tests them.

    The convert CSV to table uses a horribly slow method. Again proves that anyone presenting that has done no research or investigation on the subject

    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
  • And digging a bit further (cause it's more fun than doing performance reviews)

    http://www.sqlserverpeoples.com/SearchFaq.aspx?source=home&fpi=sql&fl=bas

    Truncate Truncate command is used to remove all rows of the column. The removed records are not recorded in the transaction log. It is the fast way to remove all the records from the table. The records once removed can’t be rolled back. It can’t activate trigger. It resets the identity of the column.

    I guess 3 out of 5 correct is a pass, but still shows that minimal research has been done and myths are believed at face value.

    SELECT * FROM

    WHERE [date column]>='2012-02-05 12:34:34.000' and [date column]<='2012-02-06 10:04:58.999'

    Shows a lovely lack of understanding of SQL Server datetime data types.

    A primary key is a constraint on a column whose values uniquely identifies in a table. Primary key values can never be reused/reinserted in the column on which it is defined. If a row is deleted from the table, its primary key may not be assigned to any new rows in the future.

    One out of those three statements is correct, the rest, I have no clue where they came from. This would have been trivial to test and see that it's false, so again, no research or testing done.

    5. Values in primary key columns can never be modified or updated.

    What is this? I don't even.

    http://www.sqlserverpeoples.com/SearchFaq.aspx?source=home&fpi=rdbms&fl=adv

    This page is plagiarised. Copied without attribution from http://en.wikipedia.org/wiki/Data_independence

    In case you were unaware, the text on Wikipedia is all under the Creative Commons Attribution-ShareAlike License; This means that it can be shared but attribution must be given.

    3. The WHERE clause may or may not contain aggregate functions. The HAVING clause can contain aggregate functions.

    The WHERE clause may contain aggregate functions? I really want to see a working example of that...

    Where

    select employee, sum(bonus) from emp_bonus

    group by employee where sum(bonus) > 1000;

    Msg 156, Level 15, State 1, Line 2

    Incorrect syntax near the keyword 'where'.

    So, not even tested.

    Also example shows how to apply "nolock". nolock is normally applied while querying on production servers.

    Right, because we normally want duplicate and missing rows when querying production.

    How many non-clustered indexes can create in a table?

    Maximum 249 non-clustered indexes can be created in a table.

    Little bit out of date here? Like 7 years out of date.

    What is the use of DBCC commands?

    DBCC stands for database consistency checker.

    Not since around SQL 7 it hasn't.

    What is heap or heap table in SQL Server ?

    A table without any clustered index is called a heap table in sql server. In such table rows of the data are stored in un-organized manner and also not linked to the adjacent pages in the table.

    In a heap, the only links between pages are between the adjacent pages in the table.

    Rahul, if you're going to post 'interview' questions, you really should do some work to ensure their technical accuracy before promoting the site.

    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
  • rahul.neekhra 81176 (11/26/2014)


    Hi,

    Find the interview questions and answers here http://www.sqlserverpeoples.com/Examples.aspx%5B/quote%5D

    I've been to that site before and was appalled at the answers and examples. As Gail pointed out, there's a whole lot of really bad information on that site. This is a prime example of why I tell people to cover up the answers on "interview questions" sites and use only the questions as a study guide.

    Everyone makes a mistake here and there but there's way too many on that site. You really need to do some research so that you're not causing more harm than good like you are now.

    I'd make some helpful suggestions on the site itself but I don't like the way you have to sign up to do so.

    --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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply