SQL Server – Partial Database Restores – Benefits & Impact

Lineage

In our last couple of posts we focused our lenses on partial database restores.

Those posts are here:

  1. SQL Server – Database Restore – “Defunct State”
    here
  2. SQL Server – Database Restore – Skipping File Groups
    here

 

Current

In this post we will look a bit more at the benefits and costs of restoring just a portion of database.

 

Reviews

GUI

Database

File Groups

databaseProperties-FileGroups (cropped-up)

 

Files

databaseProperties-Files

 

 

Tables

dbo.ten95B

tableCount-Table1

 

Storage
  1. Table Name :- dbo.ten95B
  2. File Group :- PRIMARY
  3. Text filegroup :- fgLOB
  4. Data Space
    • 1370 MB
    • or 1.4 GB
  5. Row Count :- 4800

 

Query

Database

Database – Files

Let us query the sys.database_files system table to get the name, type, state, and size of the individual files that are in our current database.

SQL

select 
		  tblSDF.[file_id]
		, tblSDF.[name]
		, tblSDF.[physical_name]
		, tblSDF.[type_desc]
		, tblSDF.[state_desc]
		, tblSDF.size
--		, tblSDF.*
from   sys.database_files tblSDF

Image

Database – Show File Stats

Let us issue “DBCC ShowFileStats” to gather information about our database files.

SQL
dbcc showfilestats

Image

Table

Let us try to read data from table

 

Query Table for Data – All Columns

dbo.ten95C
SQL

select top (1000) *
from [dbo].[ten95C]

Image
filegroupThatCanNotBeAccessed

 

Textual

Large object (LOB) data for table “dbo.ten95C” resides on an offline filegroup (“fgLOB”) that cannot be accessed

 

Query Table for Data – Specific Columns

On the other hand, we are still able to query for specific columns.

When we restrict our column set to those filegroups that were included in our restore, things are good.

dbo.ten95C
SQL

select top (10)
 
   tblT.[ten95C_id]
 , tblT.[ten95C_view_cnt]
 , tblT.[ten95C_view_last]

from [dbo].[ten95C] tblT

Image

Summary

From a cursory look, Microsoft’s design and implementation of Partial database restore is well thought out and solid.

Its preserves all the niceties of having access to the original database design ( database groups and files), metadata for all concerns.

And, rightfully sacrifices storage of the actual data and thus we gain the benefits of not having to provide and maintain storage for uneeded data.

SQL Server – Database Restore – Skipping File Groups

Background

In our very last post we touched on stumbling on an interesting error message courtesy of attempting to do a partial database restore.

The post is here.

 

Database Restore

Full Database Restore

Sample


RESTORE DATABASE [DBLABIMWithInMemoryFiles_R]
 FROM DISK  = 'Z:\Microsoft\SQLServer\Backup\\DBLABIMWithInMemoryFiles.bak'
 WITH  REPLACE,  STATS = 1, 
	  MOVE 'DBLABIM' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIMWithInMemoryFiles_R_Base_01.mdf'
	 , MOVE 'DBLABIM_Data_01' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIMWithInMemoryFiles_R_Data_01.ndf'
	 , MOVE 'DBLABIM_INDEX_01' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIMWithInMemoryFiles_R_INDEX_01.ndf'
	 , MOVE 'DBLABIM_log' TO 'Z:\Microsoft\SQLServer\Logfiles\DBLABIMWithInMemoryFiles_R_log.ldf'
	 , MOVE 'DBLABIM_FILESTREAM_01' TO 'Z:\Microsoft\SQLServer\FileStream\DBLABIMWithInMemoryFiles_R_FILESTREAM_01'
	 , MOVE 'DBLABIM_InMemory_01' TO 'Z:\Microsoft\SQLServer\FileStream\DBLABIM_InMemory_01'

Partial Database Restore

Sample


RESTORE DATABASE [DBLABIMWithInMemoryFiles_R]
	  filegroup  = 'PRIMARY'
	 , filegroup  = 'DATA'
	 , filegroup  = 'FG_FS_01'
	 , filegroup  = 'FG_MOD_01'

 FROM DISK  = 'Z:\Microsoft\SQLServer\Backup\\DBLABIMWithInMemoryFiles.bak'
 WITH  REPLACE,  STATS = 1, 
	  MOVE 'DBLABIM' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIMWithInMemoryFiles_R_Base_01.mdf'
	 , MOVE 'DBLABIM_Data_01' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIMWithInMemoryFiles_R_Data_01.ndf'
	 , MOVE 'DBLABIM_log' TO 'Z:\Microsoft\SQLServer\Logfiles\DBLABIMWithInMemoryFiles_R_log.ldf'
	 , MOVE 'DBLABIM_FILESTREAM_01' TO 'Z:\Microsoft\SQLServer\FileStream\DBLABIMWithInMemoryFiles_R_FILESTREAM_01'
	 , MOVE 'DBLABIM_InMemory_01' TO 'Z:\Microsoft\SQLServer\FileStream\DBLABIM_InMemory_01'
	 , PARTIAL 

 

Reference

  1. Developer Network
    • Database Features > In-Memory OLTP (In-Memory Optimization)  > Backing Up a Database with Memory-Optimized Tables > Piecemeal Restore of Databases With Memory-Optimized Tables
      Link

 

Summary

When scripting a partial database restore, please do the following:

  1. Explicitly list the file groups that you are targeting
    • Where does this clause go
      • Right underneath the name of the target database
      • And, before the with clause
  2. Add the partial clause

 

SQL Server – Database Restore – “Defunct State”

Background

Courtesy of Microsoft, here is another Why take oneself too seriously moment.

Database Layout

Database FileGroups

Database Files

Scripting

Here is a little code snippet from a database restore script that we are developing.

Intent

  1. To potentially conserve storage we chose to
    • Skip restore of certain filegroups
      • In our sample below, we skipped restoring the INDEX Filegroup

SQL


RESTORE DATABASE [DBLABIM_R]
FROM DISK  = 'Z:\Microsoft\SQLServer\Backup\\DBLABIM.bak'
WITH  REPLACE,  STATS = 1,
	 MOVE 'DBLABIM' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIM_R.mdf'
       , MOVE 'DBLABIM_Data_01' TO 'Z:\Microsoft\SQLServer\Datafiles\DBLABIM_R_Data_01.ndf'
       , MOVE 'DBLABIM_log' TO 'Z:\Microsoft\SQLServer\Logfiles\DBLABIM_R_log.ldf'
       , MOVE 'DBLABIM_FILESTREAM_01' TO 'Z:\Microsoft\SQLServer\FileStream\DBLABIM_R_FILESTREAM_01'
       , PARTIAL 

Error Message

Image

Textual


21 percent processed.
42 percent processed.
64 percent processed.
85 percent processed.
100 percent processed.
Processed 328 pages for database 'DBLABIM_R', file 'DBLABIM' on file 1.
Processed 4 pages for database 'DBLABIM_R', file 'DBLABIM_log' on file 1.
Msg 3127, Level 16, State 1, Line 1
The file 'DBLABIM_Data_01' of restored database 'DBLABIM_R' is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.
Msg 3127, Level 16, State 1, Line 1
The file 'DBLABIM_INDEX_01' of restored database 'DBLABIM_R' is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.
Msg 3127, Level 16, State 1, Line 1
The file 'DBLABIM_FILESTREAM_01' of restored database 'DBLABIM_R' is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.
RESTORE DATABASE ... FILE=<name> successfully processed 332 pages in 0.041 seconds (63.155 MB/sec).

Catch Phrase

  1. Msg 3127, Level 16, State 1, Line 1
    The file ‘DBLABIM_Data_01’ of restored database ‘DBLABIM_R’ is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.
  2. Msg 3127, Level 16, State 1, Line 1
    The file ‘DBLABIM_INDEX_01’ of restored database ‘DBLABIM_R’ is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.
  3. Msg 3127, Level 16, State 1, Line 1
    The file ‘DBLABIM_FILESTREAM_01’ of restored database ‘DBLABIM_R’ is being left in the defunct state because the database is using the simple recovery model and the file is marked for read-write access. Therefore, only read-only files can be recovered by piecemeal restore.

