0

I need to attach my database mdf and ldf files to an email. In MSSQL, I went to properties--->files and found the path, pulled up the files and tried to attach them. However, the files don't upload and I get a message saying "attachment failed." I looked up the issue and found that it may be due to permission not being granted, so I changed my permissions and am still having the issue. Are there other reasons that mdf and ldf files may not successfully attach to an email?
The progress bar does not go up, so I know the files are not being uploaded at all. After about 10 seconds, the error message appears.

FreddieMercury
  • 191
  • 1
  • 13
  • 1
    Are you files still attached to to the RDBMS? You can't interact with the files while they are in use. If it's a permissions issue, you don't have permission to do that to the file(s) for a reason. But why do you want to send the database files? Why not make a backup and send it? If you don't have permission to make a back up, then you most definitely should not be sending said files (and I have concerns about what is being asked here). – Thom A Dec 20 '18 at 09:06
  • Database files have lots of empty space. It's better to take a backup (which doesn't take the database offline). Backups themselves can be compressed or you can use another utility to compress them. It's quite likely that the email client will refuse to send such a large attachment though – Panagiotis Kanavos Dec 20 '18 at 09:10
  • Larnu, the reason I'm sending them is that my instructor said I must send my mdf and ldf files by email, along with my MVC which uses that database. They didn't say why, but I could ask them. I'm not sure if they are attached to the RDBMS. I know that sounds dumb, but I'm googling it right now and will get back to you on whether they're still attached or not. – FreddieMercury Dec 20 '18 at 09:39
  • 1
    That is a *very* odd request for a tutor @FreddieMercury. I strongly suggest creating a backup and sending that. Also, to mention someone you need to include `@` at the start of their name. – Thom A Dec 20 '18 at 12:43
  • @Larnu Thank you so much for this warning. I'm glad I didn't mess with it too much yet; instead I will check in with my instructor and ask them to clarify what they want. If I sent them an MVC as a zip file but not the mdf/ldf, would they be able to run the app even though they don't have my database on their machine? – FreddieMercury Dec 20 '18 at 17:38

0 Answers0