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


ADVERTISEMENT

SQL Jobs - Cannot Obtain A LOCK Resource At This Time

May 24, 2007

Hi All,



We recently bought a new (sql) database server with 8 gb ram. I started moving the databases from our older 2005-sql to the new one. Everything goes well, except...



Some steps in our jobs do a truncate table of a delete from... When the job is running and it reaches the step where the truncation/deleting starts, it stops its execution and gives the following error :




Code Snippet

The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions. [SQLSTATE HY000] (Error 1204). The step failed.




When I try to execute the procedure that does the truncation manually, it works perfect. Do you guys have an idea on what the cause of this error might be ?



Thanks a lot in advance !



(FYI: we use the enterprise edition of sql server 2005)



Grtz, Koen

View 9 Replies View Related

How To Convert UTC Time (retrieved From SQL) To Local Time In Reporting Services Based On Time Zone

Aug 7, 2007



Hi all,

I have created a report in SSRS 2005 which is being viewed by users from different Time Zones.

I have a dataset which has a field of type datetime (UTC). Now I would like to display this Date according to the User Time Zone.

For example if the date is August 07, 2007 10:00 AM UTC,

then I would like to display it as August 07, 2007 03:30 PM IST if the user Time Zone is IST.


Similarly for other Time Zones it should display the time accordingly.

Is this possible in SSRS 2005?

Any pointers will be usefull...

Thanks in advance
sudheer racha.

View 5 Replies View Related

How To Update Time Series Based On Another Table(or View)??

Feb 15, 2005

Hi all,
I have two tables (staging and Cdate) and neither objects has any constraints.
staging table has ID, date, A, B, and C fields and Cdate has id,date and day fields. I need to update/insert date from Vdate into staging where staging ID=' ' and date is null
Here is the code I wrote, however, it seemed the information was updated to one date only instead of time series - Cdate contains time series in column date.
Anyone can help to fix it? Thank you for the help!

update s
set s.date=c.date
FROM cdate c join staging s on(s.id=c.id)
Where s.date is null and id=2

View 3 Replies View Related

Selecting Data From SQL Table Based On A Time Period

Oct 11, 2007

I am trying to write a stored procedure that will select information from a SQL table based on a specific time.
For example I have a name field and a time field, I want to return just the names that were created between a specific time frame. ex between 3pm and 4pm.
Any thoughts?

View 21 Replies View Related

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 View Related

Loading Images In A SQL Server Express Database Table At Design Time Using Visual Basic Net Express Editon

Jun 24, 2007

I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me

View 3 Replies View Related

Database Design For Catalog Management

Sep 3, 2007



Hi,

I need advice on my design.
I'm developing a system that track the catalog distribution.

I have a 5 table.
Company Table - Store list of company. Each company can have many staff.

Staff Table - Store list of staff.

Catalogs Table - Store list of catalog. Each catalog can have many revision.
PKEY id
name
latest

CatalogsRev Table - Store list of catalog revision.
PKEY catalogID -> Catalogs.id
PKEY year


Staff_Catalog Table - Each staff can have many catalog revision.
PKEY staffID -> Staff.id
PKEY catalogID -> CatalogsRev.catalogID
PKEY year -> CatalogsRev.year

Is the above table good enough to track which company do not have latest catalog revision?

For the Catalogs Table should I use a trigger to update the Catalogs.latest column everytime a new CatalogsRev is entered?
I've read some article on the web says trigger is slow, but in my situation is it suitable to use trigger?


Thanks,
Max

View 1 Replies View Related

Deleting Data From Sql 2005 Table But No Resource Released

Mar 7, 2008



I'm Working in a Simple picture Gallery On My web site.
When I add my pictures To the table Using Binary Writer and Delete
]

DELETE FROM [Photos]

WHERE [PhotoID] = @PhotoID

It From My Table this Transact Delete the Pictures
but After some work I found That My database File size is increassing day To day I'm very confused
so please tell me where is the problem ?

View 4 Replies View Related

DB Design :: Schema Binding A View In Management Studio

Oct 13, 2015

I'm using SQL Server 2008 R2 Management Studio. I have a view that I'd like to index. Obviously, that requires that the view be schema bound to the underlying table. I have found myriad explanations for how to programmatically create a schema bound view, but I've never created a view like that before, and since I'm more a mechanical engineer than a database manager, I'd like to be able to do it the 'easy' way, by just creating the view in Management Studio by going to the database, right clicking on 'Views', clicking on 'New View...' and then, hopefully, checking some box somewhere that schema binds the table to the view.

View 2 Replies View Related

Reporting Services :: Format Painter In SS Management Studio Report Design?

Mar 22, 2009

Is Format Painter is available in SQL Server Management Studio Report Design?If not, any other way can we copy format?

View 4 Replies View Related

Design To Accomodate Entity Based Schema Versioning

Jul 20, 2005

in simple words it's about versioning at record level.ExampleTableEmployee - EmployeeId, EmployeeName,EmployeeAddress, DepartmentId,TableDesignationMap - EmployeeId, DesignationId, EffectiveDate,validityTableDepartment - DepartmentId, DepartmentTableDesignation - DesignationId, designationVia Modify-Employee-Details screen following are editableEmoyeeNameEmployeeAddressDepartmentDesignationthis screen should allow user to navigate through changes history.Example :Version -1EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation AccountantVersion -2EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation Chief Accountant - changedVersion -3EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment Sales - changedDesignation Marketing Manager - changedQuestion :What is the best proposed database design for maintaining historyrecords bound with version and retrieval techniqueBest RegardsSasanka

View 1 Replies View Related

How To Design Dynamic Reports Based On User's Choice

Dec 13, 2006

Hi all,

I'm a beginner to Report Services, and have tons of questions.

Here's the first one:

if the reports are created based on the condition that the user selects, how can I create the reports with Report Services?

For example,

the user can select the fields that will be shown on the reports, as well as the group fields, the sort fields and restrict fields. So I would not be able to pre-create all possible reports and deploy them to the report server, and I think I should create the reports dynamicly based on what the user select.

Could someone tell me how to do it (create and deploy the reports)?

Thanks a million!

Jonee

View 1 Replies View Related

DB Design :: Composite Clustered Index Key Based On Column

Nov 24, 2015

I created composite clustered index key based on Gender and Salary column 

The Query executed Successfully and <g class="gr_ gr_135 gr-alert gr_tiny gr_spell undefined ContextualSpelling multiReplace" data-gr-id="135" id="135">i</g>

got composite index key id Gender(-), Salary I <g class="gr_ gr_310 gr-alert gr_gramm undefined Grammar only-ins replaceWithoutSep" data-gr-id="310" id="310">want</g> know why Gender(-) display like this?

And Gender is <g class="gr_ gr_391 gr-alert gr_spell undefined ContextualSpelling ins-del multiReplace" data-gr-id="391" id="391">nvarchar</g> (20) 

View 2 Replies View Related

Management Studio - How To Index Tables Based On Query - Please Help

Mar 20, 2007

We are using SQL2005.
I have a stored proc that runs a Select query based on a complex view.
The sproc has two input date parameters (StartDate and EndDate).
We are experiencing SQL timeout problems when the sproc is run with certain Start and End Dates.
We have run the SQL Profiler and created a trace (trc) file (We've used the 'Default' trace configuration).
We have used the trace file in SQL Server Management Studio to try and automatically create indexes on some of our tables.
Unfortunatly SQL Server Management does not make any index recommendations.
I think we are not capturing the right information in our trace file to allow SQL Server Management Studio to do its job.
How do I use SQL Profiler to capture a trace of my sprocs query, so that it can be used by SQL Server Management Studio, to recommend index changes?
Any help appreciated.
Reagrds,
Paul.

View 1 Replies View Related

Design Of DB At Run Time??

Sep 26, 2006

hello friends!!

i want to transfer my base tables from one DB to another DB with all views and SPs and table with constraints

i generated one script for it but i want it run by dynamically..i.e attaching my base objects to newly created DB

what can i do??

I want stored procedure for it

T.I.A

View 1 Replies View Related

Design The Database In SQL First Time

May 11, 2005

Hi all,
I m desiging the database first time, so how can i design the database,how i set the datatype of Datafield.(means which creteria i use for giving data type).
how can i manage the Relationship.....
plz discuss in detail.....
thanx in advance
Sajjad Rizvi

View 8 Replies View Related

Auto Increment In Design Time

Sep 4, 2005

Hi

Could anyone tell me how can I set auto increment to a field in MSSQL at design time? So that whenever I insert a new record from VB, it will insert that new record incrementing the field which is not a primary key automatically.

Thank you very much for everyone who are constantly helping me...

View 3 Replies View Related

Time Dimension Design Question

Dec 20, 2007

Im trying to design my time dimension and need to add a field tohandle null dates in the fact. So if at the time of ETL the date isntknown, referential integrity will be preserved. Kimball suggestsinsterting a record in the time dimension to handle this with adescription of 'Date not available' or something like that. Howeverif users are doing inner joins on the dimension they will obvisouslybe pulling the datetime field..what should be in the datetime fieldfor this particular record?

View 4 Replies View Related

Database Design Question With Time

Jul 20, 2005

Im designing a database where a user enters the date and the number ofhours and minutes he worked for the day..now i can do thisWorkdate small dateHours integerMinutes integerBut then would I have to have the front end know that when adding upthe hours and minutes for the week that 60 minutes = 1 hour or isthere some way to do this in the database?thanks-Jim

View 3 Replies View Related

Design Time XSD Metadata Refresh

Aug 30, 2007

My SSIS package has 19 XML Source inputs constructed of 4 different (XSD) Schemas. I'm trying to find a convenient way to refresh the underlying metadata at design time so that I don't have to open each XML Source, change the XSD reference, click on the columns display, change the XSD back to the original but updated XSD just to get say a new default column width for string data. Does anyone have a quicker way to force an SSIS package to pick up changes in a referenced XSD?

View 1 Replies View Related

Ssis Runtime Vs Design Time How To Tell?

Nov 15, 2006

It appears that some of the methods in a custom source data flow component are called (repeatedly) at both design time and run time?

Is there a way to determine that "I'm in runtime" vs "I'm in design time"?

View 2 Replies View Related

Design Time Support For Oracle Db

Dec 22, 2006

Dear all,

i have a question concerning the design time support when accessing different oracle database schemas with SSIS.

I'm using an OLEDB-Connection, and in general everything is working fine. I would like to access two different schemas. One for production and one testing. So i have stored my connection properties in a configuration file, which looks different for prod and test.

I'm not allowed to connect to the oracle db with the user in who's schema the tables are located.
(e.g. schema=prod, my user=readonly)

Normally i must type SQL like: "select * from prod.MyTable" for my production datasource and "select * from test.MyTable" for my test datasource.

In order to clean up my sql i use the oracle "alter session" command. (alter session set current_schema=prod) The command is stored with the connection properties within my configuration file.

All of my packages start with this sql statement for the oracle datasource. (The connection property RetainSameConnection is true and the package property DelayValidation is set.)

So the solution is working fine.

But during the development i have a problem. When crating a datasource i can't retrieve the metadata infromation or build sql with the provided tools, because of "Table of View not found" (ok, the alter session statement is missing)

So does anyone know how to define a alter session for the design time conneciton?
Maybe something with the "Extended Properties" of the connection?

Thanks for your help!
Sven

View 1 Replies View Related

Filtering Out 1 Time Dimension Based On The Selection In Another Time Dimension

May 19, 2008

Hi!

Need some help building a query that does the following :

I have 2 Time Dimensions ; Time (Transdate) and ClosedDate (ClosedDate)

In my report/query, if [Time].CurrentMember = [Time].[YMD].[YMD].[2006].[200610].[20061031] I want to FILTER out all ClosedDate < [ClosedDate].[YMD].[YMD].[2006].[200610].[20061031]

Both Time Dimensions are Year -> Month -> Day and have the same Members.

I have every option available, using calculated Members and/or Measures to do this.

The report I'm creating is Aging of Receivables : Balance / 30 days / 60 days / etc.. But for the Aging, I need to filter like explained above.

Appreciate all help!

Regards,
Stian Bakke

View 3 Replies View Related

DB Design :: Table Design For Packages

Aug 18, 2015

I would like to create a table called product. My objective is to get list of packages available for each product in data grid view column while selecting each product. Each product may have different packages type (eg:- Nos, CTN, OTR etc). Some product may have two packages and some for 3 packages etc. Quantity in each packages also may be differ ( for eg:- for some CTN may contain 12 nos or in other case 8 nos etc). Prices for each packages also will be different that also need to show.  How to design the table.. 

Product name   :  
Nestle milk |
Rainbow milk
packages  :
CTN,OTR, NOs |

CTN, NOs
Price:
50,20,5 |
40,6

(Remarks for your reference):CTN=10nos, OTR=4 nos  
| CTN=8 Nos

View 3 Replies View Related

Modelling Entities That Are Unknown At Design Time

Oct 26, 2007

Hi Everyone,

I'm attempting to design a schema for a project I working on. The idea is that I can store a list of documents and associate meta data with them.

The problem is that I don't know what that meta data will be at design time. The user will create the meta data fields in the software. For the first design I just had a table called meta field that contained the meta field defintion, and another table called itemdata that contained the document primary key, the metafield primary key and a value encoded as a varchar. This works fine while the list of documents is small.

Another idea I've thought of is to have seperate tables for all of the metafields. This would allow me to be very specific about the values that can be stored in that column etc. It also turns out that for the kind of queries I'm doing its about 4 times as fast. The only problem is that the software will need to create these tables at run time.

What I would like to know is, is this a really bad idea? If so why?. Also are there any other ways I can store this kind of data?

The kind of queries I am doing are find all the documents where metafield 1 is A and metafield 2 is B and metafield 3 is C and metafield 4 is D etc.

Cheers,
Mark

View 4 Replies View Related

Making My Containers Visible Design Time

Feb 1, 2007

Hi all,

I have run into a problem! Im developing a SSIS package programmatically using C#. But when i create and add a container (foreachloop and sequence) the container is not becommming visible in design time in my intergration services designer (when i open the .dtsx package afterwards). Does anyone have a solution to this problem? It is only a problem with containers i create myself (it is working when im adding e.g. dataflow tasks to existing containers).

Sincerely

Bryan

View 10 Replies View Related

Time Based Trigger

Feb 16, 2005

can i make a trigger to fire based on given date and time?

View 2 Replies View Related

Filtering Based On Time Of Day

Feb 14, 2005

While using a DateTime field, is there an easy way of filtering based on time of day? Ex. Anything that happened after 3:00 PM on any given day?

The easiest way I've found of doing so is :

Code:


SELECT *
FROM MyTable
WHERE ({ fn MOD(DATEDIFF(ss, '01/01/2000 00:00:00', [Date]), 3600 * 24) } >= DATEDIFF(ss, '00:00:00', '15:00:00'))



To me that seems a bit complicated... but it works...

Anyone that knows of a better way any help would be appreciated (or if you don't think there's a better way knowing that would help as well)

-MBirchmeier

View 5 Replies View Related

SQL Server Schema Issue With Design Time Controls

Mar 9, 2007

Hello, we have some tables and views that are not assigned to the standard schema of dbo.Whenever I try to use a design time control and/or SQLDataSource connection control, it does not like objects other than those using the dbo. schema.Any ideas on how to resolve this issue?For example, her are a couple of views:dbo.vwCustomersdbo.vwCustomerDetailsord.vwOrdersord.vwOrderDetailsthe views with dbo.* I have no problem with.the views with ord. it tells me the view(s) do not exist.Thanks in advance! 

View 1 Replies View Related

Transact SQL :: How To Set Case Sensitivity Of A Column In Design Time

Aug 3, 2015

With Sql Server Management Studio, while creating/modifying a table I want to specify one of its columns to store values in lower case only. Can it be done through the designer or by some other means?

N.B.: Using SQL Server 2005.

View 22 Replies View Related

Convert Data Type In SSIS Design Time

Oct 2, 2007

Hi, all experts,


Is there a way in SSIS dev environment that will let you convert/cast data type at desing time?


Under data flow mappings, there are so many things you can do, but why I did not find any easy way to convert?


I got this validation warning about not supportng converting type DT_STR to DT_I4, or something like that on many occassions..

I am using OLEDB Source as source and SQL Server Destination as destination.

Am I missing something obvious?


Thanks!

View 6 Replies View Related

Determining Runtime Or Design Time During Validate - Workarounds?

Sep 4, 2007

I've seen a couple of posts in this forum on this subject. If anyone knows of a workaround it would be great to hear.


The problem is this. I'm writing a component that looks a bit like an OLE DB destination: it writes to something that looks like a table. During design time I want the component to update the list of available destination columns if they change - so I want Validate to return VS_NEEDSNEWMETADATA if it detects a change. However during runtime I only want to validate that the component will run ok. So I still want to check what the destination looks like but if, say, someone has just added a column then my determination is it is ok to procede with the execution.


ValidateExternalMetadata doesn't help in this case because I still want to validate against the destination. I just don't want to raise VS_NEEDSNEWMETADATA during runtime because it aborts execution and I can determine that although there is a change to the destination it is not one that will cause the component to fail.


Any thoughts and experience on this would be great to hear!


Martin

View 4 Replies View Related







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