Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error in creating a snapshots Expand / Collapse
Author
Message
Posted Sunday, November 3, 2013 11:51 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 12:52 AM
Points: 36, Visits: 101
Hello
I use bellow code to create a snapshot,but I have this error "Msg 5014, Level 16, State 3, Line 1
The file 'Exhibitor_Data' does not exist in database 'exhibitor'."
CREATE DATABASE ExhibitorSnapShot ON
( NAME = Exhibitor_Data,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Exhibitor_Data_2013.ss')
AS SNAPSHOT OF exhibitor;
GO

Could you help me , how can I do this?
I'll appreciate your help
Post #1510975
Posted Monday, November 4, 2013 1:11 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 2:45 AM
Points: 1,463, Visits: 8,282

Look at the files that make your database, the easiest way is via SSMS - right-click on the db/properties/Files.
Do you actually have a file called 'Exhibitor_Data'?


BrainDonor
Linkedin
Blog Site
Post #1510993
Posted Monday, November 4, 2013 1:20 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 12:52 AM
Points: 36, Visits: 101
Hello
thanks for your answer
I create a file in db/properties/file with name Exhibitor_Data.
and execute my code again, but I have an error yet

Msg 5127, Level 16, State 1, Line 1
All files must be specified for database snapshot creation. Missing the file "exhibitor".
Post #1510994
Posted Monday, November 4, 2013 1:57 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 2:45 AM
Points: 1,463, Visits: 8,282
No, you have a misunderstanding about this.

When you create a snapshot of a database it needs to know about all of the data files that belong to the database. These data files are specified when the database is created (you can add more later but we won't concern ourselves with that), either by default or by specifying the names as part of the command.

For example, I have a test db with the name 'SHTest'. Looking at the files (via 'Properties' in SSMS) shows the Logical Name of the data file as 'SHTest'. The log file logical name is SHTest_Log but we don't care about the log for this exercise.

The snapshot command needs to know the filename 'SHTest', which is the logical name of the data file. There may be more than one and each data file needs to be specified.

There is a good example of this command inthe MSDN - please read http://technet.microsoft.com/en-us/library/ms175876(v=sql.90).aspx and come back with any further questions if needed.


BrainDonor
Linkedin
Blog Site
Post #1511007
Posted Monday, November 4, 2013 5:54 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 12:52 AM
Points: 36, Visits: 101
Dear BrainDonor
thanks alot
i got it
Post #1511067
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse