October 22, 2002 at 3:58 pm
Hello everyone, our company has an agreement with another company that hired us to make a database and do their marketing and insert the results into the database. Based on the agreement, if they let us go as their marketing agency, they get just the database files. So, I am going to detach the databases, delete the databases, and remove the databases. I have some questions:
1. What does detach do?
2. After I detach a database, can I drop that database?
3. I have dropped databases before...sql server automatically removes the data/index/log files. Will it remove the detached files if I drop the database?
4. My manager wants me to make it so that the other company is not able to attach those files...any ideas?
Thanks.
October 22, 2002 at 4:16 pm
If the requirement is to be able to pass the data that your company accumulated to the customer, then I would export the data to text files using DTS or BCP, and provide this data to your customer. The database can then be dropped(I would do one final full backup for safety's sake). This will give the customer the data, but they will not be able to re-use the database your company created.
Sincerely,
Mark Cudmore, MCP
Sincerely,
Mark Cudmore, MCDBA
October 22, 2002 at 5:01 pm
1)If you detach the db, you remove the info records in sysdatabases from the master database. You still have the data files but it does'n exists anymore in SQL Server.
2)Later if you delete from windows those files, then you delete the database. (but you can do this within SQL like you did).
3)If you detach the database then you can't
delete it from SQL server because it is not there anymore, only the files in your OS, so SQL won't remove the files.
4)Anyony with permissions and the detached files can attach the database to SQL.
October 22, 2002 at 5:11 pm
Why do you want to prevent them from using the mdf? Cant imagine you'd have much proprietary code/info in a marketing db. If they can use the mdf directly that is their first choice, after that text file or whatever is ok. Part one is work hard so it never happens, if/when it does - go the extra mile to part gracefully, you'd be surprised what a small world it can be.
Andy
October 22, 2002 at 5:24 pm
Andy, I agree with you, but its not my decision.
October 22, 2002 at 7:09 pm
Who controls the database server?
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply