SQL Server 2008 :: Finding Permissions That A User Have

May 4, 2015

Is there anyway to find the permissions assigned to user. What level of access the user has in each db and the tables & is he able to see jobs. Each object and permissions

View 6 Replies


ADVERTISEMENT

Finding All SQL Users Permissions And Access On Every Server And DB?

Sep 18, 2007



Hello team, I have learned quite a bit from everyone here. I have decided to post a question for you guys and see what the best method is. Our Sr. DBA has asked me to get a list of all of our users permissions on all of our databases. We have about 20 SQL servers some of which have more databases and instances than I have fingers and toes. Can anyone recommend any solution to this problem? Perhaps there is a script I can download/write which will help me on this? Thanks in advance.

View 10 Replies View Related

SQL Server 2008 :: Finding Column Within All Tables In DB

May 1, 2015

I am trying to find a way where I can search for a column that is associated in all tables of the database. I have created a query but is not executing correctly.

SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t8
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%Status%'
ORDER BY schema_name, table_name;

View 3 Replies View Related

SQL Server 2008 :: Finding Tables With No Createdate?

May 4, 2015

In our Production db we have all most all tables have the column created or createdate.

I need to find out all tables without the created or createdate column

SELECT t8.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t8
INNER JOIN sys.columns c
ON t8.OBJECT_ID = c.OBJECT_ID

[code]....

View 2 Replies View Related

SQL Server 2008 :: Finding All Relations Between Tables?

Sep 1, 2015

Below I have a query which list the relations (constraints) between tables.

I want to list all the relations which are visible in the Database Diagrams.

The list is not complete. How do I get a complete list ?

--
-- Query to show the relations (constraints) between tables.
-- This does not show the complete list
--
SELECT A.constraint_name,
B.table_name AS Child,
C.table_name AS Parent,

[Code] ...

View 4 Replies View Related

SQL Server 2008 :: Finding Only Fields That Don't Match In Two Different Tables

Feb 12, 2015

I have two table People and Employee, both have firstname and lastname as fields

I want to display only the names that don't match on firstname and lastname

View 3 Replies View Related

SQL Server 2008 :: Finding Database Connections Not Visible

Jul 15, 2015

I need to find a way to identify SPIDS where queries are connected to certain databases using the 4 dot notation instead of actually being connected to the database in question.

For instance, I connect and my default database is MASTER. In MASTER, instead of typing USE MyDb ahead of my query, I just type my query as:

SELECT Col1, Col2
FROM MyDB.dbo.MyTable

The above is the simple scenario. We usually have queries connecting 3 or 4 user dbs together. So database1 might have a query pointing to database2. What I need is a way to identify the SPIDS that are connecting to database2 despite being in database1.

View 4 Replies View Related

SQL Server 2008 :: Finding Backup File Size In Advance?

Mar 8, 2015

My backups are failing sometimes.My db size is around 400 GB and we are taking backup to the remote server. Free size available on the disk is showing 600 GB but my database full backup run more than 10 hrs and failed. The failure reason is there is not enough space on the disk.

What could be the possible failure reasons? It has more than the the database size on the backup server but why it is showed that msg on the job failures. I noticed same thing occurred couple of times in the past.

Is there any way to find how much the backup file will be generate before we run the backup job?

i.e. If we run the full backup of test1 database now, it will generate ....bak file for that test1 db

currently we are using maintenance plan and with compression (2008R2) and the database has TDE enabled

View 3 Replies View Related

SQL Server 2008 :: Finding Multiple Character Occurrence In String

Mar 24, 2015

I am trying to figure out how I can find the names of people who have a double occurrence or more of characters either in their first name or last name.

This is for a data cleanup.

CREATE TABLE #Names ( FIRSTNAME VARCHAR (20), LASTNAME VARCHAR (20))
INSERT INTO #Names VALUES
('Thomas', 'Hohner')
,('Mike', 'SSmith')
,('TtTony', 'Hawk')
,('Jeff', 'Smith')
,('ZZSara', 'Jones')
,('Luke', 'HendersonZZ')
,('Lily', 'PPadZZZ')

SELECT * FROM #Names
DROP TABLE #Names

View 9 Replies View Related

SQL Server 2008 :: Not Finding A Record With A Space In The Middle Of String

May 19, 2015

Ok following scenario

create table dbo.ADAssets
(Computername nvarchar(max))
insert into dbo.ADAssets
values
('AIRLBEOF3565 CNF:4e926e06-6f62-4864-aebd-6311543d',
'AIRLBEOF3565')

So if execute the following

select Computername
from dbo.ADAssets
where Computername like
'AIRLBEOF3565%'

I get both records,but if I do this

select *
from dbo.ADAssets
where Computername in
(
'AIRLBEOF3565 CNF:4e926e06-6f62-4864-aebd-6311543d',
'AIRLBEOF3565'
)

I only get AIRLBEOF3565

So the big picture is that I need to compare 2 tables to find records that match & don't but that I get matches that shouldn't be & matches that aren't.

View 4 Replies View Related

SQL Server 2008 :: Finding Connection String For ChefTec Software

Jun 16, 2015

This question is a long shot because it requires familiarity with a specific application called ChefTec which is a program for the restaurant industry, but I'm giving it a try because I have nowhere else to go to get the information I need. I am the developer for a competitor of this program, and some ChefTec users want to switch to our product and have their data, which is in SQL Server 2005 or 2008, converted.

My plan is to create a utility that the users could run to convert the data (written in Delphi, though that doesn't really matter). The problem is that I can't determine the connection string that ChefTec uses. It doesn't seem to be stored anywhere obvious (an ini file or the registry). When ChefTec is installed it either installs SQL Server or gives the option of using an existing instance, but there's no way for me to know how it was set up on any given machine. The program must be using some internal logic to create the connection string but that's not accessible to me.

View 2 Replies View Related

SQL Server 2008 :: Creating And Transferring Permissions?

Mar 24, 2015

I have existing domain users with SQL logins and having different set of permissions, we are migrating to new domain, and we have new user ID's with new domain. Is there any way through query I can create an user and copy the permissions.

View 0 Replies View Related

SQL Server 2008 :: Restore / Backup Minimal Permissions

Nov 3, 2010

We use Netbackup for our SQL servers to backup and restore databases. I would like the service account used by Netbackup to have as limited permissions as possible. The account should be able to backup and restore a db without being able to read any of the content. Right now the account jobs fail if the service account is not in the sysadmin role.

I removed the account from sysadmin and limited it to dbcreator and public but the job fail.

How to setup an account so that people who know the service account password can't log in with that account and read db information?

View 9 Replies View Related

SQL Server 2008 :: EXECUTE SP Permissions For Child Database

Feb 19, 2015

I have a database which contains a stored procedure. The stored procedure contains an update script to a different database. The user group have access to the database that stores the stored procedure but do not have update rights to the database that contains the data that is being updated.

Therefore, every time the user group executes the stored procedure it fails because the security permissions do not propagate to the next database.

Is there anything I can do to get around this without grant dbo permissions to the whole user group.

View 2 Replies View Related

DB Engine :: Finding User Who Updated The Table Last In Server?

Sep 22, 2015

How can i find the users of the table who updated it last (or) Owner of the table not the schema

View 4 Replies View Related

SQL Server 7 Ignores User Permissions

Jul 20, 2005

I am having a problem restricting write access to tables in my database.In my database I have a table called, for the sake of argument, 'TableX'.In my SQL Server Logins, I have set up a login for 'Domain Users' using NTauthentication, and a login called 'FullTableX', using SQL Serverauthentication.I have added two users to my database relating to the above logins.I have added a role to my database called 'ReadTableX' with 'Domain Users'as a member of this role. 'ReadTableX' has SELECT permission only on arestricted set of tables.The only other role that 'Domain Users' is a member of is 'public', and'public' has no permissions on any of my tables.The user 'FullTableX' is a member of 'public', 'db_datareader' and'db_datawriter'With the above settings, I would expect user 'FullTableX' to have fullaccess (Select, Insert, Update and Delete) on all my database tables (so farso good), but any user connecting to the database with NT authentication(via ODBC System DSN) should only have read access to the limited set oftables. However, what is happening is that NT authenticated users also havefull access to all of the tables.What am I missing here??

View 3 Replies View Related

SQL Server 2012 :: Finding What Table A User-created Statistics Is Located?

Feb 21, 2014

I can easily find user created stat in a databaseSELECT * FROM DB.sys.stats WHERE user_created=1But how do I determine what tables those stats are in? with over 6000 tables I don't feel like looking through all the tables.

View 2 Replies View Related

SQL Server 2008 :: Granting Explicit View Definition Permissions On Stored Procedure To DBO?

Mar 6, 2013

The developers in our shop have a need to explicitly grant view definition permissions to themselves on stored procedures they create in their development databases. They have dbo level permissions in these databases and although they can explicitly grant view definition permissions to other developers in the same database, they are unable to do so for themselves. When they attempt this, it appears that they are successful but when they check the stored procedure afterwards the permission is not there for themselves.

While this does not cause an issue in development, the intention is for these view definition permissions to be carried forward to the test and production databases where they only have datareader permissions.

When these stored procedures are scripted out by the dba to move to Test and Production the view definition permissions are not scripted out for the developer in question.

Is there a way that a developer with dbo rights in a database can explicitly grant themselves view definition permissions on a stored procedure they create as dbo?

View 9 Replies View Related

Setting Permissions In Sql Server 2005 For Asp User Account

May 15, 2006

How would Set permissions  Sql  Server 2005 so that I can access a  asp page created in VWD and Sql Express.
 
On the production server i have just the one instance of Sql
 
I have the following connection string in the web config file:
 
<connectionStrings>
        <add name="ConnectionString" connectionString="server=serversNameXPRESS;uid=aspuser;pwd=aspuserPassworkd;database=DATABName" />
    </connectionStrings>
 
The account i setup to access the db in Sql 2005 Proper on the Production serve is Represented by the name in the above example as “aspuserâ€?. I created this user in security, logins. And  I gave permissions to this on the Db level “create procedure  delete, select, update insert.â€?
 
I get a error when i run the page in the browser that  says “login failed for aspuser.â€?
 
I know virtual directory is configured properly. I can run aspx page in the directory with out a db connection, without and error.
 
Any help would be greatly appreciated.

View 2 Replies View Related

SQL Server 2000 TempDB User Losing Permissions

Jan 15, 2007

I am supporting a system that needs to allow users to have access to TempDB.

I set these users up using the GUI, but whenever the server is restarted, these users permissions are wiped out and the db_owner permission is lost and I have to manually go in and apply the permissons for the database to work again, it happens on most reboots but not all.

Is there anyway to keep these users permissions when the server is rebooted?

Your help is most appriciated.

P.S Could I create a stored procedure that when ever the Server is rebooted the procedure would recreate these permissions?

If I need to do this how would I go about doing this?

View 8 Replies View Related

SQL Server 2014 :: How To Give Permissions To Specific Schema Only For A User

May 20, 2015

I created a new login and then created a new user [COM] in DB with default schema pointing to [COM]

I created then schema [COM] WITH AUTHORIZATION [COM]

I want this [COM] user to have all permissions it needs on [COM] schema only. How do I do that? When I try to create table [Com].Table it gives me permission denied.

What am I missing?

View 9 Replies View Related

SQL Server 2008 :: Finding Beginning Date From Multiple Lines Of Date Ranges?

Mar 20, 2015

I am trying to find a beginning date from multiple date ranges, for example:

RowNumberidBegin dtEnd Dt
107933192014-09-022015-06-30
207933192013-09-032014-09-01
307933192012-09-042013-09-02
407933192011-09-062012-09-03

For this id: 0793319, my beginning date is 2011-09-06

108203492014-09-022015-06-30
208203492013-09-032014-09-01
308203492012-09-042013-09-02
408203492011-12-122012-07-03--not a continuous date range

For this id: 0793319, my beginning date is 2012-09-04

108203492014-09-022015-06-30

For this id: 0820349, my beginning date is 2014-09-02

To find continuous date, you look at the beginning date in row 1 and end date in row 2, then if no break in dates, row 2 beginning date to row 3 end date, if no break continue until last date There could multiple dates up to 12 which I have to check for "no break" in dates, if break, display beginning date of last continuous date.

View 9 Replies View Related

Deploy Fails Telling Me The User Don't Have Permissions, But The User Listed Isn't Me!

Aug 8, 2007

I'm trying to deploy a project that I deployed yesterday just fine, but today I get the following error:


------ Deploy started: Project: Point Reports, Configuration: Debug ------

Deploying to http://reporting.companyname.com/reportserver

Deploying data source '/Data Sources/Srv24.FieldResponse2_1'.

The permissions granted to user 'DOMAINharley.p.bartman' are insufficient for performing this operation.

Deploy complete -- 1 errors, 0 warnings

This seems like a basic permission issue, except I'm not logged in as the user listed! I've never logged into my computer as the user. I did log in to the reporting services website yesterday as that user, but since have rebooted my machine and logged into bothe my computer and the reporting services website as me. Yesterday this report deployed fine. Today, this error message. I've even tried creating a new project and just creating a simple datasource and deploying just that, but still this message! Where is Visual Studio storing and reusing this user name during my deploy process???

View 4 Replies View Related

DTS Designer Task: Copy Server Objects. What User Permissions Required?

Nov 6, 2006

I'm making a copy of some tanles between 2 servers.

Server 1 requires a sql login

Server 2 is using Windows Auth.

I have a user on server 1 named "odbc" able to log in.

however my copy task fails, when I drill the error, it's lists the first user in server 1 alphabetically as the failed login???? but in my dts I am specifying the "odbc" user and password.

I think I have a permissions problem on server 1. So my Question, what minimum permissions does user "odbc" need to copy a table?

On server 1 I can copy from northwind to server 2 just fine..but any other db on server 1 causes the weird failure with the wrong username.

Any Ideas? I am not a DBA obviously :)

Thanks,

Carl

View 1 Replies View Related

How To Give Permissions To A Regular Domain User To Manage SQL Server Database Service?

Jan 22, 2008

After SQL Server 2005 Database Engine is installed by domain administrator, how to give permissions to a regular domain user so that user can control SQL Server Database service?

View 3 Replies View Related

SQL Server 2008 :: Script To List All Database Level Permissions In A Database?

Aug 4, 2015

I found this script online..

SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission]
FROM [sys].[database_permissions] sec
JOIN [sys].[database_principals] prin
ON sec.[grantee_principal_id] = prin.[principal_id]
WHERE sec.class = 0
ORDER BY [User], [Permission];

but the results are this: 2 columns - User and Permission

User Permission
User1 GRANT CONNECT
User2 GRANT CONNECT

IS there a way in SQL Server (2005/2008/2012) to run a script against a Database that will show all users that have permissions to that Database and the type of permissions?

View 7 Replies View Related

SQL Server 2008 :: Why User Hostnames Showing As Various

May 6, 2015

Several apps connecting to a SQL 2008 server show the users having a hostname of "Various" when doing an sp_who2 or looking at relevant DMVs.

I joined dm_exec_sessions to dm_exec_connections and was able to get the IP addresses and they resolve back to real clients. So why they'e not displayed and I see "Various" instead?

View 0 Replies View Related

SQL Server 2008 :: Notify Only If There Are Certain Blocks By Certain User

Jun 12, 2015

I'm trying to set the query to send email ONLY when it returns records of blocks and i cant seem to get this going.

declare @blocks varchar(max)
set @blocks = (SELECT spid,
sp.[status],
loginame [Login],
hostname,
blocked BlkBy,
sd.name DBName,

[Code] ....

View 1 Replies View Related

SQL Server 2008 :: Create User For A Login

Jun 26, 2015

I am using a SQL server 2008 database.I am working on a windows user.I noticed when I create a user in a database for a login, even that login does not exist in the database, the user is still successful created.I suppose it should error out.

Or I miss something?

I am using this script:
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'mydomainmyuser')
CREATE USER [mydomainmyuser] FOR LOGIN [mydomainmyuser] WITH DEFAULT_SCHEMA=[dbo]
GO

View 6 Replies View Related

SQL Server 2008 :: Same SP In Master And User Database

Aug 31, 2015

If i create same sp on master and myDB (sp_XYZ with dbo schema) and run exec sp_XYZ which sp_XYZ will execute ,the on master or myDB?

And second question:if i create sp_XYZ in master database only and run exec sp_XYZ from myDB would it execute?

View 4 Replies View Related

SQL Server 2008 :: SSIS Copy File From SharePoint Library Using File System Task Permissions?

Jun 19, 2015

Historically I've always written a VB script to copy a file from a sharepoint library. I don't like this method because I have to input a username & password in the script and maintain a config file.

Yesterday I was playing around with using a file system task. The sharepoint file has a UNC path so why not? I created a simple test package with a single file system task that copies the sharepoint file (addressed via UNC) to another network location. Package runs fine locally.

I try running on our utility server but am getting a "The file name [SHAREPOINT UNC PATH] specified in the connection was not valid" error. Package is running with a proxy on the server and the proxy account has the same permissions to the sharepoint site (so far as I can tell) as me.

View 0 Replies View Related

SQL Server 2008 :: Move Tables And SP From Master To User DB

Apr 28, 2015

I just notice that my MASTER database has some user tables and user SP ..and I am thinking to move them to 1 new user database but I am worried it will break something ..

What should I do ?

Moreover I wonder why Transaction log of MASTER can be full ( The recovery model is simple ) It should be fine , isn’t it?

View 5 Replies View Related

SQL Server 2008 :: Allow User Only Alter Stored Procedure

Aug 10, 2015

I want that I will allow a user only to select data from any object and only to alter an existing stored procedure or view. That user can not drop and create any stored procedure and view.

I can assign that user db_datareader role, grant view definition but if I grant alter permission, that user can create, alter and drop any stored procedure and view.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved