When restoring a new database in SQL sever2000, the following error occurs: ODBC sqlstate: 42000.
Source: Internet
Author: User
The disk space of the restored database file is insufficient.
You can use the following statement to query the number of files in the restored database, and the size of these files. After restoration, the files will be placed on that disk.
Restore filelistonly from disk = 'C: \ backup file name. Bak'
If you want to put the data file on another disk with enough space, use the move option to change the location of the restored file.
Restore database name from disk = 'C: \ backup file name. Bak'
With move 'logical file name' to 'C: \ AA. MDF '-- the logical file name can be queried using restore filelistonly. c: \ AA. MDF is the location and file name after the logical file name is restored.
If you are sure that your disk space is sufficient, the partition format may be a problem. For FAT32/16 partition formats, they support a maximum file size of 4G/2G, you can convert the partition format to NTFS.
Or restore the database in the Enterprise Manager.
Enterprise Manager
-- Right-click "Database"
-- All tasks
-- Restore database
-- Enter the restored database name in "Restore to Database"
-- Restore select "from device" -- select device -- add your backup file -- OK, and return to the database restoration page.
-- Backup number -- Select Content -- select the backup content you want to restore
-- Option -- change the physical file name in "move to physical file name" to the name of the data file to be stored.
* *********** Modify here
-- If the database to be restored already exists, select "Force restore on the existing database "-
-OK
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.