这是我以前做的一个网站项目中的开发文档附件。我后来的一段时间都是用PHP+MySQL数据库做网站,很久没接触SQL Server数据库了,但现在又要跟SQL Server数据库打交道了,就把这个附近发了出来,方便参考。

★附件㈠、如何进行SQL Server数据库的备份与恢复

  方法一、利用备份和恢复

  先对源数据库进行完全备份,备份到一个设备(device)上,然后把备份文件复制到目的服务器上(恢复的速度快),进行数据库的恢复操作,在恢复的数据库名中填上源数据库的名字(名字必须相同),选择强制型恢复(可以覆盖以前数据库的选项),在选择从设备中进行恢复,浏览时选中备份的文件就行了。这种方法可以完全恢复数据库,包括外键,主键,索引。

  方法二、直接拷贝数据文件

  把数据库的数据文件(*.mdf)和日志文件(*.ldf)都拷贝到目的服务器,在SQL Server Query Analyzer(中文名:SQL查询分析器)中用语句进行恢复:

EXEC sp_attach_db @dbname = 'test',
@filename1 = 'c:\mssql\data\test_data.mdf',
@filename2 = 'c:\mssql\data\test_log.ldf'

  这样就把test数据库附加到SQL Server中,可以照常使用。如果不想用原来的日志文件,可以用如下的命令:

EXEC sp_detach_db @dbname = 'test'
EXEC sp_attach_single_file_db @dbname = 'test',
@physname = 'c:\mssql\data\test_data.mdf'

  这个语句的作用是仅仅加载数据文件,日志文件可以由SQL Server数据库自动添加,但是原来的日志文件中记录的数据就丢失了。




技术大类 » Windows相关 | 评论(45) | 引用(0) | 阅读(37229)
louis vuitton uk Email Homepage
2011-11-23 09:18
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
jordan 4 cavs Email Homepage
2012-5-8 16:47
Shoes are released in lines, much as cars are marketed, with a higher heel on them. They are also many new styles of Puma sneakers. You can select sneakers in bold mixture of colors, peerless and high mileage.Find and share deals and reviews on Old Navy <a href"=http://www.airjordan4cavsretro.com">jordan 4 cavs</a>: Shoes for $9+, 20% OFF Adult Styles, 30% OFF Kids and Baby Summer Styles at dealspl.us. Oldnavy.gap.com offers this for Sale, $7/Free* shipping. LoveIt shared <a href="http://www.airjordan4cavsretro.com">retro 4 cavs</a> on May 07, 2012.
Coach Outlet Online Email Homepage
2012-5-18 10:20
to obtain Coach Outlet Online in Hainan is amongst the brand new darling from residential holiday makers.He has served as Chairman and Chief Executive Officer of Coach since November 1995. He has served as a member of Coach Outlet Board of Directors since June 1, 2000, the date of incorporation. 
Coach  Outlet Email Homepage
2012-5-18 10:42
Coach Outlet was founded in 1941, in a loft in New York City.as a partnership called the Gail Manufacturing Company. Gail Manufacturing Company began as a family-owned business, with six leatherworkers who made small leather goods, such as wallets and handbags.Coach Outlet Online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website. 
Coach  Outlet Email Homepage
2012-5-18 10:49
Five years later in 1985, the Cahns decided to sell Coach Outlet after determining that none of their three children had any desire to take over the family leatherware business . Coach was then sold to Sara Lee Corporation for $30 million dollars.electric, diesel and mainline electric multiple units (EMU, DMU, MEMU), metro Coach Outlet Canada and Diesel Electric Tower Cars (DETC), Accident Relief Medical Vans (ARMV), Inspection Cars (RA), Fuel Test Cars, Track Recording Cars, the latest coaches are for the Deccan Odyssey . 
Louis Vuitton Email Homepage
2012-5-18 10:55
During this period, Louis Vuitton incorporated its leather into most of its products, ranging from small purses and wallets to larger pieces of luggage.To emphasize Jacobs's fashionable volte face, Kate Moss-last season's saucy Louis Vuitton UK dominatrix was recast for spring as the ballerina on that music box in a gleaming white baby doll frock and Barbie white stilettos. 
Louis Vuitton UK Email Homepage
2012-5-18 11:04
This Louis Vuitton UK for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.In 1983, the company joined with America's Cup to form the Louis Vuitton Cup, a preliminary competition (known as an eliminatory regatta) for the yacht race. 
Christian Louboutin Email Homepage
2012-5-18 17:30
christian louboutin have own characteristic designs. The beautiful crystals have added the magical finishing touch to countless bridal gowns. Just get some for yourself. The first Men's Boutique, christian louboutin uk Boutique Homme on Rue Jean-Jacques Rousseau in Paris, opened in the summer of 2012.
Louis Vuitton UK Email Homepage
2012-5-18 17:30
Cheap louis vuitton uk wholesale offers a variety of options to satisfy your needs. Some new ones even has fashionable styles fold over flap to disguise the snap closure and a draw string is added for a convenient closure. Louis vuitton outlet online just like a person who want to show himself in front of other people, because he is confident enough, he can attain the respect of other people.
CoachOutlet Email Homepage
2012-5-18 17:30
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers. Coach outlet online develops very quickly because it runs by its own special way and it contents the customers greatly.
Air Jordan Email Homepage
2012-5-18 17:30
Thank you for shopping in our store. We are a reliable online jordan bags seller, specialist in providing numbers of new air jordan bags at amazing price . If you need practical, fashionable and well-known nike dunks, you can consider to choosing on the nike Outlet. Its nice and popular design will make you feel a sense of fresh air.
Nike Air Max Email Homepage
2012-5-18 17:30
This nike air max for sale belongs to the sounding just what are termed as nike air vintage best sellers, many other products and services for the reason that range appearing companies the actual nike air Galliera, plus the nike air outlet monogram selection. nike dunks are made of high leather materials which can be durable and fashionable.They will make you become the focus in the streets or audience.
Coach Outlet Online Email Homepage
2012-6-8 10:56
http://www.atcoachoutletsonline.net/ Coach Outlet Online
http://www.getcoachfactoryoutlet.org/ Coach Factory
http://www.louisvuittonhandbagsoutlet.org/ Louis Vuitton Handbags Outlet
http://www.saleincoachoutlets.com/ Coach Outlet
cxf0401
2012-6-11 10:37
Sometimes your mood just calls for something unabashedly luxe. Enter the michael kors outlet.A classic silhouette with a current look, this boxy michael kors handbags outle is right in style for your warm-weather wardrobe.All michaelkors outlet online are newest style & excellent quality.Welcome to our online sales shop, where you can always buy the most affordable price to a your favorite Michael Kors handbag.
Coach Handbags Email Homepage
2012-8-24 16:32
57 Opinions Strain is definitely an very talked-about part of our tradition as of late Coach Outlet
Cheap Louis Vuitton Luggage Email Homepage
2012-8-31 19:41
The worth variation is substantial and a person must be watchful concerning this Coach Outlet Store Online
Noah Pulliam Email Homepage
2012-9-12 23:49
baozang
2012-9-22 13:33
Lamo - Like Sebago, Louis Vuitton Canada  there are only about 40 styles of Lamo Footwear. Most of their footwear uses a suede leather traditional in True Religion Jeans  moccasins, though only about 1/3 of the footwear collection is a traditional moccasin look. True Religion Brand Jeans The rest of the collection is slippers and UGG styled boots.Louis Vuitton Artsy The traditional moccasins do have a soft rubber sole making them great deck True Religion Sale shoes as well, however. Expect to pay between $50 and $60 for Lamo moccasins.  Invicta watches have been here since 1837. They were made by Raphael Picard. Invicta watches got its name from a Latin word. The meaning of Invicta in Louis Vuitton Monogram Vernis Alma BB Amarante Latin is "Invincible". Earlier these watches were not so popular but recently with its new men's collection this watch brand has gained a lot of popularity. Watches for many are a style statement and so they prefer to own the best piece. Invicta watches are popular as they are like a style statement.
分页: 1/3 第一页 1 2 3 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]