|
SQL server interview questions
1.How do you
read transaction logs?
2.How do you reset or reseed the IDENTITY column?
3.How do you
persist objects, permissions in tempdb?
4.How do you simulate a deadlock for testing purposes?
5.How do you rename an SQL Server computer?
6.How do you run jobs from T-SQL?
7.How do you restore single tables from backup in SQL Server
7.0/2000? In SQL Server 6.5?
8.Where to get the latest MDAC from?
9.I forgot/lost the sa password. What do I do?
10.I have only the .mdf file backup and no SQL Server
database backups. Can I get my database back into SQL
Server?
11.How do you add a new column at a specific position (say
at the beginning of the table or after the second column)
using ALTER TABLE command?
12.How do you change or alter a user defined data type?
13.How do you rename an SQL Server 2000 instance?
14.How do you capture/redirect detailed deadlock information
into the error logs?
15.How do you remotely administer SQL Server?
16.What are the effects of switching SQL Server from ‘Mixed
mode’ to ‘Windows only’ authentication mode? What are the
steps required, to not break existing applications?
17.Is there a command to list all the tables and their
associated filegroups?
18.How do you ship the stored procedures, user defined
functions (UDFs), triggers, views of my application, in an
encrypted form to my clients/customers? How do you protect
intellectual property?
19.How do you archive data from my tables? Is there a
built-in command or tool for this?
20.How do you troubleshoot ODBC timeout expired errors
experienced by applications accessing SQL Server databases?
21.How do you restart SQL Server service automatically at
regular intervals?
22.What is the T-SQL equivalent of IIF (immediate if/ternary
operator) function of other programming languages?
23.How do you programmatically find out when the SQL Server
service started?
24.How do you get rid of the time part from the date
returned by GETDATE function?
25.How do you upload images or binary files into SQL Server
tables?
26.How do you run an SQL script file that is located on the
disk, using T-SQL?
27.How do you get the complete error message from T-SQL
while error handling?
28.How do you get the first day of the week, last day of the
week and last day of the month using T-SQL date functions?
29.How do you pass a table name, column name etc. to the
stored procedure so that I can dynamically select from a
table?
30.Error inside a stored procedure is not being raised to my
front-end applications using ADO. But I get the error when I
run the procedure from Query Analyzer.
31.How do you suppress error messages in stored
procedures/triggers etc. using T-SQL?
32.How do you save the output of a query/stored procedure to
a text file?
33.How do you join tables from different databases?
34.How do you join tables from different servers?
35.How do you convert timestamp data to date data (datetime
datatype)?
36.Can I invoke/instantiate COM objects from within stored
procedures or triggers using T-SQL?
37.Oracle has a rownum to access rows of a table using row
number or row id. Is there any equivalent for that in SQL
Server? Or How do you generate output with row number in SQL
Server?
38.How do you specify a network library like TCP/IP using
ADO connect string?
39.How do you generate scripts for repetitive tasks like
truncating all the tables in a database, changing owner of
all the database objects, disabling constraints on all
tables etc?
40.Is there a way to find out when a stored procedure was
last updated?
41.How do you find out all the IDENTITY columns of all the
tables in a given database?
42.How do you search the code of stored procedures?
43.How do you retrieve the generated GUID value of a newly
inserted row? Is there an @@GUID, just like @@IDENTITY?
|
|