This action might not be possible to undo. Are you sure you want to continue?
1 Prepared by : Ramesh
The SQL Server system tables are broken into three parts: those tables that are only in the master database, those that are located in each database independently, and those that are only in the other system tables, such as the msdb database. Most of these tables are unsupported by Microsoft Product Support for direct use. It is recommended that you use these tables for reporting purposes only and not modify them directly. Keep in mind that these tables are likely to change between releases or even service packs of SQL Server. If you modify them, make sure that you back up the appropriate database. Before you can modify any system table, you must first enable updates to the system catalog by using the sp_configure stored procedure, as shown here:
EXEC sp_configure 'allow updates', '1' RECONFIGURE WITH OVERRIDE
Caution Referential integrity for system tables is handled by the tools that use it (such as
Enterprise Manager). If you make a modification to system tables, make sure the value you're changing is a valid one.
Tables in the Master Database Only
There are a number of tables that can be found in the master database only. These tables hold instance-level information like logins and server names. sysaltfiles The sysaltfiles table contains a list of files on the server. Column fileid groupid size maxsize Data Type smallint smallint int int Purpose Unique identification for each file in the database. Identification number for the file group the database belongs to. The size of the file in 8K pages. Maximum size of the database in 8K pages. A value of -1 is default and specifies that the database will grow until it fills the hard drive. A value of 0 specifies a fixed database size. This can represent either the number of pages or percentage to grow the database. This is dependent on the status flag. The status of the file used internally in SQL Server. For example, a status of 0x100000 sets the file to grow automatically to a given percentage based on the growth column. Internal reserved field.
2 Prepared by : Ramesh
Column dbid name
Data Type smallint
Purpose Database ID that the file belongs to. This can be related to the dbid column in the sysdatabases table.
nchar(128) The file's logical name.
filename nchar(260) Full path and filename of the file. syscacheobjects The syscacheobjects table shows you how SQL Server is using its cache. Column bucketid Data Type int Purpose The bucket ID where the object is cached.
cacheobjtype nvarchar(34) Type of cached object. Included types: Compiled Plan Executable Plan Parse Tree Cursor Parse Tree Extended Stored Procedure objtype nvarchar(16) More detailed type of object. For example, this would display whether the cached object is an ad hoc query or prepared query. Valid types include: Stored procedure Prepared statement Ad hoc query ReplProc Trigger View Default User table System table Check Rule objid int Used to find the object in cache. For a prepared query such as a stored procedure, this would relate to the objid in the sysobjects table. If this is an ad hoc item in cache, this would represent an internally generated number. Database ID the cached item belongs to. This can be related to the
3 Prepared by : Ramesh
Column uid refcounts usecounts pagesused setopts
Data Type smallint int int int int
Purpose dbid column in the sysdatabases table. If this value is -2, the cached object is from a batch not corresponding to a user. Otherwise, this represents a user ID. Number of other objects that reference the cached object. Number of times the cached object has been used since it was created. Amount of memory space in 8K pages used by the cached object. Any time a user changes options, such as ANSI_PADDING using the SET command, it is stored here. Language ID for the cached object's creator. This relates to the langid in the syslanguages table. Length of the procedure name or batch in cache. Used to distinguish when first 128 bytes are the same.
langid sqlbytes Sql
nvarchar(256) Stored procedure name or the first 128 bytes of the ad hoc query submitted.
syscharsets The syscharsets table designates which character sets and sort orders are available to SQL Server. Column type id csid name Data Type smallint tinyint tinyint sysname Purpose Defines which type of entry the row is. A value of 1001 represents a character set and 2001 represents a sort order. Unique identifier for the character set or sort order. If the type value is 2001 (sort order), this value is used to designate the character set the sort order is built on. Represents the name of the character set or sort order. Used internally to define the sort order or character set.
description nvarchar(255) Represents the optional long name for the sort order or character set. definition image sysconfigures The sysconfigures table contains an entry for each configuration option set in SQL Server. These options are read by the sp_configure stored procedure. Once you change the configuration of the server, this table is adjusted and not moved to the syscurconfigs table until the server is restarted or the RECONFIGURE command run.
4 Prepared by : Ramesh
Column value config comment status
Data Type int smallint smallint
Purpose The value that the server setting is configured for when the server is restarted or when the RECONFIGURE command is issued. Variable number for the configuration option. Specifies whether the setting is static or dynamic. Possible settings are 0 = Static 1 = Dynamic 2 = Advanced 3 = Dynamic and advanced
nvarchar(255) The name of the option.
syscurconfigs The syscurconfigs table is identical to the sysconfigures table. The only difference is that the syscurconfigs table shows what settings the server is running currently, while the sysconfigures table shows what the server will be configured for once the server is restarted or RECONFIGURE issued. Whether you must restart or issue a RECONFIGURE command is based on the status flag. sysdatabases The sysdatabases table contains a list of the databases installed on your SQL Server. Column name dbid sid mode status status2 crdate reserved cmptlevel filename version Data Type sysname smallint smallint int int datetime datetime tinyint Purpose Database's name. Database's ID. Prohibits a database from being accessed while it is being created. Database properties represented as a bitwise field. Extended database properties represented as a bitwise field. Database's creation date. Internal SQL Server field reserved for future use. Database compatibility level. Valid compatibility levels are 60, 65, 70, and 80. Internal version number that SQL Server uses when upgrading.
varbinary(85) Login ID for the database's creator.
nvarchar(260) Primary database path and filename. smallint
5 Prepared by : Ramesh
syslanguages The syslanguages table contains a list of languages installed on the SQL Server. U.S. English is always included. Column langid dateformat datefirst Data Type smallint nchar(3) tinyint Purpose Unique language ID. Order that the date uses for the language. For example, U.S. English uses MDY (month, day, year). First day in the week for the language. The number 1 represents Monday and the other days are incremented by 1. This is in place because some regions use Monday as the first day of the week while others, such as U.S. English, use Sunday (7). Official regional name of the language, such as Español. English name for the language, such as Spanish.
name alias months
nvarchar(372) Comma-separated list of months in the native language.
shortmonths nvarchar(132) Comma-separated list of the months in the native language using the month's short name. days lcid syslockinfo The syslockinfo table gives you a glimpse at what the SQL Server lock manager is granting locks to. It contains information about all granted, waiting, and converting locks. Column rsc_text rsc_bin rsc_valblk rsc_dbid rsc_indid rsc_objid rsc_type Data Type nchar(32) binary(16) binary(16) smallint smallint int tinyint Purpose Description of the locking resource. Lock resource contained in lock manager in binary. Source resources may provide additional lock block values that are stored here. Database ID for the locked resource. The index ID (if used) for the locked resource. The object ID (if used) for the locked resource. Locked resource: 1 = NULL 2 = Database 3 = File
6 Prepared by : Ramesh
nvarchar(217) Comma-separated list of days in the native language. int Microsoft Windows locale ID for the language.
Purpose 4 = Index 5 = Table 6 = Page 7 = Key 8 = Extent 9 = Row ID (RID) 10 = Application Type of lock requested on the resource type. There are lots of various lock methods used, but a few of those would include: 0 = NULL 3 = Shared 4 = Update 5 = Exclusive
Represents the status of the lock's request. Values could be any of the following: 1 = Granted 2 = Converting 3 = Waiting
Each time the lock is requested, this number is incremented by 1. The lock cannot be released until this is equal to 0. Lifetime of the lock represented as a bitmap. Process ID that is requesting the lock. Object associated with the lock such as a transaction (1) or a cursor (2). Requesting transaction ID.
req_lifetime req_spid req_ownertype req_transactionID
int intint smallint bigint
req_transactionUOW uniqueidentifier This column is used for DTC transactions. syslogins The syslogins table contains a list of logins that are assigned to the server. Column sid createdate updatedate Data Type varbinary(85) datetime datetime Purpose Security ID for the user. Date the login was created. Date the login was last updated.
7 Prepared by : Ramesh
Column name dbname password language denylogin has access isntname isntgroup isntuser sysadmin serveradmin setupadmin diskadmin dbcreator loginname
Data Type varchar(30)
Purpose Login ID for the user.
nvarchar(128) Default database for the login when the login connects to the server. navarchar(128) Login's encrypted password. navarchar(128) Language name that the user will use by default. int int int int int int int int int int Flag (1 if active) to deny the Windows user or group access to the SQL Server. Flag (1 if active) to grant the Windows user or group access to the SQL Server. Set to 1 if the login is a Windows user or group and 0 if the login is a SQL Server login. Set to 1 if the login represents a Windows group. Set to 1 if the login represents a Windows user. Set to 1 if the user is a member of the sysadmin server role. Set to 1 if the user is a member of the securityadmin server role. Set to 1 if the user is a member of the serveradmin server role. Set to 1 if the user is a member of the setupadmin server role. Set to 1 if the user is a member of the processadmin server role. Set to 1 if the user is a member of the diskadmin server role. Set to 1 if the user is a member of the dbcreator server role.
nvarchar(128) Name of the login. Windows logins are represented as domainname\ loginname.
sysmessages The sysmessages table contains a list of the available error and informational messages installed on the SQL Server. You can use sp_addmessage to add a new message to the table. Column error severity msglangid Data Type int smallint smallint Purpose Unique error number. Numbers above 50001 are available for userdefined messages. Severity level of the message. Language the error is in.
description nvarchar(255) Description of the error that will be outputted to the client.
8 Prepared by : Ramesh
The sysoledbusers table contains a record for each user used for linked servers. Column rmtsrvid Data Type smallint Purpose Security ID (SID) for the remote server.
rmtloginame navrchar(128) Remote login name. rmtpassword navarchar(128) Encrypted password for the remote login. loginsid status changedate sysperfinfo The sysperfinfo database contains a list of performance counters used when monitoring SQL Server in System Monitor. This table can be invaluable when you're trying to perform automated trend analysis of your system. This table only can track the first 99 databases installed on a server. Column object_name Data Type Purpose nchar(128) Performance object name. varbinary(85) smallint datetime Security ID (SID) of the local login to be mapped to the remote login. Set to 1 if SQL Server should use the login credentials of the currently logged-in user. Date the login mapping was last adjusted.
counter_name nchar(128) Counter name under the object name. instance_name nchar(128) Named instance of the SQL Server if applicable. cntr_value cntr_type sysprocesses The sysprocesses table contains a list of the system and user processes currently running on the server. You can also see in this table how much of your system resources is being taken by the individual process. Column spid kpid blocked waittime Data Type Purpose smallint Unique SQL Server process ID. smallint smallint int The Windows NT or Windows 2000 thread ID being used by the process. Process ID of the process that is blocking this row's process. Represents how long the database process has been waiting in milliseconds.
9 Prepared by : Ramesh
Current counter value for the setting. Windows NT or Windows 2000 type of counter.
Column lastwaittype waitresource dbid uid cpu physical_io memusage
Data Type Purpose nchar(32) Name of the current or last wait type. nchar(256) Description of the lock resource. smallint smallint int bigint int Database ID that is currently using the process. User ID for the user who executed the command. This links to the UID in the sysusers table in each database. Amount of CPU the process has used. Amount of disk I/O the process has caused. Amount of procedure cache in pages that is currently allocated to the process. If this number is negative, the process is freeing memory allocated to another process. Represents the time when the process began. For system processes, this will represent the time that SQL Server was started. Time of the last executed stored procedure by the client process. Represents any subthreads that are operating under the process. Number of transactions currently open for the given process. Current status of the process. Some of the values you may see here are sleeping, background, and running.
login_time last_batch ecid open_tran status sid hostname
datetime datetime smallint smallint nchar(30)
binary(86) Login ID for the user. nchar(128) Name of the workstation that created the process. System processes will not have values for this setting.
program_name nchar(128) Name of the program that created the process. For example, a query run in Query Analyzer would show the value of SQL Query Analyzer. hostprocess cmd nt_domain nt_username net_address net_library loginame nchar(8) nchar(16) Process ID number for the workstation. Command that is currently being run against the server to create the process.
nchar(128) Domain name if the user is connecting with Windows Authentication. nchar(128) Windows user name if the user is connecting with Windows Authentication. nchar(12) nchar(12) Represents the MAC address for the user who is connecting to the system. Represents the method of communication to the server for the user (for example, TCP/IP).
nchar(128) The login name for the connecting user.
10 Prepared by : Ramesh
The sysremotelogins table contains information about users who are allowed to execute remote stored procedures. Column remoteserverid sid status changedate sysservers The sysservers table contains a record for the local server as well as any linked servers or servers participating in replication. Most of the options in this table are discussed in detail in Chapter 9. Column srvid srvname Data Type smallint sysname Purpose Unique server ID for the remote or local server. Name of the server. This is generally the name of the SQL Server instance, but this can also represent the linked server's name. Data Type smallint Purpose Remote server's ID.
remoteusername nvarchar(128) Login name on a remote server. varbinary(85) Windows NT or Windows 2000 security ID for the user. smallint datetime Bitmap of options that have been set. Last time the information in the row was modified.
srvproduct providername datasource location providerstring schemadate topologyx topologvy catalog srvcollation connecttimeout
nvarchar(128) Type of product that OLE DB uses to connect to the server. nvarchar(128) Type of provider that OLE DB will use to connect to the server. This is SQLOLEDB for other SQL Server sources. nvarchar(4000) Name or IP address of the remote or local server. nvarchar(4000) Name of the OLE DB location value. nvarchar(4000) Value for any customized provider string used when connecting to the provider. datetime int int sysname int int Date the entry was last updated. Used in Enterprise Manager for drawing a topology diagram of replication. Used in Enterprise Manager for drawing a topology diagram of replication. The default catalog to connect to on a remote server. The collation of the remote server if the remote collation option is specified. The point at which a server connection is timed out (in seconds).
Prepared by : Ramesh
Column querytimeout isremote rpc pub sub dist dpub rpcout dataaccess collationcompatible system userremotecollation
Data Type int bit bit bit bit bit bit bit bit bit bit bit
Purpose The point at which a query is timed out (in seconds). If this option is set to 1, the entry represents a remote server. Otherwise it is a linked server. If this option is set to 1, users are allowed to make RPC calls from the remote server. If this option is set to 1, the remote server is a publisher. If this option is set to 1, the remote server is a subscriber. If this option is set to 1, the remote server is a distributor. If this option is set to 1, the remote server is a distributor and a publisher. If this option is set to 1, the user is allowed to make RPC calls to the remote server. If this option is set to 1, the user is able to access data on the remote server. If this option is set to 1, the collation compatible option is enabled. If this option is set to 1, enables the system option. If this option is set to 1, specifies that the user's query will use the remote system's collation. Turns on the lazy schema validation option. This option is used heavily in the distributed partitioned views feature. Name of the collation used.
lazyschemavalidation bit collation sysname
Tables in Every Database
The following tables are represented in every database in SQL Server. These allow databases to be moved from server to server without trouble. Many of these tables have views that can be used instead of the system tables. It is much less unlikely that the views will be adjusted from version to version where the system tables are often modified or removed. syscolumns There is an entry in the syscolumns table for every column in the database. The entries in this table do include columns from the system tables. Column name Data Type sysname Purpose Name of the column.
12 Prepared by : Ramesh
Column id xtype xusertype length colid cdefault domain colorder language status type usertype prec scale
Data Type int tinyint smallint smallint smallint int int smallint int tinyint tinyint smallint smallint int
Purpose Object's unique identifier for the column. What data type the column is storing data in. Related to the systypes table. ID for user-defined data types if used for the column. Maximum storage capacity for the column. Column or parameter ID. ID for the column's default value, which links to the sysobjects table. ID for the rule or CHECK constraint for the column. Column order for the table. Collation ID for the column. Language ID for the column. Bitmap of properties for the column. Type of column which is linked to the systypes table. Type of user-defined data type from systypes. Precision of the column if applicable. Scale of the column if applicable. Specifies if the column is computed with a flag of 1. Specifies if the procedure parameter is an output parameter. Specifies if the column allows nulls. Collation of the column.
iscomputed int isoutparam int isnullable collation int sysname
syscomments The syscomments table is an important table, which holds all the stored procedures, views, rules, triggers, DEFAULT constraints, and CHECK constraints for a given database. It is important to never edit this table directly because it is highly dependent on sequence. If you delete one entry, all the others that are linked to the deleted stored procedure will cease to function. Column id number colid Data Type int smallint smallint Purpose Object ID for the row. This column groups the stored procedure. If there is a 0 in this column, the procedure is not grouped. Sequence of the stored procedure if it's longer than 4000 bytes. For example, if a stored procedure is over 4000 bytes, it will create a new row and be flagged in this column with a 2.
13 Prepared by : Ramesh
Column ctext texttype
Data Type Purpose varbinary(8000) Actual text of the stored procedure in binary format. smallint 0 = User-supplied comment. 1 = System-supplied comment. 4 = Encrypted comment. Language ID the stored procedure is in. Links to the syslanguages table in the master database. Flag indicates whether the stored procedure is encrypted. A value of 0 means the procedure is not encrypted and 1 means it is. Flag indicates whether the stored procedure is compressed. A value of 0 means the procedure is not compressed and 1 means it is.
compressed bit text
nvarchar(4000) The actual text for the stored procedure. This column is handy when you need to find a stored procedure that has a certain word in it.
sysconstraints The sysconstraints table contains a list of the constraints in a database. Column constid id colid status Data Type int int smallint int Purpose Represents the constraint number. Object ID for the table the constraint is in. Object ID for the column the constraint is on. Represents the type of constraint (PK, FK, UNIQUE).
sysfilegroups The sysfilegroups table includes a table for each file group used by your database. Column groupid status Data Type Purpose smallint Unique group ID for each database. int Specifies whether the file group is read only (0x8) or the default file group (0x10). Logical name of the file group.
groupname sysname sysfiles
The sysfiles table contains a record for each data and log file used in a given database.
14 Prepared by : Ramesh
Column fileid groupid size maxsize
Data Type Purpose smallint Unique file ID for each data and log file that your database uses. smallint int int File group ID that the file is a member of. Size of the file in 8K pages. Maximum size the file can grow to in 8K pages. If the value is 0, no file growth is allowed. If the number is -1, the file will grow until it runs out of hard drive space. Specifies how large the increments will be that the database grows in. A setting of 0 specifies no growth. The setting is in either pages or a percentage of growth based on the status flag. Bitmap value for the database growth.
status name filename
nchar(128) Logical name for the file. nchar(260) Full path and filename for the file.
sysforeignkeys The sysforeignkeys table contains information for any foreign keys a table may use. Column constid fkeyid rkeyid fkey rkey keyno Data Type Purpose int int int smallint smallint smallint Unique ID for the constraint. Object ID for the table that has the foreign key constraint. Object ID for the table that is referenced in the key. ID for the column that has the foreign key on it. ID for the column that the foreign key links to. Ordinal position of the column in the column list.
sysfulltextcatalogs The sysfulltextcatalogs table lists all the full-text catalogs in a given database. Column Data Type ftcatid smallint name path sysname Purpose Unique ID for the full-text catalog. Name of the catalog.
nvarchar(260) Path for the catalog given by the server. If the value of this column is NULL, the default is used.
15 Prepared by : Ramesh
The sysindexes table contains a indexes installed in a given table. Column id first indid Data Type int binary(6) smallint Purpose ID for the table where the index is created. Pointer to the index's first or root page. Type of index: 1 = Clustered index >1 = Nonclustered 255 = Tables that have image or text columns. root minlen keycnt groupid dpages reserved used rowcnt rowmodctr xmaxlen maxirow keys statblob name rows binary(6) smallint smallint smallint int int int bigint int smallint smallint For clustered indexes, the root is a pointer to the root page. Otherwise, this is a pointer to the last page. Row's minimum size. The number of keys on the index. File group ID where the index was created. Number of data pages used in the index if applicable. Number of data pages reserved for the index where applicable. Number of pages used for the index where applicable. Number of rows in the table. Total number of inserts, deletes, and updates since the last time statistics were updated. Maximum width of a row. Maximum width of a row for a nonleaf index row. Original fill factor used when creating the index. Binary large object (BLOB) that contains the statistics. Name of the index. Number of rows in the table.
origfillfactor tinyint image sysname int
varbinary(1088) List of keys by their column IDs.
sysindexkeys The sysindexkeys table maps which indexes are being used by which tables. Column id indid colid Data Type int smallint smallint Purpose Identifier for the table. Identifier for the index. Identifier for the column.
16 Prepared by : Ramesh
Data Type smallint
Purpose Ordinal position of the column for the index.
sysmembers The sysmembers table maps user names to a database role. Column Data Type Purpose memberuid smallint User ID to be mapped. groupuid sysobjects The sysobjects table is one of the most important tables in the catalog. It contains a record for each database object in it. Column name id xtype Data Type sysname int char(2) Purpose Name of the object. Object ID. Type of object. A few common ones would include: C = CHECK constraint D = DEFAULT constraint F = Foreign Key P = Stored procedure PK = Primary Key S = SQL Server system table TR = Trigger U = User-defined table V = View X = Extended stored procedure uid smallint Creator of the object. Object ID for the parent of the object. For example, if you were to have a DEFAULT constraint, its parent would be the table's object ID. Date on which the object was created. Full-text catalog ID if applicable for a table. Incremented version each time the schema changes for a table. Type of object. The values for this are the same as the xtype column mentioned previously.
17 Prepared by : Ramesh
Database role ID.
parent_obj int crdate ftcatid type datetime smallint char(2)
syspermissions The syspermissions provides a matrix of permissions assigned to the users, groups, or roles of a given database. More permission information is in the sysprotects table. Column id grantee grantor Data Type Purpose int Object ID the permission is being assigned to. smallint smallint User ID of the user, group, or role that is affected by the permission. User ID of the user, group, or role that assigned the permission to the object.
sysprotects The sysprotects table expands on the syspermissions table and specifies which type of permissions the user has. Column id uid action Data Type int smallint tinyint Purpose Object ID that the user or group has permissions set. User ID or group where the permissions have been applied. What type of permission has been applied to the object. Some of the many valid command values you may see are 26 = REFERENCES 178 = CREATE FUNCTION 193 = SELECT 195 = INSERT 196 = DELETE 197 = UPDATE 198 = CREATE TABLE 203 = CREATE DATABASE 207 = CREATE VIEW 222 = CREATE PROCEDURE 224 = EXECUTE 228 = BACKUP DATABASE 233 = CREATE DEFAULT 235 = BACKUP LOG 236 = CREATE RULE protecttype tinyint columns grantor Specifies whether the user has granted access (204 and 205) to the object or revoked access (206). User ID of the user who granted access in each instance.
18 Prepared by : Ramesh
varbinary(4000) List of columns that have permissions applied where applicable. smallint
sysreferences The sysreferences table shows the relationships between the tables. Column Data Type constid fkeyid rkeyid keycnt int int int smallint Purpose Object ID of the foreign key constraint. Object ID of the table with the foreign key (referencing table). Object ID of the table being referenced. Index ID for the unique index on the referenced table. Number of columns involved in the foreign key. Column IDs for the columns referencing the table. Column IDs for the columns being referenced.
rkeyindid smallint fkey1-16 smallint rkey1-16 smallint systypes
The systypes table contains a list of system and user-defined data types. Column name xtype length xprec xscale tdefault domain uid usertype variable Data Type Purpose sysname Name of the data type. tinyint smallint tinyint tinyint int int smallint smallint bit Physical storage type. Extended user type. Length of the data type. Default precision of the data type. Default scale of the data type. Object ID for the stored procedure that checks default integrity information. Object ID for the stored procedure that checks default integrity information. User ID for the data type's creator. User type ID. If the value is set to 1, specifies that the data type is a variable-length column. Specifies whether the data type allows NULL values by default. Specifies how the data type is stored physically. Default precision of the data type. Default scale of the data type.
19 Prepared by : Ramesh
allownulls bit type prec scale tinyint smallint tinyint
sysusers The sysusers table contains a list of users and roles in a given database. Column uid status name sid createdate gid islogin isntname isntgroup isntuser issqluser isaliased issqlrole isappprole Data Type smallint smallint sysname datetime smallint int int int int int int int int Purpose Unique user ID for the user or role in the database. The ID is only unique in the database and not across all databases. Type of user, whether a role, Windows Authentication login, or standard login. Name of the login, group, or role. Date on which the user was created. Date on which the user was last updated. Group ID where the user belongs. Set to 1 if the user has access to the database. Set to 1 if the user is a Windows group or user, or SQL Server user with a login account. Set to 1 if the user is a Windows NT group or user. Set to 1 if the user is a Windows NT group. Set to 1 if the user is a Windows NT user. Set to 1 if the user is a SQL Server standard user. Set to 1 if the user is using an alias to another account. Set to 1 if the user is a SQL Server role. Set to 1 if the user is an application role.
varbinary(85) Login security ID for the user.
updatedate datetime hasdbaccess int
20 Prepared by : Ramesh
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.