Explanation Of SQL Server Database Files

Feb 22, 2000

When a database is created in SQL Server, 4 files are made:

(example)
DB_Data.DAT
DB_data.mdf
DB_Log.DAT
DB_log.ldf


What do each of these files contain? I can figure out that the main database is the DB_Data.DAT, but why is the transaction log a .DAT and why is there four files instead of two? etceterea.

Llyal

View 3 Replies


ADVERTISEMENT

Funny SQL Server Error Messages - Anyone Has An Explanation?

Apr 3, 2006

I am getting a new server online at a customer, and our system shows very funny erorrs under full load. No explanations could be found. Anyone has some?
Here we go:
Server failed to resume the transaction, desc: 360000054a. The transaction active in this session has been committed or aborted by another session.,
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
and
New request is not allowed to start because it should come with valid transaction descriptor.
System.Data.SqlClient.SqlException
I am a little lost on those. Simple fact is that I do not find any description of those. Anyone an idea what causes these?

View 2 Replies View Related

SQL Attached Mdf Database Files VS Database Imported Into Or Created In SQL Server 2005

Apr 8, 2007

 Hi all (newbie @ asp.net)(oldie @ ASP 3)What is the purpose of using an attached MDF database files in the App_Data folder on a web site as to importing it into the SQL server directly or creating it on the SQL server. Does a mdf database attached file purely use the SQL server as a connection interface.Is it something similiar to DSN(ODBC) Connections for ms access databases.

View 2 Replies View Related

Database Server Will Not Expand Mdf Or Ndf Files

Jul 23, 2005

Has anyone had an issue with SQL Server not being able to expandagainst a RAID 5 file system? My current configuration is that theserver is started and stopped using the local system account. I haveonly one database (besides the master, model,etc)on the server. Whathas happend to me several times is that the primary database inquestion try's to expand the main datafile for the database (.mdf). Isetup the database to not expand automatically initially so that I canbe sure that we have enough file system space. Becuase of problems withthe application I decided to automatically expand. The other day thedevelopers came to me indicating that the databse was full and neededto be expanded. Knowing that the database was in automatic expandingmore I was surprise to hear this. I went into EM and attempted toexpand first the log and it would not indicating that it there was anissue in attempting to do so. I have never heard of a database notbeing able to expand. I ran DBCC's, etc and it came up clean. I triedto back the database up to disk and it would not backup. I finally hadto rename the datbase and rebuild it using DTS and scripts. I thoughtI had fixed it only to find out today that it (again) won't expand. Irenamed the datbase and then tried taking an older backup file andrestore it and it would not restore. This problem seems to be relatedto the file system but how I do not know.So, I am ready to run rebuild master but I have sone this before onlyto have this come back on me. I am at a complete loss. In the past Ihave had to rebuild the entire server and database from scratch. Theonly problem is that this has been done 3 times now with no completesolution or explaination. If any of you have seen this type ofbehavior and know whats going on please, please let me know what youthink the case and solution is!

View 8 Replies View Related

How To PROTECT SQL Server Database Files ?

Jul 23, 2005

Hello,How to protect structures(Tables,SP,Views and Functions) of a SQLServer Database?(Password protect a database file)I have a SQL database that will distribute with my application, I wantto protects it's structure from my appliction users. Only myapplication can access the database.Thanks

View 3 Replies View Related

Storing Files To Server, Directory Or Database, Which Is Better?

Feb 9, 2007

Which is better, to store the files onto the server's folders or to a database?
I tried storing to MSSQL 2000 but the varbinary does not allow me to set "MAX" for the data type.
 

View 1 Replies View Related

Connecting To Database Files Not Kept Local To The SQL Server?

Jun 14, 2001

I am interesting in knowing how to connect to database files that are not kept local to the SQL server? If you have any familiarity w/ this, can you please help me out w/ some information.

Thanks.

View 2 Replies View Related

Importing Binary Files Into Sql Server Database

Sep 26, 2005

I work for a company that makes heat transfers for the imprinted apparel market. We're developing a database of merchandise images for all of our non-design inventory. Using Access we're going to be inserting thumbnails of psd (photoshop) files. We're wondering if there is any way to import multiple psd's into the sql server database into matching records like matching a column named "filename" and the actual filename of the file without having to upload each file individually. We want to be able to dump the files from the database of the matching records, also. This way, once our catalog designer has found which designs they need to put into the new catalog, it will dump the psd's for us. The same for our staffer who does color separations.

Any suggestions out there? If you need me to post further of what we're trying here, I will. This is for the bossman.

View 4 Replies View Related

How To Store Flash Files Into The Sql Server 2000 Database

Mar 1, 2008

Hi

How to store flash files into the sql server 2000 database and again display them back in asp.net/C# user interface?thanks 

View 1 Replies View Related

