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 ?    33 Yes 3 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 ?    29 Yes 2 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 ?    8 Yes 8 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 ?    4 Yes 6 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 ?    14 Yes 1 No
1 Aug @008
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
how to retrive only second row from table in sql server 2000? CTS7
What are functions  3
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL? HCL3
What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they. IBM5
If you are working on a SQL database and if suddenly a developer changes the code and your queries results start giving errors,how will you check using a T-SQL query (on system tables) that what has changed in the database. Microsoft2
Write a query to delete duplicate records in SQL SERVER Infosys19
What is the difference between HAVING clause and the WHERE clause?  4
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? HCL1
What are the two virtual tables SQL Server maintains for triggers?  2
Can Having clause be used without Group by clause? CTS4
Anyone please explain me the concept of Serialization?  3
How m-m relationships are implemented?  1
Explain different isolation levels?  3
WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,... TVS2
How to find the second largest salary in the emp database and also How to find 3rd,4th and so on ........ in the emp database plz mail the answer @ mak2786@gmail.com Oracle18
if we have a column (Key) in a table. and values of that column is Key 1 1 1 2 2 3 3 4 4 5 5 5 and we want to show the data after query..like.. 1(3) 2(3) 3(2) 4(2) 5(3) how many times a single term comes.. Rolta5
What is user stored procedure & it purpose? Wipro3
What is a Trace frag?Where can we use this?  1
In performance wise distinct is good or group by is good? eg:select name from emp group by name; select distinct name from emp; Infosys4
WHAT IS UNIQUE IDENTIFIER DATA TYPE? Sparsh2
 
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