As with most database
operations involving the actual files, you need to refer to the logical name of those files.
Normally, it??™s TEMPDEV for the data file and TEMPLOG for the log file. To confirm, you can
query the SYS.MASTER_FILES table. To place tempdb in a new location, you must first
accept whatever location it is placed in when SQL Server is reinstalled, then use ALTER
DATABASE to move it. You must execute this code from within the master database:
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
Once you run this code, you need to stop and restart SQL Server. After that, tempdb
will be recreated in the specified location, with the settings, such as the initial data and
log file size, stored in the master.
Distribution
If a server is used as a distributor for replication, and depending on the replication
method used, you??™ll need to back up the distribution database on a regular basis. Transactional
replication makes heavy use of the distribution database, while merge
replication does not.
Pages:
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163