SQL Server 2008 :: Restrict Resources Usage Based On Individual Databases In Resource Governor?

Aug 12, 2009

How to restrict resources usage based on individual Databases in resource governor?

We have many databases in one instance; I would like to restrict resource usage to each database respectively.

I created 2 pools as pool_login, pool_DBNAME, and 2 workload groups as GroupLogin,GroupDBNAME, and also the classifier function.After setup above, I use following statement to check what sessions are in each group .

Even if there are spids which are accessing database DBNAME, I can’t see that they fall into the group GroupDBNAME and pool pool_DBNAME.

SELECT s.group_id, CAST(g.name as nvarchar(20)), s.session_id, s.login_time, CAST(s.host_name as nvarchar(20)), CAST(s.program_name AS nvarchar(20))
FROM sys.dm_exec_sessions s
INNER JOIN sys.dm_resource_governor_workload_groups g
ON g.group_id = s.group_id
ORDER BY g.name
GO

Following is the code to create pool, group,classifier function:

USE master
GO;
-- Create a resource pool pool_login.
CREATE RESOURCE POOL pool_login
WITH

[Code] ....

-- Create a workload group to use this pool.

CREATE WORKLOAD GROUP GroupLogin
USING pool_login;
GO
CREATE WORKLOAD GROUP GroupDBNAME
USING pool_DBNAME;

[code]....

-- Register the classifier function with Resource Governor.

ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION= dbo.rgclassifier_v1);
GO

View 6 Replies


ADVERTISEMENT

SQL Server 2012 :: MAX Degree Of Parallelism Option Not Working In Resource Governor?

May 29, 2014

I am running a query on SQL 2012 Server with the Resource governer setup for my account to have Max DOP option set to 1.

The query still runs in about 1 minute and the execution plan still considers parallelism.

When I explicitly mention the OPTION (MAXDOP 1) , the query runs in 6 seconds.

How can i tell by querying DMV's whether my query is using parallelism or not?

View 2 Replies View Related

SQL 2012 :: Using Resource Governor To Limit A Specific DB?

Jan 13, 2015

I was looking for a little insight on Resource Governor. I have a request from my manager to limit the resources a certain third party's DB can use on our system. We allow them to keep a DB on our SQL 2012 server so they can run query's to compare data to their server without linking the two machines.

I was looking into resource manager to perhaps accomplish this task but I'm not real familiar with it. If Resource governor can be used to only allow a DB named UserDB1 to use only 1GB or Memory at any one time?

Or perhaps there is another way aside from Resource governor?

View 2 Replies View Related

DB Engine :: Resource Governor Classifier Function Script

Aug 7, 2015

I want to create a classifier function where I can restrict all the logins except two logins for the resource pool.

Case Scenario is : I am creating a resource pool and on that pool I want to restrict the users for that particular pool but I want to allow some of the user IDs full access to that databses so how could I create a script for that scenario.

View 4 Replies View Related

Resources Usage

Oct 20, 2005

Hello, I need to know how to see the cpu and memory usage per session, and the cause (What query is causing It)

View 2 Replies View Related

Cursor Resource Usage

Jun 16, 2000

I use cursors inside stored procedures, they are generally 20 - 50 records. I have been told that cursors are very resource intensive. Am I setting myself up for scaling problems when we have hundreds of users all running these procedures? The cursors are only used within the context of the stored procedure. Any opinions/insight on this would be appreciated.

Mike

View 4 Replies View Related

Fuzzy Grouping Resource Usage

Nov 21, 2007

I have a few questions about the amounts of resources used by the fuzzy grouping transformation. I am running a little less than 5mil records through a fuzzy grouping that exact matches one column and fuzzy matches one. The server executing the package is a dual-core xeon with 2gb ram, running a default instance of sql 2005 enterprise.

I have been attempting to execute this package for a while now but it keeps erroring out for various reasons. At first, it was from a lack of available memory. I limited the memory usage of sql server to 256mb and set the buffer temp storage path, which alleviated those errors. However, now, my tempdb transaction log is growing significantly. It failed once for not being able to grow and reallocate quickly enough, but enlarging the auto-growth factor fixed that. Then, it filled up the volume the tempdb log was on, so now I have moved it to the san and am about to try again.

I was wondering, does anyone have a general idea on approximate resource usage by fuzzy grouping? Specifically, is there an approximate relation between the number of records grouped and the amount of ram/pagefile required? Also, on the database backend, how big can I expect the tempdb data/log files to get?

View 5 Replies View Related

SQL Server 2008 :: Case When Select - Restrict View?

Oct 29, 2015

