Thanks in advance for any help.
We have a particular database on a SQL Server 2012 box along with about 20 other databases.
What I require is a method/script/audit (open minded about the solution) that will simply track anyone who logs in (successfully / unsuccessful) to this one particular database on the server (the single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.
Once we have this information we need to simply store that somehow. I say somehow as the storing part depends on the solutions recommended to me, so I’m open minded about this too.
Any help would be great as I'm scratching my head on this one.
There's actually a tool built into SQL Management Studio for this.
Please see the attached link for Configure Login Auditing
Once it has been setup, all events will be recorded in the error log.
I'm looking for a better alternative to MS Access MDb files. MS SQLServer 2012 LocalDB looks like the perfect solution. I've done some testing and it seems to do the trick.
What I need to find out is
How secure is LocalDB ?
Can it be made any more secure ?
I have an application that field workers use and would like to to be able to send them updated data files from time to time (if there are significant schema changes and or associated data) but would like the data contained to be managed by a password (and maybe username). The application (Winforms or WPF) would manage the password.
Currently I use a MS Access mdb file with database password. Its a good solution for basic security. But the performance of it isn't that good for what the app does, plus it wouldn't take a brain surgeon to crack the password and get access to the database.
Testing LocalDB gives the performance that I need but I'm just wondering if its possible to increase the security. So if someone managed to get a hold of the data file they would have a hard time accessing the data.
Any help would greatly appreciated.
Thanks all
I created a few databases within a large hosting provider network. When I use Microsoft SQL Server Management Studio 2008 R2 to connect to the SQL instance I see a list of every SQL database on the server. Is there a way I can tell Management Studio to only display the tables I have access to?
I found a few articles online that said to deny my user the permission to view the other databases. That wouldn't be an issue, except I don't think I can do that from my end. I'd like to solve my problem without having to call my hosting provider. Regards.
Unfortunately what you are asking is NOT possible at this time. I know this is NOT what you are looking for :-)
I have created a simple members database in ASP.NET with login and create account features. Can anyone give an example of the correct connection string that I would need to use to connect to this database remotely. Any answers would be greatly appreciated.
Based on the tag I'm guessing you're using SQL Server 2005. See: http://www.connectionstrings.com/sql-server-2005.
You didn't specify anything about the database (is it SQL Server, Access, MySql, etc).
much less the server name, database name, etc.
However, until specifics are posted, here is a nice general resource for figuring out your connection strings:
http://www.carlprothman.net/Default.aspx?tabid=81
I am developing a web app that connects to a SQL 2000 database. Everything works perfectly on my database (which is actually SQL 2008) but when I try to migrate it onto another server (that's actually running SQL 2000) I get some strange errors.
I'm getting Login Failed for the username that the web app uses, so I did my normal troubleshooting steps...
I reset the password to what it should be, made sure the user was mapped to the database it's trying to connect to. I connected to the database through Enterprise manager using the user name and password and was able to run queries. I reset the SQL server.
I'm fresh out of ideas other than there might be a place in my app that the password is for some reason getting changed. Is there anyway to see what password the SQL server is seeing? I just want to narrow down my search a little.
Either that or does anyone have any other suggestions on how I might be able to fix this?
EDIT: Also, the web app CAN talk to the database, it hits the database to get login credentials and it can login with no problems. The error is coming up later in the app when I try to get more information from the database, like parameters for a report or an export location.
Thanks in advance!
First, the problem is not that the login failed for a user. From your description, the login succeeded. However, you stated that you later got an exception when trying to access certain objects. This sounds like an authorization/permissions issue with the database user to which the login is associated and the objects it's trying to access. Have you tried connecting to the database using Enterprise Manager and the same credentials used by the site and executing the identical query as the web application?
Possibly your SQL server isn't set to allow remote connections?
EDIT: or your firewall doesnt have the right ports opened?
EDIT2:
If your web script is on the same server as the SQL server, the only thing that i can think of is that you have specified an incorrect password, of if you referenced the old server by name (even though it was localhost) and you have not updated it. If the web script is on a different server, check your firewall ports and ensure the sql server is set to allow remote connectioins.
EDIT3:
Appologies, i didn't see your update before i posted the last edit (EDIT2). Thomas is right, give that a go.
Not sure how you're doing your migration but you may want to make sure your sql user is not getting orphaned:
From - http://www.fileformat.info/tip/microsoft/sql_orphan_user.htm
First, make sure that this is the problem. This will lists the orphaned users:
EXEC sp_change_users_login 'Report'
If you already have a login id and password for this user, fix it by doing:
EXEC sp_change_users_login 'Auto_Fix', 'user'
If you want to create a new login id and password for this user, fix it by doing:
EXEC sp_change_users_login 'Auto_Fix', 'user', 'login', 'password'
I found the problem!
It was actually some lingering queries I had in the app. I started populating some down downs differently and the queries were never removed, as soon as I took those out the errors stopped popping up.
Still it's strange that this would not effect the app on my machine but on this other machine would cause all kinds of havok.
Thank you all for your help and suggestions, it really helped narrow down the problem. Thomas gets the accepted answer though because his suggestion pointed me in the right direction.