.Net Database files, can they be locked?

I have just started learning on my own, about ASP .NET and VB .NET databases.

I am wondering if the database itself could be somehow locked on the server?

For example if a remote user tried to access the database files itself, is there a password or something that can be setup.

Can this password be bypassed if they are accessing directly?

What is the password to the database is lost, is all the data lost?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

polkadotAuthor Commented:
Also, what are good resources online or text book, that I can read to learn more about the questions I'm asking.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Are you using an Access database? There are no ".NET databases", but instead your .NET program would connect to an external database.

If you're using an Access db, then you can set a Database Password. Using Access, open the database and click Tools - Security - Database Password.
polkadotAuthor Commented:
I'm not really sure what kind of database, but I guess I'm thinking of whatever is standard to be used in a C# .NET application on a  SQL Server
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
First order of business would be to determine exactly what type of database you're dealing with.

SQL Server is a database engine, and that's typically the default db used with .NET apps ... if that's the case, then unless your user has a username/password to the DB server they can't get to it.

polkadotAuthor Commented:
So the server is password protected, but not the database itself?

Is there a way to password protect just the database, not the server?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Again - it would depend entirely on what database engine you're using ... you can password protect a Jet database (which is the default engine used by Access), but AFAIK you cannot password protect a single SQL Server database.

With SQL Server, users must be able to login to the server in order to view the information ... and there really is no "design view" on a Server unless your users are running Enterpriser Manager, or some 3rd part software that would allow them to view the design and such.

Note that SQL Server can be set to allow Windows Authentication, which would basically allow any Windows user account to log into the the server. You could, however, further protect your individual database in that scenario by adding User/Pass authentication ....

I'd urge you to first determine exactly what database you're dealing with, then read up on the basics of that environment.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.