Sql Server Interview Questions and Answers (1758) - Page 18

How to know the ID of a database?

To know the ID of a database DB_ID function is used. It takes the database name as an argument.
DB_ID(dbName)


Example:- SELECT DB_ID(Student) -->5
Which function is used to perform a full text search on a column?

FREETEXT function can perform a full text search on the specified column.

FREETEXT({column/*}, search-string)

It will return the rows with columns that match the search-string. It matches the meaning only not the exact value of the search-string.
Which function is used to know the current active user within the host Operating System?

SYSTEM_USER function is used to know the current active user within the host Operating System.

SELECT SYSTEM_USER
-->Abhisek
What is the use of MOD function?

MOD function is used to get the remainder of a division. It takes the dividend and divider as its arguments.
MOD(dividend,divider)


Example:-

SELECT MOD(12,5) 
it will output 2.

It will return the dividend if the divider will 0.
What are the various transaction isolation levels ?

read uncommitted
read committed
serializable and
repeat table read
What are the variuos lock types ?

SHARED
UPDATE
EXCLUSIVE
How can we check the locks defined in a DB ?

using inbuilt stored proceduce
sp_lock
Which function is used to know the database property in SQL Server.

DATABASEPROPERTYEX(dtabase,property)
It will return the specified property of the specified database.
Example:-
SELECT DATABASEPROPERTYEX(Student,Version)
-->365

You can use this function to know other properties of your database.
What is the use of CHAR function?

CHAR function is used to convert the numeric ASCII code to a character.

SELECT CHAR(90)
--->D
What is the use of APP_NAME()?

APP_NAME() returns the name of the application for the current section. It returns the application name that is set by the application by default.

SELECT APP_NAME()
It outputs "SQL Enterprise Manager" if you are currently working on it.
Can we create Web service in SQL Server 2005?

Yes, we can create web service in SQL Server 2005 using an HTTP EndPoint
Which Editor we can use to create the SSIS Packages?

BIDS (Business Studio Development Studio)
How we can check the database permission for any user?

SELECT * FROM fn_my_permissions (null, 'DATABASE');
How we can deploy SSIS?

Steps to deploy SSIS are:
(1) Right click on the name of the project in the solution explorer.
(2) Open Properties --> Select Deployment Utility
(3) Set CreateDeploymentUtility to True
(4) Build Project
(5) Check the Deployment folder in bin
(6) Double click on <ProjectName>.SSISDeploymentManifest file.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories