How to refresh database parallelly on sql server
来源:互联网 发布:安卓自学 知乎 编辑:程序博客网 时间:2024/05/16 12:23
Today. I've got a job to refresh database parallelly where possiable on multiple sql server.
I never did this job before. normally. we did this one by one(the one start must wait for the previous one completed) like use WHILE statements. but our databases is large( about 200 gb). so it's not better way to do that(the one is progress, the rest is doing nothing).
How should I do?
I think it should be scheduled. so I found this command at.exe to schedule a .bat/program.
at first, create a .cmd file to hold you command used to refresh database.
e.g. create a .cmd file called refreshdb.cmd
the file contains the following codes
@echo off
sqlcmd -S myserver -E -h -1 -l 8 -Q "restore database mydb from disk='d:/mydb.bak';">c:/refreshdb.txt
delete -f refreshdb.cmd
second, use at.exe to schedule the .cmd file
e.g. at //mypc 10:15 d:/refreshdb.cmd
if add a job successfully. you can use at.exe to list all jobs.
- How to refresh database parallelly on sql server
- How to recover a SQL Server Database
- How to drop a SQL Server database?
- SQL Server How to Perform Database Mirroring
- How to Install MySQL 5.1 Database on A Linux Server
- How to get the SQL Server name (Database server)?
- How to shrink the tempdb database in SQL Server
- How to backup and restore database in SQL Server
- How to determine SQL Server database transaction log usage
- How to check Fragmentation on SQL Server 2005
- How to check Fragmentation on SQL Server 2005
- SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
- How to migrate a SQL Server database to a lower version
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- How to read and save Images in a Sql Server Database using ADO.NET and C#
- How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS
- How to use a SQL Server database with your PHP web site
- How to enable SSO on domino server
- JPA & Hibernate 注解
- 上海税后一万的IT单身男真实生活(2010通胀更新版)
- 系统性能优化之一:鱼还是熊掌?浅谈多进程多线程的选择
- hibernate注解
- 心不在马
- How to refresh database parallelly on sql server
- 描述符转换
- sybase 运行和链接到数据库
- ContentProvider研究
- Activity研究
- 专访:李彦宏谈百度长期发展战略
- Struts2/XWork < 2.2.0远程执行任意代码漏洞分析及修补[转自Neeao's Blog]
- (转)手把手教你用C#打包应用程序(安装程序)【卸载模块已添加】
- .net 2.0 BackgroundWorker类详细用法(转)