随笔分类 -  SQLServer备份与恢复

摘要:set nocount on USE master IF exists(SELECT 1 from tempdb.sys.objects where object_id=object_id('tempdb..#temp')) drop TABLE tempdb..#temp SELECT db_na 阅读全文
posted @ 2016-06-14 15:52 两年十一时 阅读(151) 评论(0) 推荐(0)
摘要:--打开xp_cmdshell EXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmdshell', 1GORECONFIGUREGO use ConfigDBgospb_netuse_ 阅读全文
posted @ 2016-05-18 16:44 两年十一时 阅读(174) 评论(0) 推荐(0)
摘要:create database newtestdb use newtestdbgo drop table t1go create table t1 (id int not null identity(1,1) primary key,vdate datetime default (getdate() 阅读全文
posted @ 2016-05-18 13:59 两年十一时 阅读(451) 评论(0) 推荐(0)
摘要:backup database testdb to disk='c:\testdb_ful.bak' with compression backup log testdb to disk='c:\testdb_ful.trn' with compression restore filelistonl 阅读全文
posted @ 2016-05-17 18:11 两年十一时 阅读(446) 评论(0) 推荐(0)