The below would work if all of the values in A.Value were numbers but they are not. So I need to restrict the view to only look at the following measures but still show all the other row.

WHERE [Measure] IN ('RTT-01','RTT-04','RTT-07')
SELECT
M.[Description]
,A.*
,M.Threshold
,M.[Threshold Direction]

[Code] ....

Is there any way that I can create a select statement in the case when to only look for them measures that I know contain numbers?

View 9 Replies View Related

Remote Access To Individual Databases

Jan 17, 2008

I have SQL Server running on our web server located at a managed hosting site at Rackspace. I've got some developers who are going to be editing various sites and will need access to specific databases. Is there something built in to MSSQL, or a third party app, which will allow for this kind of remote access? They will be doing everything from restructuring these DB's to just inputting data.

Thanks!

Chris Sanders

View 8 Replies View Related

How To Restrict Users To Particular Databases

Dec 16, 2006

While web hosting I use Sql Server 2000 as the database. Imagine I have hosted 3 Web Sites. All these 3 users want to modify/update their designs. What I did is I created respective 3 users having access to the respective databases only. So that they can registerd the ip and add to the Sql Server 2000 Enterprise Manager. These users are able to access their own databases only. But all these 3 users are able to access the default databases like master,pubs etc. How to restrict this.

Also suggest which is the optimal way to give control to the respective users while using Sql Server 2000.

====Suresh, P.R, Postal Training Centre, Mysore.

View 2 Replies View Related

SQL Server 2008 :: CPU Usage Relative To Each Database

Feb 26, 2015

I am looking for the script to find the CPU usage for each database like this

Test1DB76.00%
Test2DB12.00%
Test3DB1.21%
Test4DB20.08%

View 4 Replies View Related

Restrict Results Based On Top 10 People With Enquiries?

Sep 26, 2013

I am trying to write a report that gives me a list of all enquiries based on top 10 people who received it the most.

The fields are:

enquiry.enquiry_number
enquiry.enquiry_time
officer.officer_name

What I want to do is run the report which details each enquiry each officer has received but stop running once top 10 officers have the most enquiries are in the results.

The officers are identified using the officer.officer_name field, enquiry.enquiry_number field shows each enquiry record.

View 5 Replies View Related

RESTRICT FILTERS BASED ON USER LOGIN

Jan 18, 2007

I am using a SSAS cube as my data source for my reports. I have set up the roles on the cube and that works fine.

However, in my reports I want to be able to restrict the report filters based on the user that logs in.

E.G. we have a list of users from different countries. if a user from the US logs in then the country filter should have only USA in it. If a Japan user logs in then the country list should have only Japan.

Currently, the country filter still has all the countries but the logged in user can only get data for his country. I want that list to only be populated with user country only.

I think it has something to do with the dataset that is populating the country list but I have no idea as to how to fix it.

Any help will be appreciated.

View 1 Replies View Related

Best Table Design For Time Based Resource Management

Feb 26, 2007

Frank writes "Any suggestion on the best design to store data for resource management so that data can be displayed afterwards in something like a gantt chart.

For example, you have to asign resources, say personID 1 to 100 to fill positions A, B, C, D, E and F

A position must always be filled. A person can only fill one position at a time. You want to be able to detect overlaps when you do your planning.

So if person 2 is in position B from 1 Jan to 15 March, he is currently unavailable, but he should be availabe in my planning for any position from 16 March onwards etc.

Possible queries -
1) list all positions not filled during period XXXX to YYYY
2) List all persons available to fill a certain postion during period XXXX to YYYY
3) List any overlaps where a person is assigned to different postions during overlapping time frames..."

View 1 Replies View Related

SQL Server 2008 :: Usage Of Built-in Functions On Columns Ignores / Excludes Indexes On That Column?

May 25, 2015

Somewhere i read..that in SQL Server...usage of Built-in Functions on Columns, makes query optimizer to ignore indexes on that column...!

So lets say we have table EMP with Emp_id and Emp_Name....

Also we have Non-Clustered index on Emp_Name.

So following query would NOT use Non-Clustered index on Emp_Name column.

SELECTLEFT(emp_name, 3) as emp3
FROMdbo.EMP

Is this true? i am using SQL Server 2008.

View 4 Replies View Related

Integration Services :: How To Split Excel Workbook Into Individual Sheets Using SSIS 2008

Jun 29, 2015

How to split excel workbook into individual sheets using SSIS 2008 without using  " Microsoft.Office.Interop.Excel"

The Workbook need to be broken into multiple sheets available in the workbook.

The SSIS package will read the excel workbook and split into individual sheet  and rename the sheet with the name available in the workbook..

View 6 Replies View Related

SQL Server 2008 :: Grant Access To All Databases

Nov 18, 2010

I have around 600 databases in my server, a user need select access of all the databases. will i have to go one by one in all the dbs and create that user and give datareader role to him. or is thr any shorter way to do so????

View 8 Replies View Related

SQL Server 2008 :: Shrink System Databases

Apr 28, 2015

I have some questions :

1.Is it OK to shrink Master, model ? the transaction log for those databases are full .
2.Is it OK to set the Recovery model of Database MODEL as SIMPLE ? at the moment it is in FULL recovery model and the transaction log is Full too

View 1 Replies View Related

SQL Server 2008 :: Script To Find A Value In All Databases?

Aug 4, 2015

Script to find a value in all databases ? for example I want to find a value contain word “ SQL” in all databases so I will get the information in which database and which table it exists.

My script is only for finding a value in one database.

View 8 Replies View Related

SQL Server 2008 :: Enabling TDE On Databases Which Are Used For Log Shipping

Sep 15, 2015

I have log shipping enabled on databases(primary and secondary) and works fine. I need to implement TDE on the database. I have experience on implementing TDE on databases which are not used for log-shipping.

What are the steps needed to setup TDE which are involved with log-shipping.

View 0 Replies View Related

SQL Server 2008 :: How To Migrate Huge Databases

Sep 27, 2015

I would like to migrate around 15 databases in production server to the new production server. The biggest database is 80 GB .

Wondering is there any fastest way to do that with very low downtime ?

What I can think about is shrink databases files and perform attach – detach .

View 8 Replies View Related

SQL Server 2008 :: Paths Not Well Defined For Databases

Oct 29, 2015

What are the potential risks of keeping data , log , tempdb backups etc in the same drive although in different folders ?

View 4 Replies View Related

SQL Server 2008 :: Fill Factor And SSD Based SAN?

Jun 14, 2015

I am about to rebuild all my indexes on a database that is very heavily fragmented. In looking at the report, seems that 80% or more tables are 90%+ fragmented.

My understanding is that fill value value is used for performance reasons. Our shiny new backend SAN is 100% SSD. If solid state can provide a sub-millisecond response, is fill factor still necessary at the cost of additional space being used used?

View 0 Replies View Related

How To Monitor Bandwidth Usage By Databases?

Jan 21, 2008



Hi to all experts,

I have a server with about 50 databases and the server bandwidth usage is 15-30 Mbps.

I need to know which databse is consuming the bandwidth.
Can you tell me what is the best way (if any) to monitor bandwidth usage per database?

View 4 Replies View Related

SQL Server 2008 :: Find Unused Databases Or When Last Used In A Instance?

Mar 30, 2011

Find unused databases in a instance or when last used or accessed?

I'm on SQL SERVER 2008 R2 64bit -enterprize

I need to find when the databse is last accessed.

View 3 Replies View Related

SQL Server 2008 :: Restore Number Of Databases Using Powershell

Aug 15, 2012

I have a new problem with doing a restore of a number of databases using powershell. The script I'm using is based mainly on this one (Part 2 in particular): [URL] .....

The problem I'm having is around the RedgateGetDatabaseName function. My hunch is that its down to the different version of red gate and how sqlbackup works. Basically when the call is made to the function it is returning both the Database Name and the number of row's that the SQL command in the function has ran. I've tried to include a SET NOCOUNT ON at the start of the SQL command in the function but its still returning the now count.

View 5 Replies View Related

SQL Server 2008 :: Update Statistics With Large Databases

Feb 5, 2015

Currently our database size is around 350G. It will grow up to 1.5 TB

We have the

Auto create statistics option :True,
auto update statistics option :True,
auto update statistics asynchronously option : False

at database level

we have a weekly job, update statistics running very long time. It is created through maintenance plan using the option full scan.

Previously they tested with sampling but instead of full scan running with the sampling effected the queries.

Is there option to avoid the long time job duration.

If we didn't run the statistics manually what will happen? How do you maintain statistics with large databases

View 9 Replies View Related

SQL Server 2008 :: Generate Data Models Of All Databases

Feb 12, 2015

I need to generate data models of all databases for an instance. How can I accomplish this?

View 3 Replies View Related

SQL Server 2008 :: Populating UserID Field That Comes From One Of 2 Databases

Feb 12, 2015

I have 2 databases: one for our intranet & another for our internet website.In the intranet database, we have a table called "Clients". A new client can be added in one of 2 ways:

1) One of our employees manually adds the client via the intranet
2) A new customer subscribes to our services via our website, thus becoming a new "client" (when subscribing online, we also add a record to an "Accounts" table located in our internet website database, but we'd also like to add a record to our intranet's Clients table as well).

In the client table is a field called "CreatedBy" which expects the UserId of whoever created the account. Again, this UserId can belong to either an employee via the intranet or a new customer via our internet website. how do I distinguish where the UserId in the dbo.Clients.CreatedBy field is coming from?

My 1st thought was to append a negative to the CreatedBy UserId# if it came from a customer via the website, but that just seemed too quirky (i.e. if an employee added a client and his UserId was '10', the Clients.CreatedBy would be '10'. If a customer subscribed via the website, the Clients.CreatedBy would be '-10'. Where customers can once again sign up online. So, I need a way to keep these databases separate but keep track of which db a user's coming from when we create a new Client record.

View 0 Replies View Related

SQL Server 2008 :: Moving Backups / Restoring Databases

Feb 23, 2015

I am working on a task. Currently we are taking a database backup and keeping that backups in a folder. The backups doesn't have time stamp on it. My task is need to get the latest backup and copy that backups into some other server and then restore the database from there.I am planning to create SSIS package.Do we need script task for this task.How to get the .bak with latest create or moidified date. For now we doesn't have timestamp so need to go based on modified date?

View 9 Replies View Related

SQL Server 2008 :: Create View For Each Table In The Databases?

May 27, 2015

We have two databases with same schema and tables (same table names, basically main DB and a copy of the main DB). following is example of table names from 2 DBs.

CREATE TABLE #SourceDatabase (SourceColumn1 VARCHAR(50))
INSERT INTO #SourceDatabase VALUES('TABLE1') , ('TABLE2'),('TABLE3') , ('TABLE4'),('TABLE5') , ('TABLE6')
SELECT * FROM #SourceDatabase
DROP TABLE #SourceDatabase
CREATE TABLE #ArchiveDatabase (SourceColumn2 VARCHAR(50))
INSERT INTO #ArchiveDatabase VALUES('TABLE1') , ('TABLE2'),('TABLE3') , ('TABLE4'),('TABLE5') , ('TABLE6')
SELECT * FROM #ArchiveDatabase
DROP TABLE #ArchiveDatabase

We need a T_SQL statement that can create one view for each table from both the databases(assuming both databases have same number of tables and same table names). so that we can run the T_SQL on a thrid database and the third DB has all the views (one view for each table from the 2 DBs). and the name of the view should be same as the tables name. and all 3 DBs are on the same server.

the 2 temp tables are just examples, DBs have around 1700 tables each. so we ned something like following for each table.

CREATE VIEW DBO.TABLE1 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE1] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE1]
CREATE VIEW DBO.TABLE2 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE2] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE2]
CREATE VIEW DBO.TABLE3 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE3] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE3]
CREATE VIEW DBO.TABLE4 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE4] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE4]
CREATE VIEW DBO.TABLE5 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE5] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE5]
CREATE VIEW DBO.TABLE6 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE6] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE6]

View 6 Replies View Related

Cannot See Sql Server 2008 Instance Databases In Performance Monitor

Apr 9, 2008




im trying to measure the amount of CPU used in a backup and restore, using the SQL Server Databases: Backup Restore counter in Perfmon.

I can select The counter, but it does not let me select an instance database to monitor.


see image:




I have 3 instances on my machine, 2 sql 2005 and 1 sql 2008. why do these instances not appear? i dont know how to set up this monitoring.


if i type LOCALHOST or 127.0.0.1 in the "Select counters from computer" text box i can see all databases under my sql 2005 instances, but not the ones under the 2008 instances. I have disabled all sql server 2005 services and can confirm none of the sql 2008 instance databases are showing up.

this is a huge problem, especially for when i start stress testing sql server 2008 in preperation for upgrading.

anyone any ideas on why i cannot see sql server 2008 instances in perfmon? I have tried from a remote pc also with the same results.

View 3 Replies View Related

SQL Server 2008 :: How To Get Output Based On Sequential Number

Feb 13, 2015

The below data come from table table1. Instead of below result Ex1: I need output similar to the ex2.

Ex1:

CaseNumberStart CaseNumberEndExported
15000013150000131
15000014150000141
15000504150005041
15000505150005051

Ex2:

CaseNumberStart CaseNumberEndExported
15000013150000142
15000504150005052

How to get the result similar to Ex2, instead of Ex1. (ie., case-number is in sequential order then no need to break), And it should suit large dataset, I will finetune, if any performance issue.

View 1 Replies View Related







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