Only Administrator can login to SQL Server - sql-server-2008

I'm using Windows Server 2003 to run a server application which utilizes SQL Express 2008. I'm also using Windows Terminal Services to host a bunch of thin clients, so I've had no need for active directory domain server and other stuff like that.
Now I have "small" problem regarding logging in to the SQL Server. Only the Administrator account can do this, even if I give my other (test) user administrator privileges by adding him to the Administrators group.
This is the error received: Cannot attach db file to database [Client 127.0.0.1]
I've already checked that the filepath is accessible by the user in question, and like I said, this works perfectly fine for the administrator user.

What account is the SQL Server itself running under? Often it may be running under a domain service account, and it may not have permission to certain folders. Also, the C: drive has progressively become more locked down in Windows with regard to SQL Server database files.

Seems I found the answer. Using SQL Management Studio i gave the "Users" group sysadmin permission for the database, now everything works as expected.

Related

Connecting to azure's "MySQL in app" database through a remote console

I have a web app in azure, of the MySQL in app type, it is a server with an instance of MySQL but the problem is that I can only manage the DB with PHPMyAdmin and I prefer to use the shell, so my question would be where can I verify the host, the user and the password that I must use to access from a console remotely?
According to this original App Service announcement for in-app MySql in 2016:
MySQL database cannot be accessed remotely. You can only access your
database content using PHPMyadmin or using MySQL utilities in KUDU
debug console.
And also
The database is protected by our sandbox environment and hence cannot
be accessed remotely through MySQL workbench or MySQL command line
tools (running on remote machine).
It would appear that this limitation is still in place.
For anyone who stumbled on this, to access the DB using PHP, use
https://name-of-your-site.scm.azurewebsites.net/phpmyadmin/index.php
Took me a while to find it,
You should get all these information looking in your Azure Portal, the "SQL Databases".
In the Overview menu, you'll get a Connection strings link with all the information you need.
Edit: and then you will be able to use this Connection Strings inside your application.

Why am I getting access denied error even though users belong to local admin group?

Environment SQL Server 2012 on Windows Server 2008 R2 on a development environment.
After installation of the Database, SSRS, SSAS (OLAP) and Tabular (Separate instance), and SSIS everything was fine and accessable.
Several weeks later, a power user (with local admin privs) reported that he received the 'Access is Denied' message when attempting to log into SSIS. This happened at very nearly the same time as when a log mount point filled up. I immediately shrunk the log and resolved the issue behind the log filling but I then also received the same message when attempting to log on to SSIS.
The common end-point to resolve this issue is the URL Connect to a Remote Integration Services Server (SSIS Service), which is to add any non-local admin to the DCOM User group. But since this user and I are both members of the local administrator group this is not a resolution. And another power user with local admin privs worked just fine prior to the issue but not after.
I performed the standard restart to no avail followed by an uninstall/reinstall of SSIS, again to no avail. My next option would be to reinstall SQL Server. Although this would be a possibility it would not alleviate having to do it all over again if the problem recurs.
Has anyone run into this or do you have any suggestions?
This will almost certainly be a DCOM issue. If you want to resolve these issues through the registry, then the keys are as follows: Sorry, I don't know the GUIDs.
HKEY_CLASSES_ROOT\AppID\{GUID}\AccessPermission
HKEY_CLASSES_ROOT\AppID\{GUID}\AuthenticationLevel
HKEY_CLASSES_ROOT\AppID\{GUID}\LaunchPermission

How do you create ad-hoc users on SQL Server 2008

I use SQL Server Management Studio to manage my SQL Server. I need to add a genericReadOnly and genericReadWrite to use when accessing it from automated vba code in Excel. The file that contains this code will be distributed to a number of people, more than I want to individually add to the server.
I've tried adding this generic user account, but get told
genericReadOnly is not a valid login or you do not have permissions.
The server admin believes that a username has to exist in Active Directory.
Is this standard, or is it a sitting that can be changed, if so how?
If you are using mixed authentication on your SQL Server, you can create a SQL Server login (via the security\logins tree on SSMS object explorer) and then a user on your database.
If you are using windows authentication only, then yes, you need an Windows login account mapped to that user.
To change the authentication mode... http://msdn.microsoft.com/en-us/library/ms188670.aspx

JustHost Cpanel - MySQL username/password access remotely

Not sure if this is the right forum for me to ask this question.
But I'm wondering does anyone having difficult using JustHost as web hosting provider in establishing remote access to their mysql database server environment?
What happened recently was that I'm trying to use mySQL ODBC driver connector via MS access to access their mysql database.
Originally I know what my username/password is and JustHost(well.. at least that's what I think they normally do) is set this similar setup for all other CPanel access such as your FTP, email, billing info, etc, etc.
Thus I tried using my username/password to logon into the mysql database via MS ACCESS's odbc connector. But I kept on being rejected to log in.
I started whether the password I used to log on my CPanel services would be different that the one used to access mysql via PHPAdmin window. Thus with that in mind, I forwarded the query to Justhost helpdeskteam.
Unfortunately they don't have a clue about this.
Thus that's what brought me here in this forum, begging this question - does anybody know what's the appropriate approach in remotely connecting mysql database environment via a web hosting provider such as Justhost.com?
Sorry for the elongated story.
Thought it would help to state the meaningfulness of my supposedly-trivial problem.
Log in to your JustHost account and scroll down to Remote MySQL. You need to add the IP address(es) of the remote server(s) to the list of Access Hosts.

connect to (local) with different windows login

I have an odd scenario.
I inherited a box that has SQL Server 2008 R2 on it already. The previous user connected to the (local) database with Windows Authentication using their Windows login.
I have a different Windows login. Is there any way for me to be able to log into the (local) database? The old user is no longer around, I don't know their password.
The easiest way is to get the other users password changed, and then login as that person, although this is only appropriate if you're connecting to a domain, using Active Directory etc.
Alternatively, if you are in the local administrators group, or can get yourself added to it, it's quite likely you can connect to the SQL Server instance as yourself with admin rights.
Finally... if you just want access to a particular database, copy the mdf and ldf files, and re-attach them to another instance.