Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 copy a sample database

Author  Topic 

mathmax
Yak Posting Veteran

95 Posts

Posted - 2009-07-05 : 02:50:53
Hello,

I've a problem with a table and I would like to send it to someone so that he can help me to correct a bug in a program running on it.
Just copy all data of the table into a new database doesn't fit because the program work without a bug in this case. It has not something to don with indexes because there is no indexes on this table...

I would like to send an .mdf containing this table but I cannot send the whole database. I've copied the .mdf and .ldf files and I would like to attach them to a local server, remove all table except the corrupted one and send it to my colleague.

I have several questions:
- How to attach the .mdf file ?
- Will I need the password that I originally used to access this database ?
- I would like my colleague to be able to access this database without password. Is it possible ?

Thank you in advances for any advices.

Best regards,

mathmax

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2009-07-05 : 20:52:14
Hi,
I think the easiest way would be to BCP the entire table to a text file, zip that and then send it.

If you want to pursue the MDF option, there is an option in SQL Enterprise Manager to attach a database (right click the Databases folder, All tasks --> Attach database)
I can't help with the security questions unfortunately.


Hope this helps,

Tim
Go to Top of Page

GhantaBro
Posting Yak Master

215 Posts

Posted - 2009-07-05 : 21:16:38
If it is a huge table maybe you can send subset of data through flat file and send script for table build.
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-07-06 : 03:56:04
Hi

Using SSIS you can solve this problem i hope.....
Go to Top of Page
   

- Advertisement -