dbTalk Databases Forums  

Kopieren offener Datenbanken...

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Kopieren offener Datenbanken... in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tellie
 
Posts: n/a

Default Kopieren offener Datenbanken... - 12-06-2009 , 01:55 AM






Hallo Experten,

ich bekomme regelmäßig MS-SQL-Server Datenbanken zugeschickt und
vermute, dass diese manchmal vor dem Kopieren nicht heruntergefahren
wurden. Mich interessieren nur die Inhalte der Datenbanken, daher
folgende Fragen:

Kann man aus einem mitkopierten *.ldb File analog wie bei Access
schließen, dass die Datenbank nicht runtergefahren wurde? Welche
Programme / Dienste reicht es zu beenden, damit Datenbanken sicher
kopiert werden können?

TIA, Georg Telemann

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Kopieren offener Datenbanken... - 12-06-2009 , 05:06 AM






Tellie (tellie (AT) gmx (DOT) de) writes:
Quote:
ich bekomme regelmäßig MS-SQL-Server Datenbanken zugeschickt und
vermute, dass diese manchmal vor dem Kopieren nicht heruntergefahren
wurden. Mich interessieren nur die Inhalte der Datenbanken, daher
folgende Fragen:

Kann man aus einem mitkopierten *.ldb File analog wie bei Access
schließen, dass die Datenbank nicht runtergefahren wurde? Welche
Programme / Dienste reicht es zu beenden, damit Datenbanken sicher
kopiert werden können?
(Dann diese Gruppe ist ein internaziolle Gruppe, ich antworte in Englisch.)

To copy a data base in SQL Server, the best option is to use
BACKUP/RESTORE. You run these commands from with in a query window.
To backup up a database is easy:

BACKUP DATABASE yourdb TO DISK = 'somefile'

To restore a copy, takes a little more job. First run "sp_helpdb yourdb",
the using that output you can do:

RESTORE DATABASE yourcopy FROM disk = 'somefile'
WITH MOVE 'name1' TO 'filepath1-modified',
MOVE 'name2' TO 'filepath2-modified',
REPLACE

name1 and name2 are the names in the rightmost column in the output.
Those are the logical names of the files.

filepath1 and filepath2 are the physical names for the files, and you
need to modify these names, preferably to match the names of your copy.

There are also wizards etc in Management Studio, but they mainly serve
to leave you at a guess what is actually going on. And by using commands,
you can save those in a file and reuse later.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.