Hi everybody,
I have the below script on SQL Server 2005, SP1 on Windows 2003 Server
to
backup a database
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT,
NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS =
10
GO
declare @.backupSetId as int
select @.backupSetId = position from msdb..backupset where
database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'XYZ' )
if @.backupSetId is null begin raiserror(N'Verify failed. Backup
information
for database ''XYZ'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD,
NOREWIND
GO
And after 40% processing the backup fails with below error message. I
have
been trying to find out the solution for past 2 days, but in vain. Can
someone look at below results and show me any pointers?
10 percent processed.
20 percent processed.
30 percent processed.
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '32(The process cannot access
the
file because it is being used by another process.)' while attempting
'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Msg 50000, Level 16, State 1, Line 3
Verify failed. Backup information for database 'XYZ' not found.
Msg 3250, Level 16, State 0, Line 4
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Line 4
VERIFY DATABASE is terminating abnormally.Viking
Can you post your database's structure? How many files group do you have?
"VIKING" <msrviking@.gmail.com> wrote in message
news:1172564216.369945.19580@.v33g2000cwv.googlegroups.com...
> Hi everybody,
> I have the below script on SQL Server 2005, SP1 on Windows 2003 Server
> to
> backup a database
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T,
> NOINIT,
> NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS =
> 10
> GO
> declare @.backupSetId as int
> select @.backupSetId = position from msdb..backupset where
> database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
> msdb..backupset where database_name=N'XYZ' )
> if @.backupSetId is null begin raiserror(N'Verify failed. Backup
> information
> for database ''XYZ'' not found.', 16, 1) end
> RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD,
> NOREWIND
> GO
> And after 40% processing the backup fails with below error message. I
> have
> been trying to find out the solution for past 2 days, but in vain. Can
> someone look at below results and show me any pointers?
> 10 percent processed.
> 20 percent processed.
> 30 percent processed.
> Msg 3634, Level 16, State 1, Line 1
> The operating system returned the error '32(The process cannot access
> the
> file because it is being used by another process.)' while attempting
> 'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
> Msg 3013, Level 16, State 1, Line 1
> BACKUP DATABASE is terminating abnormally.
> Msg 50000, Level 16, State 1, Line 3
> Verify failed. Backup information for database 'XYZ' not found.
> Msg 3250, Level 16, State 0, Line 4
> The value '0' is not within range for the FILE parameter.
> Msg 3013, Level 16, State 1, Line 4
> VERIFY DATABASE is terminating abnormally.
>|||Hi
"VIKING" wrote:
> Hi everybody,
> I have the below script on SQL Server 2005, SP1 on Windows 2003 Server
> to
> backup a database
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T,
> NOINIT,
> NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS =
> 10
> GO
> declare @.backupSetId as int
> select @.backupSetId = position from msdb..backupset where
> database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
> msdb..backupset where database_name=N'XYZ' )
> if @.backupSetId is null begin raiserror(N'Verify failed. Backup
> information
> for database ''XYZ'' not found.', 16, 1) end
> RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD,
> NOREWIND
> GO
> And after 40% processing the backup fails with below error message. I
> have
> been trying to find out the solution for past 2 days, but in vain. Can
> someone look at below results and show me any pointers?
> 10 percent processed.
> 20 percent processed.
> 30 percent processed.
> Msg 3634, Level 16, State 1, Line 1
> The operating system returned the error '32(The process cannot access
> the
> file because it is being used by another process.)' while attempting
> 'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
> Msg 3013, Level 16, State 1, Line 1
> BACKUP DATABASE is terminating abnormally.
> Msg 50000, Level 16, State 1, Line 3
> Verify failed. Backup information for database 'XYZ' not found.
> Msg 3250, Level 16, State 0, Line 4
> The value '0' is not within range for the FILE parameter.
> Msg 3013, Level 16, State 1, Line 4
> VERIFY DATABASE is terminating abnormally.
>
Has your AV software been setup correctly?
Do other backups work ok?
John|||Here is the original db structure
name
fileid filename
Edge_Data 1 F:\MSSQL\005.YINT01\EDGE\EDGE_Data.mdf PRIMARY
Edge_Log 2 F:\MSSQL\005.YINT01\EDGE\Edge_logs.ldf NULL
Edge_log01 3 F:\MSSQL\005.YINT01\EDGE\Edge_log01.ldf NULL
Edge_log02 4 F:\MSSQL\005.YINT01\EDGE\Edge_log02.ldf NULL
EdgeActivityCenter01 5 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenter01.mdf EdgeActivityCenter
EdgeActivityCenter02 6 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenter02.mdf EdgeActivityCenter
EdgeActivityCenter03 7 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenter03.mdf EdgeActivityCenter
EdgeActivityCenter04 8 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenter04.mdf EdgeActivityCenter
EdgeActivityCenter05 9 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenter05.mdf EdgeActivityCenter
Edge_data01 10 F:\MSSQL\005.YINT01\EDGE\EDGE_Data01.mdf PRIMARY
Edge_data02 11 F:\MSSQL\005.YINT01\EDGE\EDGE_Data02.mdf PRIMARY
Edge_data03 12 F:\MSSQL\005.YINT01\EDGE\EDGE_Data03.mdf PRIMARY
Edge_data04 13 F:\MSSQL\005.YINT01\EDGE\EDGE_Data04.mdf PRIMARY
EdgeActivityCenterIDX01 14 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenterIDX01.mdf EdgeActivityCenterIDX
EdgeActivityCenterIDX02 15 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenterIDX02.mdf EdgeActivityCenterIDX
EdgeActivityCenterIDX03 16 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenterIDX03.mdf EdgeActivityCenterIDX
EdgeActivityCenterIDX04 17 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenterIDX04.mdf EdgeActivityCenterIDX
EdgeActivityCenterIDX05 18 F:\MSSQL\005.YINT01\EDGE
\EdgeActivityCenterIDX05.mdf EdgeActivityCenterIDX
Edge_data05 19 F:\MSSQL\005.YINT01\EDGE\EDGE_Data05.mdf PRIMARY
and the database has 3 filegroups.
On Feb 27, 2:03 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:[vbcol=seagreen]
> Viking
> Can you post your database's structure? How many files group do you have?
> "VIKING" <msrvik...@.gmail.com> wrote in message
> news:1172564216.369945.19580@.v33g2000cwv.googlegroups.com...
>
>
>
>|||I have the AV software working fine without bothering the backup jobs
for other databases. Infact, I tried running the backup script by
disabling the AV services.
The other db job backups are running without any issues. It is only
with this db.
On Feb 27, 2:07 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
>
> "VIKING" wrote:
>
>
>
> Has your AV software been setup correctly?
> Do other backups work ok?
> John|||Viking
I would like to see your script. i did some testing ,see if this what you
are doing
CREATE DATABASE test
GO
ALTER DATABASE test SET RECOVERY FULL
ALTER DATABASE test
ADD FILEGROUP ww_Group
GO
ALTER DATABASE test
ADD FILE
( NAME = ww,
FILENAME = 'D:\wwdat1.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGROUP ww_Group
create table test..test(id int identity) on [primary]
create table test..test_GR(id int identity) on ww_Group
insert test..test default values
insert test..test_GR default values
SELECT * FROM test..test_GR
SELECT * FROM test..test
GO
TRUNCATE TABLE test..test_GR
BACKUP DATABASE test
TO disk='D:\Test_backup.bak'with init
RESTORE DATABASE test
from disk='D:\Test_backup.bak'WITH NORECOVERY
BACKUP DATABASE test
FILE = 'ww',
FILEGROUP = 'ww_Group'
TO disk='D:\CROUPFILES.bak'WITH INIT
BACKUP LOG test
TO disk='D:\Test__log.ldf'WITH INIT
BACKUP LOG test
TO disk='D:\Test__log.ldf' WITH NOINIT
RESTORE DATABASE test
FILE = 'ww',
FILEGROUP = 'ww_Group'
FROM DISK ='D:\CROUPFILES.bak'
WITH FILE = 1,NORECOVERY
RESTORE LOG test
FROM disk='D:\Test__log.ldf'
WITH FILE = 1, NORECOVERY
RESTORE LOG test
FROM disk='D:\Test__log.ldf'
WITH FILE = 2, RECOVERY
GO
DROP DATABASE test
"VIKING" <msrviking@.gmail.com> wrote in message
news:1172583480.230401.15680@.z35g2000cwz.googlegroups.com...
> Here is the original db structure
> name
> fileid filename
> Edge_Data 1 F:\MSSQL\005.YINT01\EDGE\EDGE_Data.mdf PRIMARY
> Edge_Log 2 F:\MSSQL\005.YINT01\EDGE\Edge_logs.ldf NULL
> Edge_log01 3 F:\MSSQL\005.YINT01\EDGE\Edge_log01.ldf NULL
> Edge_log02 4 F:\MSSQL\005.YINT01\EDGE\Edge_log02.ldf NULL
> EdgeActivityCenter01 5 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenter01.mdf EdgeActivityCenter
> EdgeActivityCenter02 6 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenter02.mdf EdgeActivityCenter
> EdgeActivityCenter03 7 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenter03.mdf EdgeActivityCenter
> EdgeActivityCenter04 8 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenter04.mdf EdgeActivityCenter
> EdgeActivityCenter05 9 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenter05.mdf EdgeActivityCenter
> Edge_data01 10 F:\MSSQL\005.YINT01\EDGE\EDGE_Data01.mdf PRIMARY
> Edge_data02 11 F:\MSSQL\005.YINT01\EDGE\EDGE_Data02.mdf PRIMARY
> Edge_data03 12 F:\MSSQL\005.YINT01\EDGE\EDGE_Data03.mdf PRIMARY
> Edge_data04 13 F:\MSSQL\005.YINT01\EDGE\EDGE_Data04.mdf PRIMARY
> EdgeActivityCenterIDX01 14 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenterIDX01.mdf EdgeActivityCenterIDX
> EdgeActivityCenterIDX02 15 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenterIDX02.mdf EdgeActivityCenterIDX
> EdgeActivityCenterIDX03 16 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenterIDX03.mdf EdgeActivityCenterIDX
> EdgeActivityCenterIDX04 17 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenterIDX04.mdf EdgeActivityCenterIDX
> EdgeActivityCenterIDX05 18 F:\MSSQL\005.YINT01\EDGE
> \EdgeActivityCenterIDX05.mdf EdgeActivityCenterIDX
> Edge_data05 19 F:\MSSQL\005.YINT01\EDGE\EDGE_Data05.mdf PRIMARY
> and the database has 3 filegroups.
> On Feb 27, 2:03 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
>
Showing posts with label 91xyz. Show all posts
Showing posts with label 91xyz. Show all posts
Tuesday, March 27, 2012
Backup failing
Hi everybody,
I have the below script on SQL Server 2005, SP1 on Windows 2003 Server to
backup a database
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT,
NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
declare @.backupSetId as int
select @.backupSetId = position from msdb..backupset where
database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'XYZ' )
if @.backupSetId is null begin raiserror(N'Verify failed. Backup information
for database ''XYZ'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD, NOREWI
ND
GO
And after 40% processing the backup fails with below error message. I have
been trying to find out the solution for past 2 days, but in vain. Can
someone look at below results and show me any pointers?
10 percent processed.
20 percent processed.
30 percent processed.
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '32(The process cannot access the
file because it is being used by another process.)' while attempting
'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Msg 50000, Level 16, State 1, Line 3
Verify failed. Backup information for database 'XYZ' not found.
Msg 3250, Level 16, State 0, Line 4
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Line 4
VERIFY DATABASE is terminating abnormally.On Feb 26, 5:42 am, Viking <Vik...@.discussions.microsoft.com> wrote:
> Hi everybody,
> I have the below script on SQL Server 2005, SP1 on Windows 2003 Server to
> backup a database
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T, NOINIT,
> NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
> GO
> declare @.backupSetId as int
> select @.backupSetId = position from msdb..backupset where
> database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
> msdb..backupset where database_name=N'XYZ' )
> if @.backupSetId is null begin raiserror(N'Verify failed. Backup informatio
n
> for database ''XYZ'' not found.', 16, 1) end
> RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD, NORE
WIND
> GO
> And after 40% processing the backup fails with below error message. I have
> been trying to find out the solution for past 2 days, but in vain. Can
> someone look at below results and show me any pointers?
> 10 percent processed.
> 20 percent processed.
> 30 percent processed.
> Msg 3634, Level 16, State 1, Line 1
> The operating system returned the error '32(The process cannot access the
> file because it is being used by another process.)' while attempting
> 'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
> Msg 3013, Level 16, State 1, Line 1
> BACKUP DATABASE is terminating abnormally.
> Msg 50000, Level 16, State 1, Line 3
> Verify failed. Backup information for database 'XYZ' not found.
> Msg 3250, Level 16, State 0, Line 4
> The value '0' is not within range for the FILE parameter.
> Msg 3013, Level 16, State 1, Line 4
> VERIFY DATABASE is terminating abnormally.
AS the error states, some other process is grabbing the file while
your restore in in process. Are you running some anti-virus software
that isn't configured properly for a SQL Server machine? Tape backup
perhaps?|||I should have mentioned all the testing I have done. Tracy, yes, there is
anti-virus software on the system. I have disabled the service ran the job
again and yet I get the same error. There is no tape backup connected this
server. I am just lost in finding out the cause..!
"Tracy McKibben" wrote:
> On Feb 26, 5:42 am, Viking <Vik...@.discussions.microsoft.com> wrote:
> AS the error states, some other process is grabbing the file while
> your restore in in process. Are you running some anti-virus software
> that isn't configured properly for a SQL Server machine? Tape backup
> perhaps?
>|||I forgot to mention one more point on "your restore in in process". In fact
I
have tried running the script without RESTORE..and I still see the error.
"Viking" wrote:
[vbcol=seagreen]
> I should have mentioned all the testing I have done. Tracy, yes, there is
> anti-virus software on the system. I have disabled the service ran the job
> again and yet I get the same error. There is no tape backup connected thi
s
> server. I am just lost in finding out the cause..!
> "Tracy McKibben" wrote:
>|||If you're backing up to a file location, you can drop a lot of the options
you have included with the backup statement.. ..as Tracy mentioned the erro
r
suggests something else is accessing the bak file.. ..I've seen this error
before on one of my backups when BackupExec had overrun and was accessing th
e
bak file when the backup task kicked off.. ..try downloading something like
filemon (from sysinternals), place a filter so you just see activity on the
bak file, and see what other process is accessing the file..
"Viking" wrote:
[vbcol=seagreen]
> I forgot to mention one more point on "your restore in in process". In fac
t I
> have tried running the script without RESTORE..and I still see the error.
> "Viking" wrote:
>|||I ran the process monitor and found this nearest to the failure -
CreateFile F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf SHARING VIOLATION Access:
Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File,
Open No Recall, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
I am unable to understand why should a CreateFile should be run before the
.BAK file is written to the defined path. Infact I assumed that RESTORE
VERIFYONLY, may be the culprit, and I had removed that command too. I didn't
see any difference!
One quick update here is that this instance has FULLTEXT SEARCH. Somewhere
in the google world, I read that this failure can be related to FULLTEXT
SEARCH, but nobody gave a solution.
I hope MS - SQL TEAM guys are looking into this posting too!
"Ben UK" wrote:
[vbcol=seagreen]
> If you're backing up to a file location, you can drop a lot of the options
> you have included with the backup statement.. ..as Tracy mentioned the er
ror
> suggests something else is accessing the bak file.. ..I've seen this erro
r
> before on one of my backups when BackupExec had overrun and was accessing
the
> bak file when the backup task kicked off.. ..try downloading something li
ke
> filemon (from sysinternals), place a filter so you just see activity on th
e
> bak file, and see what other process is accessing the file..
> "Viking" wrote:
>|||On Feb 26, 11:25 pm, Viking <Vik...@.discussions.microsoft.com> wrote:
> I ran the process monitor and found this nearest to the failure -
> CreateFile F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf SHARING VIOLATION
Access:
> Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File
,
> Open No Recall, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n
/a
> I am unable to understand why should a CreateFile should be run before the
> .BAK file is written to the defined path. Infact I assumed that RESTORE
> VERIFYONLY, may be the culprit, and I had removed that command too. I didn
't
> see any difference!
> One quick update here is that this instance has FULLTEXT SEARCH. Somewhere
> in the google world, I read that this failure can be related to FULLTEXT
> SEARCH, but nobody gave a solution.
> I hope MS - SQL TEAM guys are looking into this posting too!
>
Can you post the script that you are running? I'm confused as well,
you say you're running a backup, but the error seems to be related to
creating an MDF file.|||Yes, I am confused myself too. Why is there a CREATEFILE when I am
running the backup script (posted already).
Anyways, here is it for your quick refrence.
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT,
NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS =
10
GO
declare @.backupSetId as int
select @.backupSetId = position from msdb..backupset where
database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'XYZ' )
if @.backupSetId is null begin raiserror(N'Verify failed. Backup
information
for database ''XYZ'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD,
NOREWIND
GO
On Feb 27, 5:51 pm, "Tracy McKibben" <tracy.mckib...@.gmail.com> wrote:
> On Feb 26, 11:25 pm, Viking <Vik...@.discussions.microsoft.com> wrote:
>
>
>
>
>
>
> Can you post the script that you are running? I'm confused as well,
> you say you're running a backup, but the error seems to be related to
> creating an MDF file.|||On Feb 27, 6:59 am, "VIKING" <msrvik...@.gmail.com> wrote:
> Yes, I am confused myself too. Why is there a CREATEFILE when I am
> running the backup script (posted already).
> Anyways, here is it for your quick refrence.
>
If you run ONLY this part, what happens? Just run this in Query
Analyzer:
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT, NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD,
STATS = 10
GO|||On Feb 27, 6:09 pm, "Tracy McKibben" <tracy.mckib...@.gmail.com> wrote:
> On Feb 27, 6:59 am, "VIKING" <msrvik...@.gmail.com> wrote:
>
>
> If you run ONLY this part, what happens? Just run this in Query
> Analyzer:
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T,
> NOINIT, NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD,
> STATS = 10
> GO
I am doing that right away. I shall keep you posted on the happenings.
I have the below script on SQL Server 2005, SP1 on Windows 2003 Server to
backup a database
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT,
NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
declare @.backupSetId as int
select @.backupSetId = position from msdb..backupset where
database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'XYZ' )
if @.backupSetId is null begin raiserror(N'Verify failed. Backup information
for database ''XYZ'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD, NOREWI
ND
GO
And after 40% processing the backup fails with below error message. I have
been trying to find out the solution for past 2 days, but in vain. Can
someone look at below results and show me any pointers?
10 percent processed.
20 percent processed.
30 percent processed.
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '32(The process cannot access the
file because it is being used by another process.)' while attempting
'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Msg 50000, Level 16, State 1, Line 3
Verify failed. Backup information for database 'XYZ' not found.
Msg 3250, Level 16, State 0, Line 4
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Line 4
VERIFY DATABASE is terminating abnormally.On Feb 26, 5:42 am, Viking <Vik...@.discussions.microsoft.com> wrote:
> Hi everybody,
> I have the below script on SQL Server 2005, SP1 on Windows 2003 Server to
> backup a database
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T, NOINIT,
> NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
> GO
> declare @.backupSetId as int
> select @.backupSetId = position from msdb..backupset where
> database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
> msdb..backupset where database_name=N'XYZ' )
> if @.backupSetId is null begin raiserror(N'Verify failed. Backup informatio
n
> for database ''XYZ'' not found.', 16, 1) end
> RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD, NORE
WIND
> GO
> And after 40% processing the backup fails with below error message. I have
> been trying to find out the solution for past 2 days, but in vain. Can
> someone look at below results and show me any pointers?
> 10 percent processed.
> 20 percent processed.
> 30 percent processed.
> Msg 3634, Level 16, State 1, Line 1
> The operating system returned the error '32(The process cannot access the
> file because it is being used by another process.)' while attempting
> 'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.
> Msg 3013, Level 16, State 1, Line 1
> BACKUP DATABASE is terminating abnormally.
> Msg 50000, Level 16, State 1, Line 3
> Verify failed. Backup information for database 'XYZ' not found.
> Msg 3250, Level 16, State 0, Line 4
> The value '0' is not within range for the FILE parameter.
> Msg 3013, Level 16, State 1, Line 4
> VERIFY DATABASE is terminating abnormally.
AS the error states, some other process is grabbing the file while
your restore in in process. Are you running some anti-virus software
that isn't configured properly for a SQL Server machine? Tape backup
perhaps?|||I should have mentioned all the testing I have done. Tracy, yes, there is
anti-virus software on the system. I have disabled the service ran the job
again and yet I get the same error. There is no tape backup connected this
server. I am just lost in finding out the cause..!
"Tracy McKibben" wrote:
> On Feb 26, 5:42 am, Viking <Vik...@.discussions.microsoft.com> wrote:
> AS the error states, some other process is grabbing the file while
> your restore in in process. Are you running some anti-virus software
> that isn't configured properly for a SQL Server machine? Tape backup
> perhaps?
>|||I forgot to mention one more point on "your restore in in process". In fact
I
have tried running the script without RESTORE..and I still see the error.
"Viking" wrote:
[vbcol=seagreen]
> I should have mentioned all the testing I have done. Tracy, yes, there is
> anti-virus software on the system. I have disabled the service ran the job
> again and yet I get the same error. There is no tape backup connected thi
s
> server. I am just lost in finding out the cause..!
> "Tracy McKibben" wrote:
>|||If you're backing up to a file location, you can drop a lot of the options
you have included with the backup statement.. ..as Tracy mentioned the erro
r
suggests something else is accessing the bak file.. ..I've seen this error
before on one of my backups when BackupExec had overrun and was accessing th
e
bak file when the backup task kicked off.. ..try downloading something like
filemon (from sysinternals), place a filter so you just see activity on the
bak file, and see what other process is accessing the file..
"Viking" wrote:
[vbcol=seagreen]
> I forgot to mention one more point on "your restore in in process". In fac
t I
> have tried running the script without RESTORE..and I still see the error.
> "Viking" wrote:
>|||I ran the process monitor and found this nearest to the failure -
CreateFile F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf SHARING VIOLATION Access:
Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File,
Open No Recall, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
I am unable to understand why should a CreateFile should be run before the
.BAK file is written to the defined path. Infact I assumed that RESTORE
VERIFYONLY, may be the culprit, and I had removed that command too. I didn't
see any difference!
One quick update here is that this instance has FULLTEXT SEARCH. Somewhere
in the google world, I read that this failure can be related to FULLTEXT
SEARCH, but nobody gave a solution.
I hope MS - SQL TEAM guys are looking into this posting too!
"Ben UK" wrote:
[vbcol=seagreen]
> If you're backing up to a file location, you can drop a lot of the options
> you have included with the backup statement.. ..as Tracy mentioned the er
ror
> suggests something else is accessing the bak file.. ..I've seen this erro
r
> before on one of my backups when BackupExec had overrun and was accessing
the
> bak file when the backup task kicked off.. ..try downloading something li
ke
> filemon (from sysinternals), place a filter so you just see activity on th
e
> bak file, and see what other process is accessing the file..
> "Viking" wrote:
>|||On Feb 26, 11:25 pm, Viking <Vik...@.discussions.microsoft.com> wrote:
> I ran the process monitor and found this nearest to the failure -
> CreateFile F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf SHARING VIOLATION
Access:
> Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File
,
> Open No Recall, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n
/a
> I am unable to understand why should a CreateFile should be run before the
> .BAK file is written to the defined path. Infact I assumed that RESTORE
> VERIFYONLY, may be the culprit, and I had removed that command too. I didn
't
> see any difference!
> One quick update here is that this instance has FULLTEXT SEARCH. Somewhere
> in the google world, I read that this failure can be related to FULLTEXT
> SEARCH, but nobody gave a solution.
> I hope MS - SQL TEAM guys are looking into this posting too!
>
Can you post the script that you are running? I'm confused as well,
you say you're running a backup, but the error seems to be related to
creating an MDF file.|||Yes, I am confused myself too. Why is there a CREATEFILE when I am
running the backup script (posted already).
Anyways, here is it for your quick refrence.
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT,
NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS =
10
GO
declare @.backupSetId as int
select @.backupSetId = position from msdb..backupset where
database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'XYZ' )
if @.backupSetId is null begin raiserror(N'Verify failed. Backup
information
for database ''XYZ'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @.backupSetId, NOUNLOAD,
NOREWIND
GO
On Feb 27, 5:51 pm, "Tracy McKibben" <tracy.mckib...@.gmail.com> wrote:
> On Feb 26, 11:25 pm, Viking <Vik...@.discussions.microsoft.com> wrote:
>
>
>
>
>
>
> Can you post the script that you are running? I'm confused as well,
> you say you're running a backup, but the error seems to be related to
> creating an MDF file.|||On Feb 27, 6:59 am, "VIKING" <msrvik...@.gmail.com> wrote:
> Yes, I am confused myself too. Why is there a CREATEFILE when I am
> running the backup script (posted already).
> Anyways, here is it for your quick refrence.
>
If you run ONLY this part, what happens? Just run this in Query
Analyzer:
BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT,
NOINIT, NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD,
STATS = 10
GO|||On Feb 27, 6:09 pm, "Tracy McKibben" <tracy.mckib...@.gmail.com> wrote:
> On Feb 27, 6:59 am, "VIKING" <msrvik...@.gmail.com> wrote:
>
>
> If you run ONLY this part, what happens? Just run this in Query
> Analyzer:
> BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMA
T,
> NOINIT, NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD,
> STATS = 10
> GO
I am doing that right away. I shall keep you posted on the happenings.
Subscribe to:
Posts (Atom)