The database is too big and I could not create a .bak file. But I was able to copy datafile and logfile and need to restore that into a different server.
The database is too big and I could not create a .bak file. But I was able to copy datafile and logfile and need to restore that into a different server.
You really need to address the issue of being able to back up your database. You should make sure you set the COMPRESS option and have enough space on disk for several versions of the backup. Ideally, you also need a process that moves those backup files off that system to long term storage so you have the ability to restore the system in the event of a disaster.
You also need to make sure you have transaction log backups in place - unless you are okay with restoring to the latest backup and losing a days worth of data.
According to this thread, https://docs.microsoft.com/en-us/answers/questions/368216/a-database-with-datafile-size-418-gb-backup-is-run.html, Saha's database is in simple recovery. Which may be OK if it is for dev/test only. Less likely so if it is for production.
CREATE DATABASE db ON (FILENAME = '<path>')
LOG ON (FILENAME = '<path>')
FOR ATTACH
@ErlandSommarskog Thank you for quick response, I was able to create the database from mdf and ldf file which has missing data from 2019.
I think you are planning to move your DB from one server location to other.
https://dba.stackexchange.com/questions/52007/how-do-i-move-sql-server-database-files
14 people are following this question.