not enough space on C drive

mcushingmcushing Posts: 13
edited August 23, 2011 1:25PM in SQL Backup Previous Versions
I'm attempting to restore a redgate encrypted db, but my C drive space is super limited. SQL is on the E drive, and the settings I have for the server in Red Gate all point to E and F for the db and logs.

Where can I change it from C to E?

Comments

  • peteypetey Posts: 2,358 New member
    What is the error that is being raised when you try to restore the database?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • HEre's the message. It's a SQB that a company uses RG Backup Pro to create and I restore it on our server.
    BI01.sacnrm.local: Restore - Failed
    ===================================
    
    Restoring full backup - Failed
    ------------------------------
    
    This operation failed with errors.
    
    Restoring PCC-RRDB-GC (database) from:
    E:\FULL_us_gulf_multi_replica_20110707.SQB
    Thread 0 error:
    Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
    SQL error 3013: SQL error 3013: RESTORE DATABASE is terminating abnormally.
    SQL error 3119: SQL error 3119: Problems were identified while planning for the RESTORE statement. Previous messages provide details.
    SQL error 3257: SQL error 3257: There is insufficient free space on disk volume 'C:\' to create the database. The database requires 24159191040 additional free bytes, while only 8463917056 bytes are available.
    SQL Backup exit code: 790
    SQL error code: 3257
    
    
    
    Updating SQL Server information - Pending
    -----------------------------------------
    
    Operation pending.
    
    
    [/quote]
  • peteypetey Posts: 2,358 New member
    When you restore a new database, SQL Server tries to use the same directories as the original database to create the data and transaction log files. In your case, the original database seems to have part or all of its files somewhere on the C:\ drive, and there is insufficient space on your current C:\ drive to recreate the database.

    You need to use the MOVE options to tell SQL Server to create the database files in other locations. You need to first identify the logical file names of the database e.g.
    EXEC master..sqlbackup '-sql "RESTORE FILELISTONLY FROM DISK = [E:\FULL_us_gulf_multi_replica_20110707.SQB ]"'
    
    After that, you need to restore the database using the MOVE option to create the database files in other locations e.g.
    EXEC master..sqlbackup '-sql "RESTORE DATABASE  [PCC-RRDB-GC] FROM DISK = [E:\FULL_us_gulf_multi_replica_20110707.SQB ] WITH MOVE [<logical file name>] TO [<new fully qualified physical file name>], ..."'
    
    It might be easier to use the Restore Wizard in the SQL Backup GUI to specify the new locations in which to create the new database.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • I am using the Restore Wizard. that failure is on the last step when I hit finish.
  • peteypetey Posts: 2,358 New member
    In step 2 of the Restore Wizard, can you change the directories in the 'Filegroup and files' section? Some or all of the files are probably pointing to directories on the C:\ drive currently.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • is there a way to change the dir? it only allows me to put into the SQL serber data directory or the original database data directory, doesn't allow me to change it.

    Any way to change the original database data directory?
  • nevermind, I didn't see the ... on the right side:)
Sign In or Register to comment.