No Error Message

We changed the originating database recovery state from SIMPLE to FULL, and we are good.

Image

Textual


21 percent processed.
43 percent processed.
64 percent processed.
86 percent processed.
100 percent processed.
Processed 328 pages for database 'DBLABIM_R', file 'DBLABIM' on file 1.
Processed 2 pages for database 'DBLABIM_R', file 'DBLABIM_log' on file 1.
RESTORE DATABASE ... FILE=<name> successfully processed 330 pages in 0.035 seconds (73.451 MB/sec).

Summary

Again, there is not too much to this.

It is Saint Patrick’s day and I got Guinnesses in the cooler.

Trying to understand and sort out Microsoft error messages is good for Mondays, as Sunday is my fun day.

And, that is only two days away.

SQL Server – Database Backup Compression

Introduction

Yearns ago, we deployed Quest LiteSpeed to get backup compression.

We had to use 3rd party software to get backup compression.

But, that was SQL Server v2005.

 

Built-In

Beginning with v2008 backup compression has been built in.

 

Metadata

msdb.dbo.backupset

Wanted to get a feeling as to savings, and here is what the code looks like.

 

code


declare @numberofDays int
declare @dateCurrent datetime
declare @dateGoBack datetime

set @dateCurrent = getdate()
set @numberofDays = 7
set @dateGoBack = dateadd(day, @numberofDays *-1, @dateCurrent)
 

select top 3000
		 
		  tblBS.[database_name]

		, [startTime]
			= convert(varchar(30), tblBS.[backup_start_date], 100)

		, [finishTime]
			= convert(varchar(30), tblBS.[backup_finish_date], 100)

		, [durationInMins]
			= datediff(minute
						,tblBS.[backup_start_date]
						, tblBS.[backup_finish_date]
					  ) 

		, [backupSizeInMB]
			 = ( tblBS.[backup_size] / ( 1024 * 1024 ) )

		, [compressBackupSizeInMB] 
			= ( tblBS.[compressed_backup_size] / ( 1024 * 1024 ) )

		, [ratio]
			= cast
				(
					( tblBS.[compressed_backup_size]
						/ tblBS.[backup_size]
                    ) 
					as decimal(10, 2)
				)

		, tblBS.[type]

		, tblBS.[flags]

		, [hasBackupChecksumUsingSpecificColumn]
			= case ( tblBS.[has_backup_checksums])
					when 0 then 'No'
					else 'Yes'
			  end
	
		, [hasBackupChecksumUsingColumnFlags]
			= case ( tblBS.[flags] & (2 ^16) ) 
					when 16 then 'Yes'
					else 'No'
			  end		
		--, tblBS.*

from   msdb.[dbo].backupset tblBS

where  tblBS.[type] in ( 'D' )

and    tblBS.[backup_start_date] >= @dateGoBack 

and     tblBS.[database_name] in ( 'xmaster', 'ppsivr')

order by
		  tblBS.[database_name] asc
		, tblBS.[backup_set_id] asc

 

 

Output

backupupset-20161210-1241am

 

Explanation

  1. With MS SQL Server
    • Default is set to Backup Compression
      • With backup compression our file size is 25%
    • Requested Backup Checksum
      • Getting backup checksum
  2. With 3rd party software
    • No space savings
    • No Checksum validation
  3. Because we are testing the 3rd party tool, we are logging two full backups each day
    • At 6:30 PM, SQL Server backup
    • At 8 PM, the 3rd party backup
  4. Time Taken
    • Backing up our 8 GB database is taken about 3 minutes with compression
    • Without compression it is taking 1 minute

 

msdb.dbo.backupset – Column – Flags

One of the more interesting columns in the msdb.dbo.backupset table is the Flags column.

Though it is now deprecated, it holds some useful nuggets.

BTW, the information it contains is now exposed in individual bit columns.

Nevertheless, here is what each bit represents

 Flag Bits Bit
 has_bulk_logged_data 0
 is_snapshot  1
 is_readonly  2
 is_single_user  3
 has_backup_checksums  4
 is_damaged
 begins_log_chain
 has_incomplete_metadata
 is_force_offline
 is_copy_only

 

 

Using bit arithmetic, has shown in the SQL code above, one is able to decipher the Flags column.

 

Checksum

Configuration

Trace Flag

  1. 3023
    • If you are using backup applications or utilities that do not expose these options, you can enable the CHECKSUM option by using Trace Flag 3023 on the instance of Microsoft SQL Server.
      If Trace Flag 3023 is turned on, the CHECKSUM option is automatically enabled for the BACKUP command.
      If you do this, you do not have to rewrite all the existing backup scripts.

Query


dbcc tracestatus with no_infomsgs

Instance

Starting with v2014, MSFT added an option through  sp_configure that can be used to setup the default checksum setting.

The option name is “backup checksum default”.

Query


exec sp_configure 'show advanced options', 1
reconfigure with override


exec sp_configure 'backup checksum default'

 

Instrumentation

To measure the impact of various backup offerings ( native versus third party) and options, we can use use the metrics listed below:

Perfmon

Courtesy of MSFT

  1. Windows I/O performance counters, such as the physical-disk counters
  2. The Device Throughput Bytes/sec counter of the SQLServer:Backup Device object
  3. The Backup/Restore Throughput/sec counter of the SQLServer:Databases object

 

 

References

Metadata

  1. Transact-SQL Reference (Database Engine) System Tables (Transact-SQL)  Backup and Restore Tables (Transact-SQL) backupset
    Link

 

MSDN

  1. Database Engine Features and Tasks>  Database Features  > BackUp and Restore of SQL Server Databases > Backup Compression
    Link

 

MSFT – Support

  1. How to enable the CHECKSUM option if backup utilities do not expose the option
    Link

 

Bloggers

  1. Erin Stellato
    • Trending Database Growth From Backups
      Link
  2. Xu James
    • trace flag for backup and restore operation
      Link
  3. Scott Caldwell, Remote DBA Experts
    • UNDOCUMENTED TRACE FLAGS: INSIDE THE RESTORE PROCESS
      Link
  4. Jugal Shah
    • T-SQL Script to Check the Native Compressed backup file size and Backup Compression Ratio
      Link

Ola Hallengren – Database Maintenance Scripts – Transaction Log Backup not occuring

Background

Made the change discussed here.

Again, the change was to temporary alter our Recovery Mode to SIMPLE and back. In between, shrunk the transaction log files.

 

Issue

Ran the Ola Hallengren’s transaction Log backup step, but nothing is being backed up.

BTW, the Scripts are available here.

 

Trouble Shooting

Let us review the scripts and see where we are failing.

Stored Procedure – dbo.DatabaseBackup

sys.database_recovery_status – Get last_log_backup_lsn

Check sys.database_recovery_status and get last_log_backup_lsn


    IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
    BEGIN
      SELECT @CurrentLogLSN = last_log_backup_lsn
      FROM sys.database_recovery_status
      WHERE database_id = @CurrentDatabaseID
    END

Backup Conditions

skipwhenlogbackupandrecoveryissimpleorcurrentloglsn

Explanation

  1. Skip when LogBackup
    • Recovery Is Simple
    • Or CurrentLogLSN is null

 

sys.database_recovery_status

Script


SELECT 
		  tblSDRS.[database_id] 
		, [databaseName] = db_name(tblSDRS.[database_id])
		, tblSDRS.last_log_backup_lsn

FROM sys.database_recovery_status tblSDRS


Output

sys-database_recovery_status

 

Database Backup – Directly

If we try to backup the database directly by issuing our own “backup log <database-name>” statement. i.e.

Code


BACKUP LOG [eiadev] 
TO  DISK = N'Z:\Backups\eiadev_20161027_1208PM.bak' WITH NOFORMAT, NOINIT
,  NAME = N'enr_Log Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

Output

GUI

nocurrentbackup

Textual

Msg 4214, Level 16, State 1, Line 7
BACKUP LOG cannot be performed because there is no current database backup.
Msg 3013, Level 16, State 1, Line 7
BACKUP LOG is terminating abnormally.

Remediation

Take full backups right away or wait till our next scheduled full backup.

Once that occurs, our transaction backups will run to successful completion.

Summary

So basically because we changed the Recovery Mode from FULL to SIMPLE ( and now back to FULL), we can not issue a transaction log backup statement until we take a FULL Backup.

To avoid that error, Olla’s script proactively checks the sys.database_recovery_status dmv.

 

SQL Server – Backup to Network Storage – Error – The system cannot find the file specified ( 18210 )

Background

Taking a backup to get our LogShipping coupling back operational, but the backup is failing.

The error message is posted below.

Error Message

 

Event ID Message
18210 BackupMedium::ReportIoError: write failure on backup device ‘\\networkstorage\SQLBackups\MSSQL\HRDBProd\Full\hrdb.bak’. Operating system error 2(The system cannot find the file specified.).

 

Possible Remedy

There are a couple of areas that we will review:

  1. Adjust Network Session Timeout setting
  2. Disable and Stop “SQL Server VSS Service
  3. If on MS Windows 2003, apply KB 843515

Settings

  1. Increase Network Session Timeout
    • Branch :- HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
    • Item :- SessTimeOut
    • Default :- 15
    • Range :- 10–65,535 ( seconds )
    • What to do: Increase to 360
      • This will change the timeout to 6 minutes

It does not appear that the System needs to be restarted for this change to be effectual.

SQL Server VSS Service

Disable SQL Server VSS Service

Services

Hotfix

 

Microsoft

MS Windows 2003

  1. KB 843515
    • Your network connection may be reset when you try to perform a file operation on a remote Windows Server 2003-based computer
      https://support.microsoft.com/en-us/kb/843515

      • This patch alleviates a problem where concurrent SMB Sessions criss cross each other

 

Restore

After making the changes described above our backups are now running successfully.

But, still not out of the woods.

As we started the restore (with stats=1) noticed that the beacon is a bit slow.

Let us see what the metrics looks like…

DB Restore Profiling

Here we query dynamic management views  (dmvs)  to see expected timeline.

Code

No code writing here, as SQLDenis already has code.

SELECT
    d.PERCENT_COMPLETE AS [%Complete],
    d.TOTAL_ELAPSED_TIME/60000 AS ElapsedTimeMin,
    d.ESTIMATED_COMPLETION_TIME/60000   AS TimeRemainingMin,
    d.TOTAL_ELAPSED_TIME*0.00000024 AS ElapsedTimeHours,
    d.ESTIMATED_COMPLETION_TIME*0.00000024  AS TimeRemainingHours,
    s.text AS Command
FROM    sys.dm_exec_requests d
CROSS APPLY sys.dm_exec_sql_text(d.sql_handle)as s
WHERE  d.COMMAND LIKE 'RESTORE DATABASE%'
ORDER   BY 2 desc, 3 DESC

 

Output

RequestsTime

 

Explanation

  1. We already used up 2 hours
  2. And, have 12 more hours to go

 

Review Metrics

Resource Monitor

If you are using MS Windows 2008 and higher, please, please use “Resource Monitor”.

We can quickly see our Disk IO Stats.

ResourceMonitor-Disk

Quick Explanation:

  1. In the example above, we see that the System process is giving us about 10MB/sec for reads.  The data is being read from our backup (.bak) file
  2. The data is being written to our data file at about 10 MB/sec to our datafile (.mdf)

 

Resource Monitor

Performance Monitor

PerformanceMonitor.201601050457PM

Metric:

  1. SQLServer:BackupDevice
    • Device Throughput Bytes/sec at about 11 MB/sec
  2. PhysicalDisk
    • %Disk Read Time at 1.711
    • %Disk Time at 101.563
    • %Disk Write Time at 99.853
    • Avg. Disk Write Queue Length at 4.998
  3. Network Interface
    • Bytes Received/sec of 700 KB/sec
    • Bytes Sent/sec  of 300 KB/sec
    • Bytes Total/sec of 1MB/sec

Explanation

  1. Our backup device throughput matches our Resource Monitor File I/O Stats
  2. Our Network Interface is very tiny
  3. The big numbers is with Disk Utilization
    • Disk Read percentile is only at 1.711
    • Disk Time is at 101.563%
    • And, Disk Write is at 99.853%
    • Confirms that our burden is Disk Writes

 

Restore Stats

RestoreDBStats

Explanation
  1. The complete restore took 17 hours
  2. Thankfully the restore engine gives us a breakdown of pages restored at the filegroup level

 

Fess up

The reason why I wanted to review the backup file stats and compare with network stats is that I stupidly used a UNC path to reference the backup file, while infact the backup file is stored locally on our Log Shipping secondary.

Thankfully, MS Windows is covering for us, and not treating the backup file as a Network resource.

 

Commentary

We see we have problems with Disk I/O throughput.

Is the problem Disk RAID Level?

 

References

Hotfix

  1. Board index ‹ Discontinued and Previous Versions ‹ SQL Backup Previous Versions < Write failure on backup device
    https://forums.red-gate.com/viewtopic.php?p=11826

 

Q/A

  1. Home » SQL Server 7,2000 » Backups » Problems Backing up SQL 2000 over the network…
    http://www.sqlservercentral.com/Forums/Topic532254-24-1.aspx
  2. SBS – 2008 – VSS Backup
    http://serverfault.com/questions/294086/sbs-2008-vss-backup

 

Support

  1. Error message when you run the “vssadmin list writers” command on a Windows Server 2003-based computer: “Error: 0x8000FFFF”
    https://support.microsoft.com/en-us/kb/940184


Microsoft – System Monitor

  1. SQL Server: Backup Device Object
    https://technet.microsoft.com/en-us/library/aa905131(v=sql.80).aspx

 

Blogs

  1. Performance Tuning Tips for SQL Server Backup and Restore
    http://www.sql-server-performance.com/2007/backup-restore-tuning/

 

Microsoft – SQLServer – Log File Utilization

Microsoft – SQLServer – Log File Utilization

It appears that Microsoft SQL Server does not not have a lot of instrumentation around Database Log File Utilization.

There are a couple of basic premises:

  •  They are written to serially.  One can not line them up and assume that the DB Engine will write into each allocated file in parallel

Having said that, there are a couple of steps that are helpful in determine which log files are active.

Take a log backup:

Syntax

Backup Log  to disk = 'Nul';

Issuing this step will reveal which log files are being processed

Processed 0 pages for database '<db>', file 'filename' on file 1.

Processed 0 pages for database '<db>', file 'filename' on file 1.

Processed 0 pages for database '<db>', file 'filename' on file 1. 

Processed 0 pages for database '<db>', file 'filename' on file 1. 

Processed 35001 pages for database '<db>', file 'filename' on file 1. 

Processed 0 pages for database '<db>', file 'filename' on file 1. 

BACKUP LOG successfully processed ### pages in seconds 
(IIII.III MB /sec)

In the example above, the database is in full recovery mode and we simply backing up to the NUL device.

In essence, basic house-keeping. Though, we are taking a transaction log backup, we are not keeping the accompanying backup files.

Based on the accompanying results of the backup, only the fifth log file is actually active and contains log activity data that is eligible for pruning.

A more passive approach for determining usage data of Log files is to use the fileproperty  function.

The FileProperty function accepts two parameters; the symbolic file name and the property type one is inquiring about.

In our case we will be using the SpaceUsed property.  The doc says that this property will return “the amount of space used by the file”.

use <database>;

select
      db_name(DB_ID()) as databaseName
    , name
    , physical_name
    , (size / 128) as 'storageAlloc (MB)'
    , ((fileproperty(name, 'spaceUsed')) / 128)
           as 'storageInuse (MB)'
     , ( size - (FILEPROPERTY(name, 'spaceUsed'))) / 128 
            as 'storageAvail (MB)'

    from  sys.database_files tblDatabaseFile

    where  

           (

                (tblDatabaseFile.type = 1)

           )

 

References: