ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What are mdf,ndf,ldf files and how to see the data in those
files?
 Question Submitted By :: Durga Prasad
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are mdf,ndf,ldf files and how to see the data in those files?
Answer
# 1
When we create a db,the create command will create a data 
file with an Extension .mdf,as well as a transaction log 
file with extension .ldf
Any additional or secondary data files have .ndf extension
 
Is This Answer Correct ?    3 Yes 0 No
Padma
 
  Re: What are mdf,ndf,ldf files and how to see the data in those files?
Answer
# 2
.mdf is extention of primary file,
.ndf is extention of secondary file,
.ldf is extention of log file,

sp_helpfile
 
Is This Answer Correct ?    3 Yes 0 No
Visala
 
 
 
  Re: What are mdf,ndf,ldf files and how to see the data in those files?
Answer
# 3
sp_helpdb "database name"
 
Is This Answer Correct ?    1 Yes 2 No
Sankar
 
  Re: What are mdf,ndf,ldf files and how to see the data in those files?
Answer
# 4
For reading the log files (.ldf) an undocumented system 
stored procedure sp_readerrorlog is there.  This SP allows 
you to read the contents of the SQL Server error log files 
directly from a query window and also allows you to search 
for certain keywords when reading the error file.  This is 
not new to SQL Server 2005, but this tip discusses how this 
works for SQL Server 2005.

This is a sample of the stored procedure for SQL Server 
2005.  You will see that when this gets called it calls an 
extended stored procedure xp_readerrorlog.

This procedure takes four parameters:

Value of error log file you want to read: 0 = current, 1 = 
Archive #1, 2 = Archive #2, etc... 
Log file type: 1 or NULL = error log, 2 = SQL Agent log 
Search string 1: String one you want to search for 
Search string 2: String two you want to search for to 
further refine the results

If you do not pass any parameters this will return the 
contents of the current error log.

Example 1

EXEC sp_readerrorlog 6  

This statement returns all of the rows from the 6th 
archived error log.

Example 2

EXEC sp_readerrorlog 6, 1, '2005'  

This returns just 8 rows wherever the value 2005 appears.
Example 3

EXEC sp_readerrorlog 6, 1, '2005', 'exec'  

This returns only rows where the value '2005' and 'exec' 
exist.

Even though sp_readerrolog accepts only 4 parameters, the 
extended stored procedure accepts at least 7 parameters.

If this extended stored procedure is called directly the 
parameters are as follows:

Value of error log file you want to read: 0 = current, 1 = 
Archive #1, 2 = Archive #2, etc... 
Log file type: 1 or NULL = error log, 2 = SQL Agent log 
Search string 1: String one you want to search for 
Search string 2: String two you want to search for to 
further refine the results 
? 
? 
Sort order for results: N'asc' = ascending, N'desc' = 
descending
 
Is This Answer Correct ?    0 Yes 2 No
Arunyadav007
 
  Re: What are mdf,ndf,ldf files and how to see the data in those files?
Answer
# 5
mdf: When You Create Database .this Primary file
ndf: This is Sceondry File
ldf: Lof Files
 
Is This Answer Correct ?    1 Yes 0 No
1 Aug @008
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What are the two virtual tables SQL Server maintains for triggers?  2
How do you load large data to the SQL server database?  2
What about UPDATESTATISTICS ? Intelligroup1
how to retrive only second row from table in sql server 2000? CTS7
explain different types of jions with examples briefly? Zensar1
When do you create cluster and noncluster index? Satyam4
How to create logins using windows Authentication mode?  1
What is RAID and what are different types of RAID configurations? Wipro3
I have a huge amount of data which is displayed in a report. The data is viewed every day. Every day the data is displayed in 30 secs but suddenly today it is giving an timeout message today. Data has not been changed. The situation is same as yesterday. What might be the reason??? Please Answer. Satyam3
i have 4 tables.. T1, T2, T3, T4.. these tables have the same structure and they store the information entered in different years.. T1 stored 2002, T2 stored 2003, T3 stored 2004 and T4 stored 2005.. i want to copy contents in T1 to T2, T2 to T3, T3 to T4 and T4 to T1.. how do i do that? Temp tables cannot be used..  1
Which system tables contain information on privileges granted and privileges obtained  1
Can anybody explain me cold backup and hot backup? TCS2
What is the difference between distinct clause and group by clause? Value-Labs1
Differnce between sel server 2000 and 2005  3
How to work on DTS?what is the main requirement? ivan1
Name three version of sql server 2000 and also their differences?  1
Advantages and Disadvantages of Cursor? Zenith4
From where can you change the default port?  3
What is the basic functions for master, msdb, tempdb databases? CSC2
How to find the date and time of last updated table? Teledata1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com