Monday, March 12, 2012

Expirting a copy of DB

Hi,

I am trying to send a copy of my database to a 3rd party.

I initally thought that a simple CSV woult be the perfect solution. However, their database columns are labeled differently to mine, and also in a different order.

Is it possible to create a custom header to a csv file (so I can rename the columns), and also read from the columns in a certain order?

I waould also like this CSV to be generated automatically, at the end of every day. Is this possible?

Thanks,

Glyn.

The best solution is to backup the database and zip the .bak file and email it or put it in a CD and send it to the person with the instructions to place the .bak file in the backup sub folder in Microsoft SQL Server under programs and use the backup and restore wizard to recreate it with the restore from a device option. If you need to send data to the person daily you can use a DTS package or manual insert into. Hope this helps.|||

Thanks for the quick response, I'm not sure that this would work. Pleease correct me if I'm wrong.

The third party requires the file to have a .blm extension (I think it's a custom extension; .txt renamed)
The .blm file needs to contain a header (to show the DB columns) followed by the data, and should look something like this:

#Header#
DB_Field1^DB_Field2^DB_Field3^DB_Field4^DB_Field5^~
#Data
Row1Field1Data^Row1Field2Data^Row1Field3Data^Row1Field4Data^Row1Field5Data^~
Row2Field1Data^Row2Field2Data^Row2Field3Data^Row2Field4Data^Row2Field5Data^~
Row3Field1Data^Row3Field2Data^Row3Field3Data^Row3Field4Data^Row2Field5Data^~
...
...
...
#END#

I do not know much about backing up a databases... Which is the best way to go? CSV or BAK?

Thanks

Glyn

|||If the third party is running the same version of SQL Server all you need is the .bak file I know I have restored a .bak file from CD and emailed. And I cannot help you with CSV files because it is not RDBMS (relational database management systems) file. Hope this helps.|||

I have no idea what sort of database the third party are using. Their support people say they need a 'Data Stream' (as they call it), in the format I showd in my previous post. This format is very close to that of a CSV, which is why I was going down the CSV route.

Can anyone help with custom CSV's, or post some links to good articals??

Thanks.

No comments:

Post a Comment