credentials stored securely in the report server - sql-server

Does anyone know the least windows account previlege to run under "credentials stored securely in the report server" option in the report manager?
I have tried to create a windows account with admin right and assign to "credentials stored securely in the report server" option but didn't work. However I enter administrator account, it works ok.. confusing.. can anyone please help?

When setting up the report Data Source in SSRS to use "credentials stored securely in the report server"; go back to SSMS, connect to the database instance, and set up a new Security login with the Windows account. Check the database and select the db_datareader and db_executor to provide read-only rights to report users.

#u07ch is probably spot on. the reason the admin account works and the other doesn't is probably because the admin is set up as an admin on the sql server, which by default grants it unlimited rights to the databases.
to fix your issue, you need to log into sql server, at the account you want to use for the report at the server level, assign it to the database/s the report access, and grant the account sufficient privileges on the database to exec and select.

Related

How to enable SQL Server instance for all Windows accounts when installed just for one Windows account

On my Windows machine, SQL Server was installed for a single user by mistake and I am not able to see the SQL Server database under Database Engine in local databases.
Can anyone please help me to access the SQL Server for all Windows account users on that machine?
Personally, I don't think that having EVERY user have sysadmin privileges on a a SQL Server is a good idea. I don't know who has access to your Server/Computer, however, it means that anyone can do whatever they want on that server, including revoking the sysadmin rights of everyone else.
Anyway, if you have to do this, the easiest way would be the use localhost's Users group, and create a login for that.
USE master;
GO
CREATE LOGIN Users FROM WINDOWS WITH DEFAULT_DATABASE = [master];
GO
ALTER SERVER ROLE sysadmin ADD MEMBER Users;
GO
Personally, however, Iwould recommend you, instead, create Login's for each user and grant them appropriate permissions (not sysadmin). Not everyone needs sysadmin privileges, and it's a bad idea for everyone to have them.

How can we assign permissions to setup SQL Server Reporting Services

In SQL Server 2012, how can we give a permission to someone to have full control to SSRS and a permission to a specific Db so they can configure and run the SSRS reports and have a full control to backup/restore their Databases but do not have control to other databases on the same SQL Server machine?
Lets say you create a sql user login called sqllogin, Leave this user's Server roles as public.
Under Login Properties section for this user in User Mapping select the one database you want them against (in the list on rightside) and choose the following roles
db_backupoperator
db_datareader
db_datawriter
db_ddladmin
Note: not all options are ticked in image.
This allows user login only to tempdb (for this example) and not the others. They might be able to see other databases but cannot access them in anyway.
More info on roles here
As far as SSRS is concerned, create a datasource mapped to this database with this sqllogin.This is not the same as permission to SSRS but only to the database they get access to.
SSRS permissions are different, I'm pretty sure the sql login cannot be used. This might be of help Authentication SSRS.
But I hope this gets you started.

Windows 8 - SQL Server 2008R2 - Set current user as admin

I am having quite a problem with SQL Server.
When I installed it, my account was not an administrator, now it is. Apparently, since it was not an administrator of the machine, it is not an administrator of SQL Server, as a consequence I cannot create databases on my machine.
Now, I am on Windows 8, so it seems like SQL Server Configuration Manager is not as accesible as it was before, I managed to run it (I THINK!) from the MMC by running the following command: sqlservermanager10.msc.
Now, can anyone help me configure my current user as an SQL Server admin so I can create databases properly?
Thank you!
if I understand you correctly, you want your account to have sysadmin rights on SQL Server. You can either do this via SQL Server Management studio, or the SQLCMD command line utility. You don't use the SQL Server Configuration Manager.
You need to login as an existing SA (or whichever the identity has the sysadmin role).
Using TSQL via SQLCMD
Run the following command (replacing domain\user with your details)
USE [master]
GO
CREATE LOGIN [domain\user] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
ALTER SERVER ROLE [sysadmin] ADD MEMBER [domain\user]
GO
Via the UI
In SQL Server Management Studio
Navigate to the Security node of the server, and R-Click & Select New Login
In the New Login dialog enter your domain user into the Window Authentication box
Then on the Right side select Server Roles and then make sure SysAdmin is selected
Then Ok that dialog and the windows account will have SA rights. This means then you can full administer the SQL Server.
It's not clear at all what's going on here, but it sounds to me like you haven't got any sysadmins if #Preet isn't correct.
The local Administrators group is not a member of the sysadmin role on recent versions of SQL Server (2005+, IIRC), and if I recall the installer complains if you try to configure it that way. Instead, when you install the instance you specify the users or groups who will be granted the sysadmin role on the instance.
If you did not do this (I think it adds the account doing the installation by default) or used an account or group which was later deleted, had the SID changed, or some similar event, then you have an instance with no sysadmin logins that can authenticate. You may be able to add one by switching the server to single user mode or minimal configuration mode (-f instead of -m).
If none of that works, then you'll have to save your database files, nuke the instance, install the instance again, re-attach your database files, and go from there.
The only other thing I can think that it might be is that the instance is somehow running as a user account that doesn't have permissions to create files in the default database or log directory, but that seems highly unlikely.

"CREATE DATABASE permission denied" error

I have installed SQL SERVER 2008 R2 on my system with Windows XP operating system installed.
Whenever I try to create a new database it displays an error:
CREATE DATABASE PERMISSION DENIED IN DATABASE 'master'.(Microsoft SQL Server, Error:262)
When you start SQL server management studio use 'sa' user and not Windows-User. Looks like Windows-user does not have permission.
Right-click and run "SQL Server Management Studio" as administrator.
Try to grant the user your loged in the CREATE ANY DATABASE Permission then try again.
Take a look at the documentation about creating a new Database
Cause of this error is insufficient permission. Give the user "dbcreater" role
Check it:
SqlSever>>Security>>Logins>>BUILTIN\Users rightClick -->Properties
-->Server Roles
...select sysadimn
If you are in a situation where you have public/view only access to a SQL database you should consider the following:
Do you have an alternate login or the sa user login credentials? If so, try this first and, if necessary, grant your other login sufficient privileges via the Security/Logins/.. section of your database in the Object Explorer panel (see Ahmet Arslan's answer).
If you have account access to another Windows user who has access via Windows Authentication, try running ssms.exe as the other user via the "runas" command. Full details and explanation here in the answer from SqlRyan.
If you have old databases from a previous Windows installation that had been configured with Windows Authentication (and you do not have/remember the sa account credentials). In this situation, you can recreate your past user account from your previous Windows installation. Be sure this new account has the same Domain and Username as your previous account. Login via the recreated account, and give your current (or "real") user account sufficient permissions (see #1. above). Once you confirm that you have restored access, you can then delete the recreated user account.
With this problem, I noticed I was connected using Windows Authentication. I then disconnected and used SQL Server Authentication. It is good now.
first you will login on windows authentication
then you will click on login (sa) properties and server role check in db creater then ok click then error is solved and after login within sa and create a database

Remote sql server usage?

I've a user account on a development SQL express on a remote server. This account has all privileges granted to it but when I use SQL express remotely then I'm not able to make changes to tables. If I log into the virtual machine and sign in with same user I can make changes.
It says I'm not database owner or system administrator. I think I may need to use ownership chaining or somehow designate my user account as administrator?
Thanks.
This is what I'm seeing:
http://fogcreek.com/FogBugz/kb/errors/SysAdminRole.html
I'm using SQL Server Authentication but I'm not the owner but have 'grant' all rights.
Got it! This explains how I can add my user to the appropriate role and that fixes the problem.
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1061781.html?tag=mantle_skin

Resources