Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error in creating a snapshots


Error in creating a snapshots

Author
Message
bkshn
bkshn
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 125
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
BrainDonor
BrainDonor
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2014 Visits: 11172
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'?

Steve Hall
Linkedin
Blog Site
bkshn
bkshn
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 125
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 Sad

Msg 5127, Level 16, State 1, Line 1
All files must be specified for database snapshot creation. Missing the file "exhibitor".
BrainDonor
BrainDonor
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2014 Visits: 11172
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.

Steve Hall
Linkedin
Blog Site
bkshn
bkshn
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 125
Dear BrainDonor
thanks alot
i got it
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search