Tagged Questions
1
vote
2answers
89 views
Working Linked Server Query fails in sp_send_dbmail
Take the following example:
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'me@whatever.co.uk' ,
@query = 'SELECT TOP 10 * FROM LINKEDSERVERA.DATABASE.dbo.TABLE' ,
@attach_query_result_as_file = N'True' ...
5
votes
3answers
111 views
How does “Be made using the login's current security context” pass the users password to remote server
Say you have a SQL Server with a "Linked Server" to another server - said "Linked Server" is set to use "Be made using the login's current security context" as its authentication model.
How does the ...
0
votes
0answers
27 views
EXECUTE AS over Linked Servers
I have a front end that logs into the DB as "logInA", and only has permission to "schemaA" stored procs, which use EXECUTE AS "logInB", (I have also tried EXECUTE AS 'DBO'), to handle all the business ...
2
votes
2answers
70 views
Linked Server Risks
I'm implementing a new feature which requires data from databases on multiple servers. I just need to union data from all these servers and sort it. The two options that come to mind are:
Use linked ...
-3
votes
1answer
412 views
How database administrators can see my requests to MSSQL server?
I'm a MS SQL 2008 user. I have access to some tabes. I need to request few colums from table as I usually do. But I need to do it onse (for example) in 5 seconds and system administrators shouldn't ...
13
votes
6answers
528 views
Why should an application not use the sa account
My first question ever, please be gentle. I understand that the sa account enables complete control over a SQL Server and all the databases, users, permissions etc.
I have an absolute belief that ...
1
vote
1answer
120 views
“The SELECT permission was denied” only for some of my tables
In my database there are about 100 tables on 2 tables I get the following error when accessing the database by a SP (all data access uses SP):
The SELECT permission was denied on the object 'XXX' ...
3
votes
1answer
55 views
Analysis service database security at application level
I have got a SSAS Cube, we have written an windows application which would issue MDX queries to access the data from the cube and show it in the reports .
This windows application is a licensed ...
6
votes
3answers
305 views
Restrict access for Windows administrator
As the SQL Server best practices says, "Windows Authentication mode is more secure than SQL Authentication". And now I want to know: is there a way to protect SQL Server from user with Windows ...
1
vote
1answer
80 views
sp_setapprole taking 100 - 200 ms [closed]
SQL Server 2008 SP1 here.
We have a machine where sp_setapprole calls take more than 100ms and they are done many times per user operation on an application.
The developer says that in his setup, ...
4
votes
1answer
136 views
Can I retrieve all database objects owned by a particular user?
We have a user who is leaving and I need to know every database object that he owns. Is there a query that will provide this information?
3
votes
1answer
355 views
Does this mean the 'public' has full select, insert, update, and delete access?
I'm trying to create a new DB user in SQL Server 2008 R2 that can only select from one SQL View. But no matter what I try when I login as this new user I can select from any table. I ran this query: ...
5
votes
1answer
121 views
SQL Server Security Hierarchy
I have been working as a developer with SQL Server for years without asking the question, "what is dbo", a shame. Recently I have been studying the security model of SQL Server 2008. I have been ...
1
vote
1answer
65 views
Does Microsoft Security Bulletin MS11-049 affect SQL Server 2008 SP3?
The security bulletin does not list SQL Server 2008 SP3 under affected software but it came out prior to that service pack. We are running SP3 but this issue is still showing up on a vulnerability ...
2
votes
1answer
180 views
Understanding SQL Server encryption (by password)?
After asking this I still have a question.
A company need to store sensitive data. Please let's not talk about certificate right now.
A DBA does the following :
CREATE SYMMETRIC KEY ...
2
votes
1answer
676 views
Security permission to only read SSAS Cube with Excel
I have an SSAS database set up on a SQL Server 2008 server. I have a Role set up with a group of users that I want to be able to access the Cubes in that database. I set up "Read definition" and ...
1
vote
3answers
407 views
Encrypt/Decrypt output & input for SSIS task
I use SSIS packages to output the data from one system as Comma Separated Values, and then import that same data into a second system. I have a new requirement to encrypt the CSV text files that are ...
1
vote
2answers
588 views
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
One of our user from another domain WATSON received the following error message:
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'WATSON\User1'.
when he is trying to ...
5
votes
1answer
325 views
What's the difference between EXECUTE AS USER and EXECUTE AS LOGIN that makes the second one behave unexpectedly?
Recently I've been using EXECUTE AS LOGIN to check if a certain person could or couldn't use a table function in one of our databases. The tests showed that he could but he repeatedly reported ...
3
votes
2answers
996 views
SELECT permission on view querying table from another database
SQL Server 2008 R2 SP1
My company uses the Great Plains (GP) financial system with several customizations. Our Value-Added-Reseller (VAR) for GP has setup most of these customizations in a separate ...
1
vote
2answers
496 views
Login Failed for User
I have written a code in Visual Studio.NET and used data from SQL Server 2008. But after debugging, it says:
Login failed for user 'sunny'.
When I try to set the user as something else, it keeps ...
2
votes
1answer
83 views
I would like to better understand the SQL Server security model in terms of users and groups to possibly replace an XML heirarchy model I am using
I am currently using XML in my database to represent metadata for individual products. I am using the below schema to enter the data. In each sub grouping of fields you will notice the cms_name ...
6
votes
2answers
2k views
Listing the existing SQL Server Logins and Users
I know we can check the logins and the users that are defined, using GUI in SQL Server, but am wondering how we can do this check using script.
I ran the query below but it shows Principal_id which ...
3
votes
2answers
306 views
SQL Server EXECUTE AS trouble
I'm missing something while trying to make my stored procedure use EXECUTE AS. The stored procedure is reading data from source_db, aggregates it and stores result in target_db.
The sp itself is in ...
3
votes
0answers
73 views
Security implications of guest account and database chaining on sql server?
I have another database Ydb accessing data in database Kdb. They both have the same owner.
In order to allow cross database chaining, it seems I need the guest user to be enabled in Kdb.
I did so ...
3
votes
1answer
601 views
The server principal “<mydbuser>” is not able to access the database “<mydatabase>” under the current security context
When I try to install a new database, I'm getting this error from SQL Server 2008.
The server principal "<mydbuser>" is not able to access the database "<mydatabase>" under the current ...
7
votes
2answers
1k views
Can Windows Authentication logins be disabled on SQL Server 2008 (or R2)?
So we can do Windows Login or Mixed Mode, but can we configure SQL Server to only use internal logins and to block all Windows Logins?
Is the only solution to add all potential Windows logins and set ...
4
votes
2answers
165 views
How to detach a sql server 2008 database that is not in database list?
I installed sql server 2008 on windows 7 then i create a Database! after 2 days, i reinstall the windows and isntall the sql server! now i am trying to attach my database file, bot i encounter to ...
5
votes
1answer
516 views
Cross Database Chaining vs. Trustworthy Option
Recently, we had a stored proc request that required access across multiple databases. Of course this is not uncommon to have but in our case, earlier we used service accounts and this service account ...
6
votes
1answer
552 views
SQL Server, remove all users' access right to a table object
As a clean up job, I am trying to remove all users' (including non public users) access right to a single table object (apart from superusers) and will subsequently grant new access rights. Is there a ...
3
votes
2answers
155 views
Setting up users and admins with schema privileges
I currently have a database that is split into two schemas: data and ref. I have two database roles named Users and Admins. Users need to be able to INSERT, SELECT, UPDATE, and DELETE from the data ...
3
votes
2answers
710 views
What is the difference between a SQL Login and a Database User in terms of security?
I am currently working with a consulting agency to set up a new production environment. They have set up a separate SQL login for each database.
However, there is no corresponding database user ...
3
votes
2answers
422 views
How to obtain SIDs of Sql Server installed NT Service Accounts
I am using WMI to obtain members of server local groups, as well as the SIDs of the members. The WQL queries work for members that are local users, local groups, AD domain users and AD domain groups. ...
3
votes
2answers
2k views
sp_send_dbmail with attachment
SQL Server 2008, connecting via SQL Server Authentication.
I have a sproc in DatabaseA which calls sp_send_dbmail in msdb to send an email with a file attachment. The file is on the db server, not on ...
6
votes
2answers
680 views
securely exposing sql server 2008 for windows authentication
My company wants to have approximately 100 of their sales people (distributed around the country) to be able to run stored procedures from excel and return the data onto the spreadsheet.
We have sql ...
1
vote
2answers
193 views
Is it good practice to assign a system account for database owner?
I can see the owners of my databases usign this query
SELECT name ,
SUSER_SNAME(owner_sid)
FROM sys.databases
What are the things I should consider when choosing an account for database ...
5
votes
2answers
185 views
SQLAgentReaderRole and SQL AD ID login case affecting ability to edit jobs
I have AD ID users on a SQL 2008 server that can't edit their own jobs. They can create them, but in order to edit them, they have to delete them and then re-add them. The issue is explained here: ...
1
vote
2answers
1k views
MS SQL Linked Server Security failing using current security context
I have 2 instances of SQL 2008 64 bit (ver 10.0.4000) running on a windows 2008 64 bit server db03 and db03\ins2. The ins2 has a linked server connecting to db03 that was setup by replication. I have ...
1
vote
1answer
860 views
Simple Implementation of SQL Server 2008 Encryption
I am looking at using some of SQL Server 2008's encryption.
I have read the following article on MSDN:
http://msdn.microsoft.com/en-us/library/ms179331.aspx
Q1a: Is the master key password ...
3
votes
3answers
2k views
SQL Server: does ddladmin rights contain datareader and datawriter rights to the database?
Does db_ddladmin fixed database role include db_datareader and db_datawriter rights, so that you don't have to grant those rights explicitly?
3
votes
2answers
892 views
Role db_ddladmin not working properly on SQL Server 2008
I want to allow certain user to create/modify objects on a database(tables, views, sp's, functions, schemas etc) and don't want to give db_owner.
I thought I could do it with the db_ddladmin role, ...
1
vote
1answer
196 views
SQL Server Schema Security
My company uses a multi-tenant database (one database, all tables have a customerID field).
We are in the process of setting up a data warehouse and giving clients direct access. Our initial ...
5
votes
1answer
740 views
Using integrated security over VPN
We've got a client that we're going to allow to use one of our applications. Staff on site regularly connect to our network via VPN. The .Net application that connects to the SQL Server uses ...
3
votes
1answer
632 views
SQL: transfer database schema
If i want to transfer schema ownership to another schema i know that i need to use something like:
ALTER SCHEMA destinationschema TRANSFER sourceschema.objectname;
But how is it different from:
...
9
votes
3answers
12k views
How do I assign an entire Active Directory group security access in SQL Server 2008?
I would like to use integrated security with my internal application which is all on a domain. Unfortunately, I've never been able to get this to work well. I would like to assign an entire Exchange ...
2
votes
2answers
546 views
Is encrypted database possible?
I'm not a DBA but I've been asked to see if we can encrypt the data in sql server such that the admin, despite having access to SQL Server won't be able to see the data but application would still be ...
1
vote
1answer
3k views
tsql to find users and database level permissions mapped to a certificate
On SQL 2005 and above, how can I find users and database level permissions mapped to a certificate?
Story behing this:
I copied a database from SQL 2005 to SQL 2008. It had a certificate inside the ...
3
votes
7answers
10k views
Can't Login to SQL Server 2008 when running single user mode
I'm following the MS documentation here to migrate logins from one instance of SQL Server to another as part of the process described here. This involves putting the server into single user mode ...

