Click to See Complete Forum and Search --> : What are Files in SQL Database?


jayender.vs
June 7th, 2005, 02:13 AM
Hi ,
what are files in SQL datababse?
Iam new to SQL , iam working in VC++, but i want to know the size of the files in SQL datababse through VC++
so now i need to know what are files in SQL?
is it the oe which is in the table?
i mean..
if ther eis a database name: DOTS,
in DOTS ther eis a table ,Diagram, View... etc.
is what "files "actually mean in this?

p.s help me !!

thanks ,
Jayender !!

klintan
June 7th, 2005, 09:25 AM
SQL Server has three types of files per database, one primary file with data and objects for the database, zero or more secondary files with data, and one transaction log file.

By default, these files are stored in c:\program\Microsoft SQL Server\MSSQL\Data, but you could choose another default location when you install SQL Server, and also another location per database.

jayender.vs
June 8th, 2005, 05:41 AM
Thanks buddy !!
thanks a lot.
Good piece of info .

thanks...

hspc
June 17th, 2005, 10:42 AM
You can use these system stored procedures to get info about files.
For example, try this in the query analyser :
use northwind
go
sp_helpdb 'northwind'
go
sp_helpfile 'northwind'
go
sp_helpfile 'Northwind_log'

jayender.vs
June 18th, 2005, 02:24 AM
I gotthe solution buddy !!
thanks for the effort.

HanneSThEGreaT
June 18th, 2005, 05:26 AM
Just for interest sake.

If you say:
SP_HELP tablename

It will give you the table structure. (Column Names, Data Types, Field Sizes etc.)