SQL Server Admin 2014 :: Virtual Log Files For Database

May 20, 2015

Is there a better way to deal with the virtual log files?...I see several approaches in dealing/decreasing the virtual log files for a database..want to know what's the best n safest approach, from the masters here?

View 9 Replies View Related

SQL 2012 :: Attaching SSAS Database Files On A Different Server?

Jun 26, 2015

I can detach/attach SSAS database.But I have a software that protects(backs up) the files of the SSAS Database.

What the customer needs is to be able to take these backed up files and port it to a different server and attach it there.But the new server complains that these files have no corresponding detach-log files.

The customer doesn't want to backup and restore the SSAS databases.

View 2 Replies View Related

SQL Server 2008 :: Restore Database From Raw MDF And LDF Files Of Old To New Computer

Aug 18, 2015

I have a client that has POS software called Restaurant Pro Express (RPE) from www.pcamerica.com
Their old POS computer had a hardware failure, but I was able to attach the hard-drive to another computer and recover the data. RPE uses a MSSQL database system. However, my client doesn't seem to make backups very often - the last one is dated January 5, 2015.

I was able to copy the C:Program FilesMicrosoft SQL Server folder over which contained the instance as well as all the data files - and has up-to-date information. The instance in the recovered Microsoft SQL Server folder was called MSSQL.1. I installed the RPE software on their new computer, and it too now has an instance called MSSQL10_50.PCAMERICA. The new computer is using MSSQL 2008 R2, while I believe the old computer would have been using MSSQL 2005.

View 4 Replies View Related

SQL Server 2008 :: Move Database Log Files Massively

Sep 14, 2015

I want to to move all database log files from drive E to F .

There are more than 10 databases so I don’t wanna move them 1 by 1 .

At the moment I use detach – attach method .

-Detach db
-Move log file
-Attach db

How do I do this massively in one go ?

View 5 Replies View Related

Database Files Free Space (SQL Server 2005)

Nov 4, 2006

Dear friends

I need to report the amount of free space in each datafile of a database.

I have tried sys.dm_db_file_space_usage , but the documentation says that it only works for the TempDB.

Please help.

Regards

Parviz

View 5 Replies View Related

DB Engine :: Moving Database Backup Files From One Server To Another?

Sep 15, 2015

How to move the database backup files (.bak) from one server to another server using ‘XP_CMDSHELL’

View 2 Replies View Related

Convert Existing MDB Database Files To Server Express

Feb 27, 2015

1) What is the current version of SQL Server Express?
2) HOw much SQL Server Express costs (figure about 500 branch servers)
3)Are there any Tools from Microsoft to convert Access 97 directly to SQL Server express, and how much do they cost?
4)Server Hardware requirements to run SQL Server Express - disk size, memory size, security settings, pre-requisite, service needed.
5)Maximum capacity / capabilities of SQL Server Express-max # of simultaneous users,tables,rows,database size.
6)Any installation instruction for SQL Server Express.

View 4 Replies View Related

Just An Explanation Of What This Means Please

Jan 22, 2008

Hi,
I have a project that has been given to me and need help please. The complete class is as follows
Public Class CarAccessData
    Public Function Getcarinfo() As List(Of CarInfo)
        Dim AllCarInfo As New List(Of CarInfo)
        Dim SQL As String        SQL = "SELECT [SKU], [CarMake], [CarModel], [Carprice]"
        Dim MyConnection As SqlConnection        MyConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("AntConnectionString1").ConnectionString)
        Dim aCmd As SqlCommand        aCmd = MyConnection.CreateCommand
        aCmd.CommandText = SQL        aCmd.CommandType = CommandType.Text
        Dim aDataReader As SqlDataReader
        Try
            MyConnection.Open()
            aDataReader = aCmd.ExecuteReader
            While aDataReader.Read()
                AllCarInfo.Add(New CarInfo(aDataReader))            End While
        Catch ex As Exception            Throw ex        Finally
            aDataReader.Close()
            MyConnection.Close()        End Try
        Return AllCarInfo    End Function
End Class
 
The bit I dont quite understand is the following snippet from above
 
 
Dim aCmd As SqlCommand        aCmd = MyConnection.CreateCommand
        aCmd.CommandText = SQL        aCmd.CommandType = CommandType.Text
        Dim aDataReader As SqlDataReader
        Try
            MyConnection.Open()
            aDataReader = aCmd.ExecuteReader
            While aDataReader.Read()
                AllCarInfo.Add(New CarInfo(aDataReader))            End While
        Catch ex As Exception            Throw ex        Finally
 
Can anyone explain this in real ABC style step by step please, just so I can start to understand this, ( I am quite new to this)
many thanks,
Anteater

View 8 Replies View Related

Explanation Of Columns_updated()

Jun 1, 2004

the statement
if ((columns_updated() & 2 + 4 + 8)) > 0) is supposed to tell me if the 2nd, 3rd or 5th columns were updated. My question is, what desginates the column 2,3,5, when 2,4,8 are in the statement

View 1 Replies View Related

Need Some Explanation On Transactions

Apr 28, 2005

I am having some problems with transactions, although it seems that the problem exists within the vb code making the db call it may be that sql is the source of the problem.

1.
There is a number of stored procs that contain transactions most of which are inserts followed by a select statement to retrieve the most recently added ID. So to start with is a select the best way or is the @@Identity. I have read the @@Identity is global, so for a external server that is running a number of databases I stayed away from it. Did I take the right actions or is there a better way?

2.
Is having sql transactions within a call from vb.net ok? I know that the sqlClient class doesn't support nested transactions, but does that include transactions within sql?

3.
if a stored proc is called, from vb contained in a sqlClient transaction, are ALL the calls from within the sproc able to be rolled back?

If there is a reliable way to obtain the Identity without containing it in a transaction, and having the internal sql transactions in the problem, then I am home free, so I am hoping this is the case.

Thanks for any help

View 11 Replies View Related

Simple Explanation Please

Jul 23, 2005

PREDICATESUsed as a clause.A. What does PREDICATES mean?B. What does it mean when used in a where clause?I checked BOL (Glossary) but get no explanation there.ThanksJay

View 5 Replies View Related

SQL Queries - Explanation Of Od

Oct 31, 2007

I am wondering what are od1 and od2 used for in SQL Queries? Are they used for joining... can anyone explain their significance in the queries below... (especially the commands in red)


USE Northwind
SELECT OrderID, CustomerID
FROM Orders o
WHERE 20 < (SELECT Quantity
FROM [Order Details] od
WHERE o.OrderID = od.OrderID AND od.ProductID = 23)USE Northwind
SELECT DISTINCT ProductName, Quantity
FROM [Order Details] od1 JOIN Products p
ON od1.ProductID = p.ProductID
WHERE Quantity = (SELECT MAX(Quantity)
FROM [Order Details] od2
WHERE od1.ProductID = od2.ProductID)

View 3 Replies View Related

Considerations... Backing Up IIS 6 Web Files And SQL Server 2005 Express Database

Mar 1, 2006

Anyone know of a good "free" way to back up web files and SQL Server 2005 Express Database?
I was able to use Windows Server 2003 Backup utility to back up the folder where the Databases were stored, as well as the web files, with no errors.
But I have heard a lot of discussion that you can't just simply backup SQL Server data files?
I'm wondering how sound the backup I've created is...
Any suggestions?

View 1 Replies View Related

SQL Server 2012 :: How To Fetch PDF Files From A Folder And Saving It In The Database

Jul 23, 2013

I have a small project to be done in which I need to fetch the pdf file from a my system and save it in database and also fetch the name of it and save it in the database.

View 9 Replies View Related

SQL Server Admin 2014 :: Attaching Received Files To New Database

Jun 25, 2014

I am actually very new to SQL databases, I have received an .MDF and .LDF for a database of size 50 GB...

I need to create or attach these files to a new database and extract some columns then convert them to .text or .csv...

View 5 Replies View Related

Query To Find Nth Value Explanation

Jun 20, 2007

can anyone explain how this works:

USE NORTHWIND

GO

SELECT freight
FROM orders E1
WHERE (N =
(SELECT COUNT(DISTINCT (E2.freight))
FROM orders E2
WHERE E2.freight >= E1.freight))

replace N by a number. To find that Nth value from the table.

Ashley Rhodes

View 2 Replies View Related

Basic Syntax Explanation

Jul 23, 2005

In T sql for sql server, what is the technical difference between thecomparisons "is" and "="for example:set @test = nullprint @test is null -> trueprint @test = null -> false

View 3 Replies View Related

Very Chalanging Question - Explanation

May 31, 2006

Ok, here is a asample table representing the problem more clearlyA | B | C | D-----------------a1 b1 c1 d1a1 b2 c2 d2a3 b3 c1 d3a4 b4 c4 d3a5 b5 c5 d5a6 b6 c6 d3Tha duplications are:row 1+2 in param Arow 1+3 in param Crow 3+4+6 in param Donly row 5 is unique in all parameters.conclusion: row 1+2+3+4+6 are the same usergoal: to find all duplicated rows & to delete them all accept oneinstance to leave.Note:Finding that row 1similar to 2 in A & deleting it will loose databecause we won't know that row 1 is ALSO similar to 3 on C & later onfinding that 3 is similar to 4 & 6 on D & so onThe simple time consuming (about 2 weaks) query to acomplish the taskis:SELECT count(*),A.B,C,DFROM tblGROUP BY A,B,C,DHAVING count(*)>1I THANK YOU ALL

View 3 Replies View Related

Linked Server To Text Files: Is Possible To Detect Changes Made To Those Files? (SQL Server 2005)

Sep 3, 2007

Hi gurus,

I've created a linked server (and set up the corresponding schema.ini file) in order to perform bulk-inserts from some CSV text files into SQL tables (from my standpoint the text files are just for reading purposes). The linked server works fine (I can select the data in the files without a problem).

Now the question: is possible to automatically detect when one or more of those files change in order to start the import process automatically? Something like having a trigger created on the CSV files Or there's no easy way to do that so I have, to say something, to create a Job that periodically checks if the files have changed programatically (say, recording each file's timestamp everytime is imported and comparing the recorded value with the current one, or whatever)?


Thanks a lot in advance!

View 1 Replies View Related

SQL Server Admin 2014 :: Database File Placement And Number Of Files

Feb 2, 2015

Database File Placement Layout? We are planning to implement a new SQL Server 2014 OLTP Database with a 1 TB Data file and 1 TB Log File. I am looking at the possible layout of the database files and trying to determine the best possible configuration. My knowledge/research tells me that items which need separate storage due to constant simultaneous access are:

Data files – should go on the fastest reading storage.
Log files – should go on the fastest writing storage.
TempDb – involves a lot of writing at the same time the data files are being read.
Indexes - (including full text indexes) - involves a lot of writing at the same time the data files are being read.

Also, are there any benefit to having multiple OLTP Database Log files? Because SQL Server writes to the log file sequentially, I do not see any advantages to having multiple database log files. In a SQL Server 2012 Class I took last summer, under “Determining File Placement and Number of Files”, it states “Use a single log file in most situations as log files are written sequentially.”

View 9 Replies View Related

SQL Server 2008 :: Copy Multiple CSV Files Into Database Using Stored Procedure?

Feb 9, 2015

I need to import multiple csv files and load into table and everytime new database has to be created .

I was able to create new databases using stored proc

How do i do a bulk insert for all the files at once to insert into tables .

i want to load all the files at once .

View 6 Replies View Related

SQL Server Admin 2014 :: Inconsistent Data In Database And Master Files?

Apr 21, 2015

USE <database>

select * from sys.database_files

and

select * from sys.master_files where database_id= <db id>

give me different size of memory optimized file in <database>

Microsoft SQL Server 2014 - 12.0.2456.0 (X64)

View 1 Replies View Related

SQL Server 2008 :: Use Folder Name As Database From Batch File To Execute Files

Jul 17, 2015

I've been struggling with this issue,

1) Test--FolderName (This Test folder name should use as a database name for below sub folders)

a)Create--Sub Foldername
i)create.sql
b)Alter---Sub FolderName
i)Alter.sql
c)Insert---Sub FolderName
i)Insert.sql

[Code] .....

The scripts need to be run in order. So script one needs to run first folder in that sub folders after that next second folders etc..

Is there a way to create a bat file that automatically runs all these scripts, in order against, the databases they need to?

The databases that they need to run against have the name of the database at the beginning of the name of the folder.

View 0 Replies View Related

Instr (vbscript) Function Explanation ???

Jan 15, 2001

I went to Microsoft to find some info about the function Instr. I need to
perform a search with a string similar to their example I found below. Can
anyone explain to me Microsoft's example?? I am little confused by the
parameters used and the explanation it gives back to me??

Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' String to search in.
SearchChar = "P" ' Search for "P".
MyPos = Instr(4, SearchString, SearchChar, 1) ' A textual comparison
starting at position 4. Returns 6.
MyPos = Instr(1, SearchString, SearchChar, 0) ' A binary comparison
starting at position 1. Returns 9.
MyPos = Instr(SearchString, SearchChar) ' Comparison is binary by default
(last argument is omitted). Returns 9.
MyPos = Instr(1, SearchString, "W") ' A binary comparison starting at
position 1. Returns 0 ("W" is not found).

My problem is this:

I need to scan within SearchString for blanks/spaces characters. When I
find one, then place the values to the left and right of it in seperate
columns. For example, I would need to scan 'John Smith A' and then place
'John' in FirstName column, 'Smith' in LastName column, and 'A' in MidName
column.

I think this is how my code would read, but I am confused on how to place
the results into my table to the correct columns?

my search string would be SearchString = 'John Smith A'
my SearchChar would be SearchChar = ' ' (note I am searching for a
space/blank character)

So would then my code be like:

Dim SearchString, SearchChar, MyPos
SearchString = 'John Smith A'
SearchChar = ' '
MyPos = Instr(1, SearchString, SearchChar, 0)

How do I get whatever is returned from the Instr function to a column in a
table??

Any help would be great.

Rey

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved