Showing posts with label attach. Show all posts
Showing posts with label attach. Show all posts

Friday, March 9, 2012

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.

Friday, February 24, 2012

File name includes file path in DTS Send Mail task - help

I have an issue with a DTS package. We create a zip file and then attach it to emails going out using DTS. The problem is that the attachment, when received, is named using the full path to the file, so it is quite long.

Has anyone seen this before? Is there a way out of this?

I am considering mapping a drive to the share holding the file to be named, but the fact is this will shorten the name but will still result in the path being included.

I am wondering if this is a bug, as I suspect this isn't the default behaviour.

Thank you in advance.

Davehow are you zipping the files? thru some command line statements? I dont think its related to DTS in any way.|||Are you talking about the file names inside the ZIP? or the name of the zip file?|||The files are zipped in a previous step. The values in the send mail step are dynamically set, but basically in the Add... for the attachment you get a path like:

\\computer\folder1\folder2\folder3\longzipfilename .zip

The attached file when received will be:

computerfolder1folder2folder3longzipfilename.zip

It is quite strange. The zip file name is only "longzipfilename.zip", and it is sitting in folder prior to the mail step, so I don't quite get it.

I hope that helps.

Thanks for the replys.|||It is strange, can you paste the send mail statements here? where name of the file is dynamically created.|||Originally posted by rohitkumar
It is strange, can you paste the send mail statements here? where name of the file is dynamically created.

I am stumpted. It looks like the file is displayed properly in Outlook but not in some other email clients, which makes me think this isn't a DTS issue after all. I am not at the site now, but essentially the value for the path of the file is getting passed along in the email. Since this is an intermittant problem (per Windows version or Outlook/Web Mail etc.) I don't believe it is something I can correct with any ease.