February 25, 2013 at 3:04 am
Is it advisable to store the entire .doc/.xml/.csv file of large size into the db, or should I only save the path in the db with the files in a physical server ?
February 25, 2013 at 5:13 am
Hi)
It's advisable to store doc/csv/other types of files in filestream columns.
A typical question is: Why store binary data in a database?
A very common solution is to store the actual data into the file system and only define a path or URL to the database pointing to the actual file. However, there are a few issues that should be considered.
1) Backups: When data is stored apart from the database, it's not backed up by SQL Server. If these files need to be backed up, a separate mechanism must be created. This also means that these two backups are 'never' in-sync. For example, a file may be deleted when a SQL Server backup is made but the actual file is not backed up yet. When the data is stored to the database, the backup is consistent.
Transactionality: When the file is stored outside the database, the file creation, modification, and deletion isn't part of the transaction which occurs against the database. This means that neither commit nor rollback actually guarantees that the result is consistent. When the data is stored inside the database, it's part of the transaction.
February 25, 2013 at 7:45 am
SQL SERVER 2012 File Table Solution
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply