Fanr

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年3月30日

摘要: Exec sp_droplinkedsrvlogin DBVIP,NullExec sp_dropserver DBVIPEXEC sp_addlinkedserver @server='DBVIP',--被访问的服务器别名 @srvproduct='', @provider='SQLOLEDB', @datasrc='Server2' --要访问的服务器EXEC sp_addlinkedsrvlogin 'DBVIP', --被访问的服务器别名 'false', NULL, 'sa' 阅读全文
posted @ 2011-03-30 14:33 Fanr_Zh 阅读(383) 评论(0) 推荐(0) 编辑

摘要: Make sure each maintenance job has an output file in a standarddirectory.In the advanced tab under the job steps create an output file. This willallow you to see the full description of the job execution. There isnothing more annoying than not being able to see why a job failed.如何设置作业输出文档:In Object 阅读全文
posted @ 2011-03-30 11:10 Fanr_Zh 阅读(187) 评论(0) 推荐(0) 编辑

摘要: You may find yourself in a position where you need to look at what jobs have been running over a specifiedperiod of time. SQL Server has a stored procedure sphelpjob that will allow you to look at the jobs and what their status is currently, but maybe you need to do some additional processing like s 阅读全文
posted @ 2011-03-30 10:40 Fanr_Zh 阅读(1202) 评论(0) 推荐(0) 编辑

摘要: Whenever SQL Server is restarted, it creates a new error log. If theserver stays up for a while, this can make for a very large error log. I create a job that runs on a daily or weekly basis that executes the sp_cycle_errorlog stored procedure in the master database. This will create a new error lo. 阅读全文
posted @ 2011-03-30 10:13 Fanr_Zh 阅读(290) 评论(0) 推荐(0) 编辑

摘要: This script permit executes the sp_updatestats in all databases at same time.First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.Now you 阅读全文
posted @ 2011-03-30 09:38 Fanr_Zh 阅读(2281) 评论(0) 推荐(0) 编辑