SQL Server Interview Questions
Questions Answers Views Company eMail

Syntax to find the used space and free space of the Data file in a database(SQL Server). Following queries didn't give the exact Used space and Free Space Information sp_spaceused;DBCC showfilestats;exec MyDbName.dbo.sp_spaceused;SP_HELPFILE Can any one tell me the query for how to find the exact used data file space and free space in a Data File?


2 4764

How to generate the Reports for the Database? I need an Example for it.Will we manually do this or else any script is there? Please let me know ASAP...


1 1997

When we are using this query to shrink the log file,what exactly it will execute internally? Do we lose any data when we run this script? which data it will truncate in the log file and where it is saved. Please let me know... USE DatabaseName GO DBCC SHRINKFILE(, 1) BACKUP LOG WITH TRUNCATE_ONLY DBCC SHRINKFILE(, 1) GO


1 2875

one of my database size is 2gb and Unrestricted Growth for Data file up to 10%.But every day after day I am getting Primary Data file is full 99.999 please take appropriate actions.Why it is? Even disk space is also not full,but still I am getting the alerts.


1 3278

What are the steps you will take to improve performance of a poor performing query?

1 2929

How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?

2 2898

Hi all, I need query help for below senorio, could you please help me. TableName = City CITYID ContinuationID CITYNAME 1 1 SAN 1 2 DIEGO 2 1 SAN 2 2 FRANCISCO 3 1 CHICAGO 4 1 NEW 4 2 YORK 4 3 CITY Could you please help me to write a generalized SQL that returns results as given below in the Query result CITYID NAME1 NAME2 NAME3 NAME4 NAME5 1 SAN DIEGO 2 SAN FRANCISCO 3 CHICAGO 4 NEW YORK CITY


5 4781

Does any body please help me what question's have asked for SSRS in the interview?


What is the difference between in and exists. Ex: select * from emp where empno in(....) and select * from emp where empno exists(....) What is the difference between a Join and Union and Union and UnionAll.

ABC, Accenture,

5 6561

How to handle errors in Stored Procedures.


2 5581

what is the difference between procedure and function.


4 5011

Security Question- SQL DBA exparts, need your help...

3 3155

What is Stored Procedure? What is Views in sql server? Difference between a User Defined Function and a Stored Procedure Difference between a primary key and a unique key? What is a join and explain different types of joins. Difference between temp table and table variable Difference between Triggers and Stored Procedures Difference between UNION ALL Statement and UNION What is COALESCE / Why do we use COALESCE? Why we use SET ROWCOUNT in Sql How many clustered index can have a table How many types of local tables in SQL SERVER Difference between DELETE and TRUNCATE What is Aggregate Functions? What is Row_Number()? What are Ranking Functions? What is NOLOCK? What is CTE? What are the Advantages of using CTE? What is the STUFF function and how does it differ from the REPLACE function? What are the difference between clustered and a non-clustered index? What are the different index configurations a table can have? Difference between a HAVING CLAUSE and a WHERE CLAUSE? Difference between SET and SELECT Provide all the built in string function of SQL SERVER Difference between char and varchar data types Define candidate key, alternate key, composite key. What are constraints? Explain different types of constraints. What is a self join? Explain it with an example. How will you convert table row to a column comma separated value


4 7877

what is the maximum size of sql row in mssql?

1 3930

There are two tables (T1, T2) with different rows. Find the output of query. Select count(*) from T1,T2.


3 4384

Post New SQL Server Questions

Un-Answered Questions { SQL Server }

1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.


Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.


Hi all, can any one please tell me the difference between sql server 2008 and orace 9i


how to overcome kernel isssues


hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that


hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail


where the connection string store in the database


optimization techinques


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?


Comment,Datatypes are unlimited


Call by value and call by reference in procedure and function, with NOCOPY.


In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance


How much memory that we are using in Logshipping Concept?