| Author |
Topic |
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-05 : 10:35:47
|
| Hello everyoneI am learning about snapshots at the moment and i dont know how to incorporate the filegroup within the sytaxat the moment i usecreate snapshot snapshotNameon (Name='Filename_data',Filename=@'osFIlePath')as snapshot of DatabaseNamei get an error for filegroup, can someone tell me what im doing wrong please.RegardsRob Dineen |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-05 : 10:40:56
|
http://support.microsoft.com/kb/938086 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-05 : 10:44:06
|
| Sorry Peso this does not help meRegardsRob Dineen |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-05 : 10:47:20
|
[code]CREATE DATABASE WSS_Backup1ON(NAME=WSS_Content,FILENAME = 'c:\WSS_Backup1.ss')AS SNAPSHOT OF <WSS_Content>;[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-05 : 10:50:23
|
| Database snapshot can't be incorporated in specific FG. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-05 : 10:50:27
|
quote: SQL Server 2005 Books Online Working with Database SnapshotsFirst you need to create a database snapshot. There are two ways of creating database snapshot. CREATE DATABASE ssAdventureWorks_dbss2230 ON ( NAME = AdventureWorks_Data, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_data_2230.ss' ) AS SNAPSHOT OF AdventureWorks; GOIn the above example, AdventureWork_data_2230.ss is the sparse file. The extension ss is just an arbitrary value and it is not a default or required. Accessing this database snapshot is as same as any other database. SELECT * FROM [ssAdventureWorks_dbss2230].dbo.EmployeesLike accessing a database, dropping the database snapshot is the same as a normal database drop.DROP DATABASE [ssAdventureWorks_dbss2230]You have the option of restoring a database snapshot into the current database. In that case, database snapshots can be treated as a database backup. RESTORE DATABASE AdventureWorks from DATABASE_SNAPSHOT = 'ssAdventureWorks_dbss2230'; GOThese are the only database options that are available with database snapshots. This means that you cannot take backups of database snapshot or restore them to database snapshot.
E 12°55'05.25"N 56°04'39.16" |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-05 : 10:50:42
|
| should the filename be the location of the filegroup |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-05 : 10:52:55
|
| ok so before you can create a snapshot do you need to create a filegroup for the source database first |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-05 : 11:00:26
|
| Nope, you don't have to.Specify all data files of source database in Name and specify path for Filename. |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-05 : 15:59:01
|
| could you just show me an example please. then i shall try outthank you very muchRegards Rob |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-05 : 16:22:14
|
| Watch this video to get clear picture so you don't have further issue:http://www.jumpstarttv.com/Media.aspx?vid=41 |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-06-05 : 23:12:44
|
| >> could you just show me an example please. peso gave you code already, and books online has sample code for that also. |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2008-06-06 : 03:12:57
|
| thank you very much for that videojust to make sure, You can create snapshots within developer editionRegardsRob |
 |
|
|
aparnav19
Starting Member
5 Posts |
|
|
|