安装文件中的问题(用户可以删除数据库文件)... [英] problem in setup files(users can delete database files) ...

查看:92
本文介绍了安装文件中的问题(用户可以删除数据库文件)...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们

i为我的项目在c#vs2010中创建了一个安装项目并构建它。在目标系统中安装应用程序之后,数据库文件(db.mdf和db.ldf)就在exe文件在目标文件夹中!并且任何用户都可以删除或移动它们,因此它不好!!

如何解决这个问题?我可以创建安装项目,它只包含一个文件而不是在安装后显示数据库文件?

i希望隐藏目标文件夹中用户的数据库文件。

Hi friends
i created a setup project in c# vs2010 for my project and build it.After install the application in destination system, database files(db.mdf and db.ldf) is next to the exe file in destination folder! and any users will be able to delete or move them so it is not good!!
How to solve this problem?can i create setup project which is contain just one file and not show database files after installing?
i want to hide database files from users in destination folder.

推荐答案

在用户机器上安装数据库而不允许他访问是一个坏主意。如果它安装在他的机器上,那么他就有权做他想做的任何事情。因为,机器,操作系统,磁盘空间和应用程序属于他..



所以,让用户决定他要对数据库文件做什么。你没有权利强迫他..



1.他可能需要访问备份数据库或将其移动到另一个驱动器以获得空间。如果数据库大小增加到100 GB并且C驱动器上的空间不足,他该怎么办?格式化他的电脑???



2.如果它变得太大,他将需要访问将旧数据删除到单独的备份服务器上。



3.他可能想要创建索引和其他数据库维护任务。







最好的方法......

在您的机器上安装数据库,让应用程序远程访问它...
Installing the database on user''s machine and not allowing him the access is a bad idea. If it is installed on his machine, then he has full rights to do whatever he wants. Because , the machine, the OS , the disk space and the application belongs to him..

So, Let the user decide what he has to do with the database files. You have no right to force him..

1. He may need the access to backup the database or to move it to another drive to get space. What should he do if the database size increases to 100 GB and he runs out of space on C drive ..?? Format his computer ???

2. He will need access to remove old data onto a separate backup server if it grows too big.

3. He may want to create indexes and other database maintainace tasks.

OR

The best way...
Install the database on your machine and let the application access it remotely...


这篇关于安装文件中的问题(用户可以删除数据库文件)...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