MDF Disk Fragmentation - Backup And Restore

Jul 23, 2005

If databases on a physical drive [G:] are fragmented, and the drive is
extended by adding more hard drives to the array, does it make sense to
backup and restore the fragmented databases?

The Windows Server should be able to find contiguous space for each
database, since it shows 75% free space on the SQL Data drive without
any file fragments on it.

Or will it restore to the original location, in which case does it make
sense to delete the databases and restore them from the backups?
Thank you very much!

View 1 Replies


ADVERTISEMENT

Does Fragmentation Changes After Backup/restore Operation?

Jul 30, 2007

Hello,
If i backup a database and then restore it, would physical structure remain the same? specially fragmentation.
I'm concerned about output of DBCC SHOWCONTIG.

Senario: I want to check if client database needs defragmentation, so he's sending db backup file. But is it possible that when i restore it fragmentation info has got lost?

Thank you.
STG Labs

View 3 Replies View Related

SQL Enterprise Manager Hangs When Choosing A Location On Disk For A Backup Or Restore

Sep 15, 2004

When I select All Actions>Backup Database and then click the ... button to choose a location on the hard drive, SQL Enterprise Manager Hangs and I have to kill it from Task Manager.

All other areas of EM browse the disk drive without a problem. (DTS, File Groups, etc.)

Anyone ever run into a similair problem?

Thanks

View 2 Replies View Related

Disk Fragmentation && SQL

Apr 14, 2004

One of my production servers has been determined to be 92% fragmented.

What's the proper procedure for defraging a database server?

I couldn't find anything very helpful in BOL, nor Knowledge Base.

Sidney Ives
Database Administrator
Sentara Healthcare

View 3 Replies View Related

Disk Fragmentation

Aug 9, 2004

What's the best way to find out if disk fragmentation on Windows 2000 Server is affecting SQL Server performance?

If disk fragmentation is shown to be a cause of performance problems, what are the recommendations for a disk fragmentation strategy? eg. use the win 2000 built in disk defrag utility or buy a 3rd party product like DiskKeeper? How much of an overhead is a product like DiskKeeper that defrags in the background?

Clive

View 1 Replies View Related

File Fragmentation And Disk Read Queue

May 16, 2008

I have a poorly performing SQL box.

I have run perfmon and the avg read queue length is pretty much permanently maxed out at 100%.

I have run a database index defrag.

On further inspection the file system is highly fragmented. There is a file fragmentation of 98% with the mdf file fragmented in 25,000 pieces. Running a standard windows defrag does not resolve this.

Two questions?

1- Is heavy file fragmentation of the MDF file a likely cause of the read queue length bottlneck?

2 - Why is the MDF file not defragmenting? Does the SQL server have to be taken offline? Is it possible to defrag a MDF file?

View 2 Replies View Related

SQL Backup (bak) Fragmentation

Dec 13, 2006

We backup a lot of SQL databases. The db admin uses SQL to dump the databases to a *.bak file on a network share, then we pick them up to tape.

The problem is that for some reason, the backup files are MASSIVELY fragmented, which kills our backup speed to tape (via Netbackup Enterprise). If I defragment the drive (via the built-in tool on Win2K3 or PerfectDisk 8) our speed to tape more than doubles (can go from 16MB/sec to 36MB/sec). However, after the next SQL backup, the drive is completley fragmented once again (around 70%).

Is there any way to improve how these files are written to disk (to keep them relatively in one piece)? For some reason it appears this is a bigger issue with the SQL backup files than any other file type. Thanks.



Jim B

View 3 Replies View Related

Restore DB From File On Disk

Sep 28, 1999

Hi,

I am trying to create a scheduled task taht will restore a database from a backup file. I do not store my backups on a backup device, but on a local disk. To restore a DB from a backup device, the following statement will work:
"Load DBName from BackupDeviceName". Does any know what statement to use to restore from a file, if the file is "E:DBName_db_dump_199909272220".

Thanks in a advanced.

View 1 Replies View Related

BACKUP To Backup Device Or Disk

Sep 25, 2000

Is there any benefit in creating a backup device and using that in the backup statement over just using a disk file in the backup statement. It seems like extra work to create the backup device with sp_addumpdevice with the file location. Whereas I could just specify the file location right in the BACKUP statement by specifying DISK as the backup device.

View 1 Replies View Related

Why Use A Backup Device Vs. Backup To Disk?

Jul 20, 2005

In SQL 2000, is there an advantage to defining and using a backupdevice versus just backing up to disk?Currently, I've got a SQL Backup job set to run once per day, withtransaction log backups running every hour. The db and backups arewritten directly to folders on an external disk array. I've neverconfigured an actual Backup Device within SQL. Does creating a BackupDevice offer any advantages not available with my current backupmethod?Thank you for any help.Jason

View 1 Replies View Related

Restore From Phisical Copy Of Disk (datafiles?)

Oct 19, 2004

Hi,
I have formatted my server because of serious problem and i did not backup my database. I have only a phisical copy of the disk containing data on another disk. :( How I can recover my db? Thank you in advance.

View 6 Replies View Related

DB Is Marked Restore Pending Which May Indicate Disk Corruption

Apr 27, 2015

i have a SQL 2008 R2 RTM production instance, in which we run dBCC CheckDB every weekend to check on the DB. This weekend this sql job returned the error:

DBCC RESULTS
--------------------
<DbccResults>
<Dbcc ID="0" Error="8928" Severity="16" State="1">Object ID 866531312, index ID 1, partition ID 72057602979266560
, alloc unit ID 72057603064397824 (type In-row data): Page (1:7650240) could not be processed. See other errors
for details.</Dbcc>
<Dbcc ID="1" Error="8939" Severity="16" State="98">Table error: Object ID 866531312, index ID 1, partition ID 720
57602979266560, alloc unit ID 72057603064397824 (type In-row data), page (1:7650240). Test (IS_OFF (BUF_IOERR, pB
UF->bstat)) failed. Values are 12716041 and -6.</Dbcc>
<Dbcc ID="2" Error="8990" Severity="10" State="1">CHECKDB found 0 allocation errors and 2 consistency errors in t
able 'tblDistpatch' (object ID 866531312).</Dbcc>

We tried to rebuild the indexes in the table: tblDistpatch...the non clustered indexes ran fine however the cluster index rebuilt returned an error:

Error: The statement has been terminated.
Msg 829, Level 21, State 1, Line 1

Database ID 3, Page (1:7650240) is marked RestorePending, which may indicate disk corruption. To recover from this state, perform a restore.in TEST environment we were able to reproduce this error by restoring latest backup.

we ran :

dbcc checktable (tblDistpatch ,REPAIR_ALLOW_DATA_LOSS )

then we ran dbcc checkdb and no errors where found.

my question comes with in your experience is this the best possible way to fix this table?only one table, but running this in production environment will required to put db in single user mode first.

View 7 Replies View Related

Transact SQL :: Backup / Restore Tools Which Can Restore Multiple Environments

Jun 25, 2015

I am looking for a SQL Backup/Restore tools which can restore multiple environments.  Here is high level requirements.

1.  We have 4 DBs, range from 1 TB - 1.5 TB Each Database.  When we restore to QA, DEV, or Staging, we usually restore 4 of them.
2.  I am looking for the speed to complete restoring between 1 - 2 hours for 4 DBs.

I am evaluating the Dephix Software but the setup is very complex and its given us a lot of issues with Windows Authentions, and failure in the middle of the backup.  I used Guess Software many years ago but can't find it on the web site any more. Speed is very important for us mean complete restoring as fast as possible.  We are on SQL 2012 and SQL 2008 R2.We are currently using NETAPP Technology and I have Redgate Backup Tool but I am mainly looking for fast Restore Process.

View 4 Replies View Related

SQL 2012 :: Restore Labelonly From Disk Running Nonstop

Jun 22, 2015

We're having some issues with where our backups write to, so I've been watching and monitoring the performance, when I noticed today that restore labelonly from disk has been running almost non stop for the past few hours.

The account running the query is the SQL Server's service account, and the program is "Microsoft SQL Server".

Every minute or so the SPID changes which made me think it was related to the transaction logs, the "restore labelonly" runs for as long as each database in the transaction log backup.

Example: Database A transaction log backup takes 1 minute and the SPID XX for restore labelonly runs 1 minute
Database B transaction log backup starts and there is a new SPID for restore labelonly.

I hope this makes sense because I normally don't see this restore labelonly running.

View 2 Replies View Related

Backup On Remote Disk

Jul 15, 2007

hi gurus,



can any bdy tell me the procedure to create the Backup Device which is a DISK OF REMOTE PC..



i want to take database backup on remote pc's disk not on local disk or tape



i am using sql server 2005



thanks



in advance

View 3 Replies View Related

Sql Server Express 2005 9.0.2047 - Problem RESTORE VERIFYONLY FROM DISK

Mar 5, 2007

Hi all

every time I try to verify the backup file I get the error:

backup set on file '1' is not valid (translated from italian).

this is my backup script:

BACKUP DATABASE [ahr_sistema] TO DISK = N'C:ProgrammiMicrosoft SQL ServerMSSQL.1MSSQLBackupahr_sistemaahr_sistema_backup_1.bak' WITH FORMAT, INIT, NAME = N'ahr_sistema-Completo Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

GO

declare @backupSetId as int

select @backupSetId = position from msdb..backupset where database_name=N'ahr_sistema' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'ahr_sistema' )

if @backupSetId is null begin raiserror(N'Verifica non riuscita. Impossibile trovare le informazioni di backup per il database ''ahr_sistema''.', 16, 1) end

RESTORE VERIFYONLY FROM DISK = N'C:ProgrammiMicrosoft SQL ServerMSSQL.1MSSQLBackupahr_sistemaahr_sistema_backup_1.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND

GO

View 5 Replies View Related

SQL Server Admin 2014 :: Restore DB With Full Backup And Transactional Log Backup

Aug 3, 2015

Need to restore database,here's the scenario:

Data got deleted on Friday evening, need to have database restored to FRiday afternoon and also some data has been entered on Monday, which needs to be there.

View 8 Replies View Related

Disk Backup Failures (file In Use)

Feb 21, 2000

I am getting occasional failures of a SQL Server 7.0 complete backup to disk on a production database. The errors seem to indicate that another process has the disk file open at the time of the backup. The errors contain the following texts : -

'Cannot open backup device'
'Operating System Error=32 Process cannot access file because it is being used by another process'.

The only other process that should access the disk file is an ARCserveIT scheduled job to copy the disk backup to tape but this is completing long before.

Any ideas or suggestions?

View 2 Replies View Related

Backup Fails To Local Disk

Nov 6, 2007

Hello,
SQL 2000 backup to C dirve fails with event 17055 Operating system error = 5 access is denied. Creating and running a backup job wizards errors with SQL State 42000, Deveice error or device off line. SQL is running as LocalSystem. The backup destination has every Windows group added with Full Control.
Thanks

View 4 Replies View Related

Backup Failing, Plenty Of Disk Space

Jan 4, 2008

Good morning,

We get frequent (1 out of 3) "sqlmaint.exe failed" errors during backups for one of our larger databases (40GB). So i removed the maintenance plan and put in a custom backup job to get a better error msg in the log:

BackupMedium::ReportIoError: write failure on backup device 'F:MSSQLmydb_2008_1_3_21_45.BAK'. Operating system error 112(There is not enough space on the disk.).

However, we have PLENTY of space on disk:
LOG DISK - NTFS - used space = 2GB, free space = 81GB
BACKUP DISK - NTFS - used space = 29GB, free space = 82GB
So even if it doubled in size, there would still be 50GB free.

Any ideas?
Thanks!!

View 6 Replies View Related

Backup On Local Disk Failing! Urgent Help Plz!

Jan 5, 2005

Folks, this is the error i get when backing up user db to local disk:

[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionRead (WrapperRead()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
10 percent backed up.

Connection Broken

If i copy a file (2gb) to local disk from network it works. The disk have much space. Any ideas;;; :confused:

I get the same error when backuping up even MSDB to a network path using UNC [\].

View 9 Replies View Related

Error When Attempting To Backup To A Second Disk File

Feb 12, 2007

In SQL Server 2005, via the GUI, I wish to backup a database to an additional disk file (there is already an existing backup disk file for this database), so that I can have more than one backup. I've added the new disk file name, highlighted it, and clicked OK.

I get an immediate error (see below). Note, the 2nd error message is specifying the existing backup disk file, not the new one I'm attempting to create.

"Backup failed for Server 'WCS-DEV-TPA'. (Microsoft.SqlServer.Smo)"

"System.Data.SqlClient.SqlError: The volume on device 'D:Program FilesMicrosoft SQL ServerMSSQLBACKUPWCS_ADV_Longmont.bak' is not part of a multiple family media set. BACKUP WITH FORMAT can be used to form a new media set. (Microsoft.SqlServer.Smo)"

Does anyone know what causes this and how to correct it?

View 11 Replies View Related

How To Restore A Database From Backup With A Splitted Backup File

Apr 1, 2008

I should restore a SQL Server 2005 Database from backup. The backup contains three files, named user.bak0, user.bak1 and user.bak2.

How is the syntax of the restore filelistonly and the restore database ... ?

I usualy write
restore filelistonly from disk = 'path and filenam.bak'
restore database. zy
from disk = 'path and filename.bak'
with replace,
move.....
move....

This works but I cannot use it with a splitted backup file. The files are much too big to put together to one file.

Thanks in advance for any help.

View 3 Replies View Related

How To Restore Database From Full Backup And Several Diff Backup

Oct 17, 2006

I have a full backup and several diff backup,now i want to restore

firstly,I restore full backup

RESTORE DATABASE ***
FROM DISK = 'D:databackup200610140000.bak'
WITH NORECOVERY
GO

it's working,then i don;'t know how to continue

Thanks in advance

View 3 Replies View Related

Is It Possible To Move My Sql 2000 Database (in C Disk) To Another Disk (Disk) ?

Dec 28, 2006

hello,all
          I am new to Sql 2000,I installed sql 2000 database in C disk,but Now I found my C disk space is smaller than before,So I want to move my databse(include data and structure)   from C Disk to D Disk(its space is very large) .
         is it possible to do it ? 
         if its can be done ,do I need to change my asp.net program source code (exp: chaneg my crystal  report connectstring ) ?
        thanks in advanced!
 
 
 
      

View 1 Replies View Related

Is It Possible To Restore From A Database Backup Without A Transaction Log Backup?

Oct 14, 2007

I neglected to backup the transaction log as part of the process of backing up the database. Now i only have the backup file for the database and no transaction log backup. When i try to do a restore on the database, i get the error on a "tail log missing" message (which i'm assuming is that it's looking for the t-log backup?).

Is it possible to restore or even restore to a new database? I'm only looking to retreive data from 2 tables within the backup file.

Thanks!


SQL Server 2005 on Windows 2003 Server x64.

View 16 Replies View Related

SQL 2012 :: Backup Database - Two Node Cluster To Local Disk?

May 12, 2015

Can we backup a DB from SQL Server 2012 (Ent. edition) two node cluster to a local disk ?. Is it possible ?

View 7 Replies View Related

Required Free Disk Space For SQL Server Backup Operations

Feb 4, 2008

What is the percentage of FREE disk space that is needed for a backup? I have backups that are failing with no disk space errors. But there is enough disk. Does SQL Server need a percentage of free space all the time?

Thanks

geri

View 11 Replies View Related

SQL 2012 :: Reclaim Disk Space By Shrinking Log File After TLOG Backup

Feb 25, 2015

I have a SQL Server 2012 DB in Full recovery mode that has never had a TLOG backup. the log is huge 200+GB.

I tried doing a transaction log backup but there is not enough space on the Disk.

How can I reclaim this log space in SQL Server 2012?

View 6 Replies View Related

Calculating COUNTER Physical Disk: AVG. DISK QUEUE LENGTH

Sep 10, 2007

If I return the Average, Minimum, and Maximum values for the counter Physical Disk: Avg. Disk Queue Length, and those values are 10, 0, 87 respectively, which value do I use to compute the Avg. Disk Queue Length for a 4 disk array(RAID 10): Average, Minimum, or Maximum? The disk(lun) is on a SAN.

View 1 Replies View Related

Get Total Disk Size And Free Disk Space

Nov 13, 2007

-- Initialize Control Mechanism
DECLARE@Drive TINYINT,
@SQL VARCHAR(100)

SET@Drive = 97

-- Setup Staging Area
DECLARE@Drives TABLE
(
Drive CHAR(1),
Info VARCHAR(80)
)

WHILE @Drive <= 122
BEGIN
SET@SQL = 'EXEC XP_CMDSHELL ''fsutil volume diskfree ' + CHAR(@Drive) + ':'''

INSERT@Drives
(
Info
)
EXEC(@SQL)

UPDATE@Drives
SETDrive = CHAR(@Drive)
WHEREDrive IS NULL

SET@Drive = @Drive + 1
END

-- Show the expected output
SELECTDrive,
SUM(CASE WHEN Info LIKE 'Total # of bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS TotalBytes,
SUM(CASE WHEN Info LIKE 'Total # of free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS FreeBytes,
SUM(CASE WHEN Info LIKE 'Total # of avail free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS AvailFreeBytes
FROM(
SELECTDrive,
Info
FROM@Drives
WHEREInfo LIKE 'Total # of %'
) AS d
GROUP BYDrive
ORDER BYDrive

E 12°55'05.25"
N 56°04'39.16"

View 16 Replies View Related

Should The Quorum Disk Be A Physical Disk Or Majority Node Set?

Nov 15, 2006

Hello,

I am trying to setup a test cluster and am having an issue. When I try to create the resource of a physical disk it takes both the drive e: and drive q: and doesn't seperate them into two physical disks as resources. This means when I try to associate the quorum disk it links the to physcial disk resource of drive e and q. Then when I try to install SQL2k5 I get the warning about installing SQL on the quorum disk. Am I missing something? Is there a way to seperate e and q onto two physical disk resources so I can specifically associate the quorum to q and the sql to e or should I be setting the quorum disk to a majority node set? Thanks in advance.

John

View 4 Replies View Related

Restore Backup

May 17, 2006

I had to replace my hard drive which was going bad.  I reinstalled Sql 2005 and now need to restore the backup that I have.  I selected Restore Database and chose From Device, and selected the backup location on J: drive and selected the backup file which has no extenstion.  I checked the checkbox next to the backup set to restore.  Click OK and then I get this error message:
Restore failed for Server
System.Data.SqlClient.SqlError: Directory lookup for the file "C:Program FilesMicrosoft SQL ServerMSSQLdataMyDB_Data.MDF" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)
I don't know why it is looking for a MDF file as this was never in the Backup folder.  Can someone please help me on this?  I thought I was doing the right thing making a backup all along and now I can't restore it! 

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved