August 2009 Entries
In most of the DBs in the server will have more space, when the backup is used to store it in the development environment or testing environment, it might not have much data, but it will occupy more space physically. To reduce the database size, then there is a way to reduce it. Shrink the Transactional Log. There are two ways of shrinking the Transaction Log. One is through Front-End and another is manual script. Front-End: Databases -> DbName. Right click on the DbName, then go to Tasks->Shrink->Files....
Basically, we need two files to restore the database. They are .mdf and .ldf files. There is another way to restore the database, if we have the database backup file(.bak). But we can restore using one file(.mdf file) as well. Here's how it will be restored using .mdf file. -- Restore Database using MDF File alone EXEC sp_attach_single_file_db @dbname = 'testerDB', @physname = 'c:\testDB.mdf' Hope this might help...