More complicated login

Hi, all,
I have a very unusual problem. I have 3 types of users of one application, so I put a textbox on my login page to allow users to identify their type(type_1, type_2, etc.). Unfortunately the authentication function only takes 2 params(p_username, p_password). My problem is that I do not have a mean for transferring my textitem's value to the authentication function where I can define if this exact user belongs to the exact types of users and then return the appropriate boolean values.
I have built applications for some of those types of users and I have authentication functions like "validate_user".
I was thinking if I can use the PRE-AUTHENTICATION PROCESS to set different functions to be used in the actual authentication. For example:
1) Read the P101_TYPE value. Go to 2)
2) if value is of the allowed types go to 3) else go to logout page
3) if value = 'Type1' then authentication function is set to "return validate_user1" else if value = 'Type2' then authentication function is set to "return validate_user2" and so on
Please advise!!!

NO, this doesn't help.
I NEED THE USER TO WRITE HIS OWN TYPE for many reasons.
One of them is that a user could belong to more than one group. Another one is that I could not allow a user of type1 to log if he writes that he is of another type - for security reasons, speed, etc.
So please anyone help. I mean with the original problem in my first question.

Similar Messages

  • TS1424 I love the info about every single word spelled in a question. I feel great talking to something that has all the answers and none solutions. the more sophisticated  apple gets the more complicated it is. Ok i'm stupid.

    What makes apple more complicated to use, the people behind apple now days or the you have to buy your time spent with an apple product. I have been trying for two days to watch a movie I rented in my macbook pro. Oh yes its downloaded allready, its in my rented movies in the mac. I have no rented movies in the icloud. have anything else, but not the movie.
    my life was a lot simpler with an apple 2gs.

    Rentals will be available on the device from whcih you rented it.
    If you rented on a computer, it will only be on that computer, unless you sync it to another device ( you cannot move it to another computer.
    Can I play my rental on more than one device?
    If you download a rented movie on your computer: You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it’s a standard-definition film (movies in HD can only be watched on your computer, iPad, iPhone 4 or later, iPod touch (4th generation or later), or Apple TV). Once you move the movie from your computer to a device, the movie will disappear from your computer's iTunes library. You can move the movie between devices as many times as you wish during the rental period, but the movie can only exist on one device at a time.
    If you download a rented movie on your iPhone 4 or later, iPad, iPod touch (4th generation or later), or Apple TV: It is not transferable to any other device or computer.
    iTunes Store: Movie rental frequently asked questions (FAQ)

  • More complicated examples of using BRFPlus

    Hello!
    Where can I find more complicated examples of using BRFPlus functionality? I need in examples that use expression types like DB query, Step sequence, Search Tree or XSL transformation.

    Hi Alexander,
    With NW 7.0 EHP1 BRFplus can be used for rather simple examples. Development is not completed for all features.
    You may use Decision Table, Boolean, Range, Constant, Formula.
    FYI: There are some demo reports in a package call SFDTDEMO.
    However Ruleset and Rule and not really usable in NW 7.0 EHP1. Those features will be made available in NW 7.0 EHP2. For really complex examples you will need them. In NW 7.0 EHP2 there is no limitation anymore. I am comfortable that even complex cases can be supported well.
    BR,
    Carsten

  • Need help for a more complicated regular expression

    Hi everyone,
    I got another more complicated one here.
    I need to split  '+0,+0.00000000E+000, -4.76517000E+001,-4.64744200E+001,-6.18140500E+001,-5.93055600E+001' by ',' into an array without '+0,+0.00000000E+000'.
    I am using a regular expression as  '[+-]([0-9]+[1-9]+)[E][+]\d' but it failed to, just wondering what is happening there.
     Any idea is well appreciated,
    Thanks,
    +Kunsheng
    Message Edited by Kunsheng Chen on 03-05-2009 05:09 PM
    Solved!
    Go to Solution.
    Attachments:
    regular.vi ‏33 KB

    First, don't bother with regular expressions. Use the function Spreadsheet String to Array with a commas as the delimiter, %f as the format string, a 1D array of floats as the array type. Next, delete the first two elements from the results and you're done.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • They tend to be more complicated

    There was a time when video surveillance was used only in big malls and shopping centers. These days, you can see CCTV’s almost any place you go, from a small shop to homes and religious centers. Thus, they ensure greater public safety at a fraction of the cost.Digital video security camera systems are easy to install. In fact, it takes less than a few minutes to determine the system that's right for you, and have it installed in your home or business. Some government security camera systems take a little longer to install, as they tend to be more complicated, and tend to cover a much larger area. The great thing about digital video is the quality of the signal that is transmitted and recorded. Another great thing is variety of features available with digital video recorders, such as: High resolution Hard Disk Storage, Date/Time or Event or Segment search, built in multiplexer that allows simultaneous recording of multiple security cameras. Both of these factors provide you with a top of the line security camera system for protecting your property.
    Watch Killer Elite Online Free - Watch Killer Elite Online Megavideo - Watch Killer Elite Full Movie - Watch Killer Elite Movie Online - Watch Killer Elite Online Megavideo - Watch Killer Elite Online for free ===== Watch Moneyball Online Free - Watch Moneyball Online Megavideo - Watch Moneyball Full Movie - Watch Moneyball Movie Online - Watch Moneyball Online Megavideo - Watch Moneyball Online for free ===== Watch Abduction Online Free - Watch Abduction Online Megavideo - Watch Abduction Full Movie - Watch Abduction Movie Online - Watch Abduction Online Megavideo - Watch Abduction Online for free======= Watch Dolphin Tale Online Free - Watch Dolphin Tale Online Megavideo - Watch Dolphin Tale Full Movie - Watch Dolphin Tale Movie Online - Watch Dolphin Tale Online Megavideo - Watch Dolphin Tale Online for free

    There was a time when video surveillance was used only in big malls and shopping centers. These days, you can see CCTV’s almost any place you go, from a small shop to homes and religious centers. Thus, they ensure greater public safety at a fraction of the cost.Digital video security camera systems are easy to install. In fact, it takes less than a few minutes to determine the system that's right for you, and have it installed in your home or business. Some government security camera systems take a little longer to install, as they tend to be more complicated, and tend to cover a much larger area. The great thing about digital video is the quality of the signal that is transmitted and recorded. Another great thing is variety of features available with digital video recorders, such as: High resolution Hard Disk Storage, Date/Time or Event or Segment search, built in multiplexer that allows simultaneous recording of multiple security cameras. Both of these factors provide you with a top of the line security camera system for protecting your property.
    Watch Killer Elite Online Free - Watch Killer Elite Online Megavideo - Watch Killer Elite Full Movie - Watch Killer Elite Movie Online - Watch Killer Elite Online Megavideo - Watch Killer Elite Online for free ===== Watch Moneyball Online Free - Watch Moneyball Online Megavideo - Watch Moneyball Full Movie - Watch Moneyball Movie Online - Watch Moneyball Online Megavideo - Watch Moneyball Online for free ===== Watch Abduction Online Free - Watch Abduction Online Megavideo - Watch Abduction Full Movie - Watch Abduction Movie Online - Watch Abduction Online Megavideo - Watch Abduction Online for free======= Watch Dolphin Tale Online Free - Watch Dolphin Tale Online Megavideo - Watch Dolphin Tale Full Movie - Watch Dolphin Tale Movie Online - Watch Dolphin Tale Online Megavideo - Watch Dolphin Tale Online for free

  • Please help me with EVEN MORE SAFE LOGIN ISSUES.

    This is the screen capture I get when after paying properly for the licenses for F-Secure software in My Safe I get the message in this galleries above screen capture. My subscription was cancelled and that my money was refunded. THIS IS INTERMITTENT. I am really being messed with. Please help me out guys. I tried calling F-Secure tech support and customer support then this is how that went. I first had customer service verify that I made for and paid for the purchase through the Cleverbridge reference numbers. Then after I confirmed that I had paid for the software licenses and had not recieved a refund the agent helped me reset my password for the Safe login multiple times. It was finally on the third try that it worked and I was able to log in and instead of the red letters. It showed that I could download the software. I now go back all the same login details and I can not login and download the software. I get an account canceled message. I really have had it with this situation. Please see the error screen below Thanks Rich. 

    Hi Rich,
    Just to check with you, did you cancel the purchase and requested for a refund? If you did, then that is probably why after the password reset and you try to log in, it says that your subscription is terminated due to cancellation.
    Unless you've purchased another subscription after you made the cancellation. Can you confirm this?

  • SQL Query with a little bit more complicated WHERE clause performance issue

    Hello, I have some performance issue in this case:
    Very simplified query:
    SELECT COUNT(*) FROM Items
    WHERE
    ConditionA OR
    ConditionB OR
    ConditionC OR ...
    Simply I have to determine how many Items the user has access through some complicated conditions.
    When there is a large number of records (100,000+) in the Items table and say ~10 complicated conditions concatenated in WHERE clause, I get the result about 2 seconds in my case. The problem is when very few conditions are met, f.e. when I get only
    10 Items from 100,000.
    How can I improve the performace in this "Get my items" case?
    Additional information:
    the query is generated by EF 6.1
    MS SQL 2012 Express
    Here is the main part of the real SQL Execution Plan:

    Can you post table/index DDL?  Query?
    Sample query:
    exec sp_executesql N'SELECT
    [GroupBy1].[A1] AS [C1]
    FROM ( SELECT
    COUNT(1) AS [A1]
    FROM [dbo].[Tickets] AS [Extent1]
    LEFT OUTER JOIN [dbo].[Services] AS [Extent2] ON [Extent1].[ServiceId] = [Extent2].[Id]
    WHERE (@p__linq__0 = 1) OR ([Extent1].[SubmitterKey] = @p__linq__1) OR ([Extent1].[OperatorKey] = @p__linq__2) OR (([Extent1].[OperatorKey] IS NULL) AND (@p__linq__2 IS NULL)) OR ([Extent1].[SolverKey] = @p__linq__3) OR (([Extent1].[SolverKey] IS NULL) AND (@p__linq__3 IS NULL)) OR ([Extent1].[Incident2ndLineSupportKey] = @p__linq__4) OR (([Extent1].[Incident2ndLineSupportKey] IS NULL) AND (@p__linq__4 IS NULL)) OR ((@p__linq__5 = 1) AND ((1 = CAST( [Extent1].[TicketType] AS int)) OR ((@p__linq__6 = 1) AND (((2 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[IncidentManager] = @p__linq__7) OR (([Extent2].[IncidentManager] IS NULL) AND (@p__linq__7 IS NULL)))) OR ((3 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[ServiceRequestManager] = @p__linq__8) OR (([Extent2].[ServiceRequestManager] IS NULL) AND (@p__linq__8 IS NULL)))) OR ((4 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[ProblemManager] = @p__linq__9) OR (([Extent2].[ProblemManager] IS NULL) AND (@p__linq__9 IS NULL)))) OR ((5 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[ChangeManager] = @p__linq__10) OR (([Extent2].[ChangeManager] IS NULL) AND (@p__linq__10 IS NULL)))))) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceDeputyManagers] AS [Extent3]
    WHERE ([Extent1].[ServiceId] = [Extent3].[ServiceId]) AND ( CAST( [Extent3].[TicketType] AS int) = CAST( [Extent1].[TicketType] AS int)) AND ([Extent3].[UserProviderKey] = @p__linq__11)
    )))) OR ((2 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsIncidents] = 1) OR ((201 = [Extent1].[TicketStateValue]) AND ([Extent2].[WfDisableIncidentTakeFromQueueAction] <> cast(1 as bit)))) AND ([Extent2].[Incident1stLineSupportLimitedAccess] <> cast(1 as bit))) OR ((3 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsServiceRequests] = 1) OR ((301 = [Extent1].[TicketStateValue]) AND ([Extent2].[WfDisableServiceRequestTakeFromQueueAction] <> cast(1 as bit)))) AND ([Extent2].[ServiceRequestLimitedAccess] <> cast(1 as bit))) OR ((4 = CAST( [Extent1].[TicketType] AS int)) AND ([Extent2].[AllowAccessToOtherOperatorsProblems] = 1) AND ([Extent2].[ProblemLimitedAccess] <> cast(1 as bit))) OR ((5 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsChanges] = 1) OR ((501 = [Extent1].[TicketStateValue]) AND ([Extent2].[WfDisableChangeTakeFromQueueAction] <> cast(1 as bit)))) AND ([Extent2].[ChangeLimitedAccess] <> cast(1 as bit))) OR ((2 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsIncidents] = 1) OR ((201 = [Extent1].[TicketStateValue]) AND ([Extent2].[WfDisableIncidentTakeFromQueueAction] <> cast(1 as bit)))) AND (( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperators] AS [Extent4]
    WHERE ([Extent1].[ServiceId] = [Extent4].[ServiceId]) AND (2 = CAST( [Extent4].[TicketType] AS int)) AND ([Extent4].[UserProviderKey] = @p__linq__12) AND (1 = [Extent4].[SupportLine])
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[OperatorGroupUsers] AS [Extent5]
    WHERE ([Extent5].[UserProviderKey] = @p__linq__13) AND ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperatorGroups] AS [Extent6]
    WHERE ([Extent6].[ServiceId] = [Extent1].[ServiceId]) AND (2 = CAST( [Extent6].[TicketType] AS int)) AND (1 = [Extent6].[SupportLine]) AND ([Extent6].[OperatorGroupId] = [Extent5].[OperatorGroupId])
    )))) OR ((2 = CAST( [Extent1].[TicketType] AS int)) AND ([Extent1].[IncidentFunctionEscalatedTo2ndLineSupport] = 1) AND ([Extent1].[Incident2ndLineSupportKey] IS NULL) AND (([Extent2].[Incident2ndLineSupportLimitedAccess] <> cast(1 as bit)) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperators] AS [Extent7]
    WHERE ([Extent1].[ServiceId] = [Extent7].[ServiceId]) AND (2 = CAST( [Extent7].[TicketType] AS int)) AND ([Extent7].[UserProviderKey] = @p__linq__14) AND (2 = [Extent7].[SupportLine])
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[OperatorGroupUsers] AS [Extent8]
    WHERE ([Extent8].[UserProviderKey] = @p__linq__15) AND ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperatorGroups] AS [Extent9]
    WHERE ([Extent9].[ServiceId] = [Extent1].[ServiceId]) AND (2 = CAST( [Extent9].[TicketType] AS int)) AND (2 = [Extent9].[SupportLine]) AND ([Extent9].[OperatorGroupId] = [Extent8].[OperatorGroupId])
    )))) OR ((3 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsServiceRequests] = 1) OR ((301 = CAST( [Extent1].[TicketState] AS int)) AND ([Extent2].[WfDisableServiceRequestTakeFromQueueAction] <> cast(1 as bit)))) AND (( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperators] AS [Extent10]
    WHERE ([Extent1].[ServiceId] = [Extent10].[ServiceId]) AND (3 = CAST( [Extent10].[TicketType] AS int)) AND ([Extent10].[UserProviderKey] = @p__linq__16)
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[OperatorGroupUsers] AS [Extent11]
    WHERE ([Extent11].[UserProviderKey] = @p__linq__17) AND ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperatorGroups] AS [Extent12]
    WHERE ([Extent12].[ServiceId] = [Extent1].[ServiceId]) AND (3 = CAST( [Extent12].[TicketType] AS int)) AND ([Extent12].[OperatorGroupId] = [Extent11].[OperatorGroupId])
    )))) OR ((4 = CAST( [Extent1].[TicketType] AS int)) AND ([Extent2].[AllowAccessToOtherOperatorsProblems] = 1) AND (( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperators] AS [Extent13]
    WHERE ([Extent1].[ServiceId] = [Extent13].[ServiceId]) AND (4 = CAST( [Extent13].[TicketType] AS int)) AND ([Extent13].[UserProviderKey] = @p__linq__18)
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[OperatorGroupUsers] AS [Extent14]
    WHERE ([Extent14].[UserProviderKey] = @p__linq__19) AND ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperatorGroups] AS [Extent15]
    WHERE ([Extent15].[ServiceId] = [Extent1].[ServiceId]) AND (4 = CAST( [Extent15].[TicketType] AS int)) AND ([Extent15].[OperatorGroupId] = [Extent14].[OperatorGroupId])
    )))) OR ((5 = CAST( [Extent1].[TicketType] AS int)) AND (([Extent2].[AllowAccessToOtherOperatorsChanges] = 1) OR ((501 = [Extent1].[TicketStateValue]) AND ([Extent2].[WfDisableChangeTakeFromQueueAction] <> cast(1 as bit)))) AND (( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperators] AS [Extent16]
    WHERE ([Extent1].[ServiceId] = [Extent16].[ServiceId]) AND (5 = CAST( [Extent16].[TicketType] AS int)) AND ([Extent16].[UserProviderKey] = @p__linq__20)
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[OperatorGroupUsers] AS [Extent17]
    WHERE ([Extent17].[UserProviderKey] = @p__linq__21) AND ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[ServiceOperatorGroups] AS [Extent18]
    WHERE ([Extent18].[ServiceId] = [Extent1].[ServiceId]) AND (5 = CAST( [Extent18].[TicketType] AS int)) AND ([Extent18].[OperatorGroupId] = [Extent17].[OperatorGroupId])
    )))) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM [dbo].[TicketInvitations] AS [Extent19]
    WHERE ([Extent19].[TicketId] = [Extent1].[Id]) AND (([Extent19].[InvitedUserProviderKey] = @p__linq__22) OR (([Extent19].[InvitedUserProviderKey] IS NULL) AND (@p__linq__22 IS NULL)))
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM (SELECT
    [Extent20].[CustomerId] AS [CustomerId]
    FROM [dbo].[CustomerUsers] AS [Extent20]
    WHERE ([Extent20].[UserProviderKey] = @p__linq__23) AND ([Extent20].[CanAccessOthersTickets] = 1)
    INTERSECT
    SELECT
    [Extent21].[CustomerId] AS [CustomerId]
    FROM [dbo].[CustomerUsers] AS [Extent21]
    WHERE [Extent21].[UserProviderKey] = [Extent1].[SubmitterKey]) AS [Intersect1]
    )) OR ( EXISTS (SELECT
    1 AS [C1]
    FROM (SELECT
    [Extent22].[InternalGroupId] AS [InternalGroupId]
    FROM [dbo].[InternalGroupUsers] AS [Extent22]
    WHERE ([Extent22].[UserProviderKey] = @p__linq__24) AND ([Extent22].[CanAccessOthersTickets] = 1)
    INTERSECT
    SELECT
    [Extent23].[InternalGroupId] AS [InternalGroupId]
    FROM [dbo].[InternalGroupUsers] AS [Extent23]
    WHERE [Extent23].[UserProviderKey] = [Extent1].[SubmitterKey]) AS [Intersect2]
    ) AS [GroupBy1]',N'@p__linq__0 bit,@p__linq__1 varchar(8000),@p__linq__2 varchar(8000),@p__linq__3 varchar(8000),@p__linq__4 varchar(8000),@p__linq__5 bit,@p__linq__6 bit,@p__linq__7 varchar(8000),@p__linq__8 varchar(8000),@p__linq__9 varchar(8000),@p__linq__10 varchar(8000),@p__linq__11 varchar(8000),@p__linq__12 varchar(8000),@p__linq__13 varchar(8000),@p__linq__14 varchar(8000),@p__linq__15 varchar(8000),@p__linq__16 varchar(8000),@p__linq__17 varchar(8000),@p__linq__18 varchar(8000),@p__linq__19 varchar(8000),@p__linq__20 varchar(8000),@p__linq__21 varchar(8000),@p__linq__22 varchar(8000),@p__linq__23 varchar(8000),@p__linq__24 varchar(8000)',@p__linq__0=0,@p__linq__1='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__2='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__3='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__4='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__5=1,@p__linq__6=0,@p__linq__7='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__8='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__9='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__10='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__11='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__12='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__13='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__14='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__15='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__16='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__17='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__18='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__19='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__20='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__21='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__22='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__23='31555851-b89d-4a15-bb05-5a6fd42f9552',@p__linq__24='31555851-b89d-4a15-bb05-5a6fd42f9552'
    Generated DDL for related tables: (indexes are primary on PKs and FKs)
    CREATE TABLE [dbo].[CustomerUsers](
    [UserProviderKey] [varchar](184) NOT NULL,
    [CustomerId] [int] NOT NULL,
    [CanAccessOthersTickets] [bit] NOT NULL,
    CONSTRAINT [PK_dbo.CustomerUsers] PRIMARY KEY CLUSTERED
    [UserProviderKey] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[InternalGroupUsers] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[InternalGroupUsers](
    [UserProviderKey] [varchar](184) NOT NULL,
    [InternalGroupId] [int] NOT NULL,
    [CanAccessOthersTickets] [bit] NOT NULL,
    CONSTRAINT [PK_dbo.InternalGroupUsers] PRIMARY KEY CLUSTERED
    [UserProviderKey] ASC,
    [InternalGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[OperatorGroupUsers] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[OperatorGroupUsers](
    [UserProviderKey] [varchar](184) NOT NULL,
    [OperatorGroupId] [int] NOT NULL,
    CONSTRAINT [PK_dbo.OperatorGroupUsers] PRIMARY KEY CLUSTERED
    [UserProviderKey] ASC,
    [OperatorGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[ServiceDeputyManagers] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[ServiceDeputyManagers](
    [UserProviderKey] [varchar](184) NOT NULL,
    [ServiceId] [int] NOT NULL,
    [TicketType] [int] NOT NULL,
    CONSTRAINT [PK_dbo.ServiceDeputyManagers] PRIMARY KEY CLUSTERED
    [UserProviderKey] ASC,
    [ServiceId] ASC,
    [TicketType] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[ServiceOperatorGroups] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[ServiceOperatorGroups](
    [ServiceId] [int] NOT NULL,
    [OperatorGroupId] [int] NOT NULL,
    [TicketTypeValue] [int] NOT NULL,
    [SupportLine] [int] NOT NULL,
    [TicketType] [int] NOT NULL,
    CONSTRAINT [PK_dbo.ServiceOperatorGroups] PRIMARY KEY CLUSTERED
    [ServiceId] ASC,
    [OperatorGroupId] ASC,
    [TicketTypeValue] ASC,
    [SupportLine] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object: Table [dbo].[ServiceOperators] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[ServiceOperators](
    [UserProviderKey] [varchar](184) NOT NULL,
    [ServiceId] [int] NOT NULL,
    [TicketTypeValue] [int] NOT NULL,
    [SupportLine] [int] NOT NULL,
    [TicketType] [int] NOT NULL,
    CONSTRAINT [PK_dbo.ServiceOperators] PRIMARY KEY CLUSTERED
    [UserProviderKey] ASC,
    [ServiceId] ASC,
    [TicketTypeValue] ASC,
    [SupportLine] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[Services] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Services](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [ParentId] [int] NULL,
    [Name] [nvarchar](256) NOT NULL,
    [Description] [nvarchar](max) NULL,
    [Disabled] [bit] NOT NULL,
    [NewTicketLimitedAccess] [bit] NOT NULL,
    [Incident1stLineSupportLimitedAccess] [bit] NOT NULL,
    [Incident2ndLineSupportLimitedAccess] [bit] NOT NULL,
    [ServiceRequestLimitedAccess] [bit] NOT NULL,
    [ProblemLimitedAccess] [bit] NOT NULL,
    [ServiceRequestManager] [varchar](184) NOT NULL,
    [IncidentManager] [varchar](184) NOT NULL,
    [ProblemManager] [varchar](184) NOT NULL,
    [Deleted] [bit] NOT NULL,
    [WfDisableIncidentAssignedState] [bit] NOT NULL,
    [WfDisableIncidentConfirmedState] [bit] NOT NULL,
    [WfDisableIncidentTakeFromQueueAction] [bit] NOT NULL,
    [WfDisableIncidentFinishSolutionAction] [bit] NOT NULL,
    [WfDisableServiceRequestAssignedState] [bit] NOT NULL,
    [WfDisableServiceRequestConfirmedState] [bit] NOT NULL,
    [WfDisableServiceRequestTakeFromQueueAction] [bit] NOT NULL,
    [WfDisableServiceRequestFinishSolutionAction] [bit] NOT NULL,
    [WfDisableServiceRequestPostponeAction] [bit] NOT NULL,
    [ChangeLimitedAccess] [bit] NOT NULL,
    [ChangeManager] [varchar](184) NOT NULL,
    [WfDisableChangeTakeFromQueueAction] [bit] NOT NULL,
    [WfDisableChangeAssignedState] [bit] NOT NULL,
    [WfDisableChangeStartPreparationAction] [bit] NOT NULL,
    [IsDepartment] [bit] NOT NULL,
    [InheritsFromDepartment] [bit] NOT NULL,
    [AllowSelectSolverBySubmitterForIncidents] [bit] NOT NULL,
    [AllowSelectSolverBySubmitterForServiceRequests] [bit] NOT NULL,
    [AllowSelectSolverBySubmitterForProblems] [bit] NOT NULL,
    [AllowSelectSolverBySubmitterForChanges] [bit] NOT NULL,
    [AllowAccessToOtherOperatorsIncidents] [bit] NOT NULL,
    [AllowAccessToOtherOperatorsServiceRequests] [bit] NOT NULL,
    [AllowAccessToOtherOperatorsProblems] [bit] NOT NULL,
    [AllowAccessToOtherOperatorsChanges] [bit] NOT NULL,
    [AllowChangeDeadlineForIncidents] [bit] NOT NULL,
    [AllowChangeDeadlineForServiceRequests] [bit] NOT NULL,
    [AllowChangeDeadlineForProblems] [bit] NOT NULL,
    [AllowChangeDeadlineForChanges] [bit] NOT NULL,
    [AllowSelectPriorityForServiceRequests] [bit] NOT NULL,
    [WfDisableIncidentCompletedState] [bit] NOT NULL,
    [WfDoIncidentCompleteActionBySubmittersMessage] [bit] NOT NULL,
    [WfDisableServiceRequestCompletedState] [bit] NOT NULL,
    [WfDoServiceRequestCompleteActionBySubmittersMessage] [bit] NOT NULL,
    CONSTRAINT [PK_dbo.Services] PRIMARY KEY CLUSTERED
    [Id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[TicketInvitations] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[TicketInvitations](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [TicketId] [int] NOT NULL,
    [InitiatorUserProviderKey] [varchar](184) NULL,
    [InitiatorFullName] [nvarchar](max) NULL,
    [InvitedUserProviderKey] [varchar](184) NULL,
    [InvitedFullName] [nvarchar](max) NULL,
    [Type] [int] NOT NULL,
    [CreatedUTC] [datetime] NOT NULL,
    CONSTRAINT [PK_dbo.TicketInvitations] PRIMARY KEY CLUSTERED
    [Id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Table [dbo].[Tickets] Script Date: 7.5.2014 8:39:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Tickets](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [ParentId] [int] NULL,
    [ServiceId] [int] NULL,
    [ServiceMailboxId] [int] NULL,
    [TicketTypeValue] [int] NOT NULL,
    [TicketTypeIdREF] [int] NOT NULL,
    [SubmitterKey] [varchar](184) NOT NULL,
    [SubmitterFullName] [nvarchar](256) NULL,
    [CustomerId] [int] NULL,
    [SolverKey] [varchar](184) NULL,
    [SolverFullName] [nvarchar](256) NULL,
    [Subject] [nvarchar](max) NULL,
    [CreatedUTC] [datetime] NOT NULL,
    [Archived] [bit] NOT NULL,
    [MarkedAsSolvedUTC] [datetime] NULL,
    [ArchivedUTC] [datetime] NULL,
    [TicketSourceValue] [int] NOT NULL,
    [OperatorKey] [varchar](184) NULL,
    [DeadlineUTC] [datetime] NULL,
    [DeadlineLastNotificatedPercentage] [int] NULL,
    [UrgencyValue] [int] NULL,
    [ImpactValue] [int] NULL,
    [PriorityValue] [int] NULL,
    [TicketStateValue] [int] NOT NULL,
    [IncidentFunctionEscalatedTo2ndLineSupport] [bit] NOT NULL,
    [Incident2ndLineSupportKey] [varchar](184) NULL,
    [Incident2ndLineSupportFullName] [nvarchar](max) NULL,
    [TicketType] [int] NOT NULL,
    [Source] [int] NOT NULL,
    [TicketState] [int] NOT NULL,
    [Urgency] [int] NULL,
    [Impact] [int] NULL,
    [TicketSummaryState] [int] NOT NULL,
    [ResolutionText] [nvarchar](max) NULL,
    [ResolutionModifiedUTC] [datetime] NULL,
    [ResolutionEdited] [bit] NOT NULL,
    [ResolutionUserProviderKey] [varchar](184) NULL,
    [ResolutionFullName] [nvarchar](max) NULL,
    [TicketSubType] [int] NULL,
    [ChangeRiskProbabilityValue] [int] NULL,
    [ChangeImpactValue] [int] NULL,
    [ChangeRiskCategoryValue] [int] NULL,
    [RfcText] [nvarchar](max) NULL,
    [RfcModifiedUTC] [datetime] NULL,
    [RfcEdited] [bit] NOT NULL,
    [RfcUserProviderKey] [varchar](184) NULL,
    [RfcFullName] [nvarchar](max) NULL,
    [ManualDeadline] [bit] NOT NULL,
    [ContactInformation] [nvarchar](256) NULL,
    [Imported] [bit] NOT NULL,
    [ForceClosed] [bit] NOT NULL,
    CONSTRAINT [PK_dbo.Tickets] PRIMARY KEY CLUSTERED
    [Id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    /****** Object: Index [IX_CustomerId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_CustomerId] ON [dbo].[CustomerUsers]
    [CustomerId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_InternalGroupId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_InternalGroupId] ON [dbo].[InternalGroupUsers]
    [InternalGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_OperatorGroupId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_OperatorGroupId] ON [dbo].[OperatorGroupUsers]
    [OperatorGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ServiceId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ServiceId] ON [dbo].[ServiceDeputyManagers]
    [ServiceId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_OperatorGroupId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_OperatorGroupId] ON [dbo].[ServiceOperatorGroups]
    [OperatorGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ServiceId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ServiceId] ON [dbo].[ServiceOperatorGroups]
    [ServiceId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ServiceId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ServiceId] ON [dbo].[ServiceOperators]
    [ServiceId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ParentId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ParentId] ON [dbo].[Services]
    [ParentId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_TicketId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_TicketId] ON [dbo].[TicketInvitations]
    [TicketId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    SET ANSI_PADDING ON
    GO
    /****** Object: Index [IX_TicketInvitations_InvitedUserProviderKey_TicketId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE UNIQUE NONCLUSTERED INDEX [IX_TicketInvitations_InvitedUserProviderKey_TicketId] ON [dbo].[TicketInvitations]
    [InvitedUserProviderKey] ASC,
    [TicketId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_CustomerId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_CustomerId] ON [dbo].[Tickets]
    [CustomerId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ParentId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ParentId] ON [dbo].[Tickets]
    [ParentId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ServiceId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ServiceId] ON [dbo].[Tickets]
    [ServiceId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_ServiceMailboxId] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_ServiceMailboxId] ON [dbo].[Tickets]
    [ServiceMailboxId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    SET ANSI_PADDING ON
    GO
    /****** Object: Index [IX_SolverFullName] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_SolverFullName] ON [dbo].[Tickets]
    [SolverFullName] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    SET ANSI_PADDING ON
    GO
    /****** Object: Index [IX_SolverKey] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_SolverKey] ON [dbo].[Tickets]
    [SolverKey] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    SET ANSI_PADDING ON
    GO
    /****** Object: Index [IX_SubmitterFullName] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_SubmitterFullName] ON [dbo].[Tickets]
    [SubmitterFullName] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    SET ANSI_PADDING ON
    GO
    /****** Object: Index [IX_SubmitterKey] Script Date: 7.5.2014 8:39:38 ******/
    CREATE NONCLUSTERED INDEX [IX_SubmitterKey] ON [dbo].[Tickets]
    [SubmitterKey] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    /****** Object: Index [IX_Tickets_TicketType_TicketTypeIdREF] Script Date: 7.5.2014 8:39:38 ******/
    CREATE UNIQUE NONCLUSTERED INDEX [IX_Tickets_TicketType_TicketTypeIdREF] ON [dbo].[Tickets]
    [TicketType] ASC,
    [TicketTypeIdREF] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[CustomerUsers] WITH CHECK ADD CONSTRAINT [FK_dbo.CustomerUsers_dbo.Customers_CustomerId] FOREIGN KEY([CustomerId])
    REFERENCES [dbo].[Customers] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[CustomerUsers] CHECK CONSTRAINT [FK_dbo.CustomerUsers_dbo.Customers_CustomerId]
    GO
    ALTER TABLE [dbo].[InternalGroupUsers] WITH CHECK ADD CONSTRAINT [FK_dbo.InternalGroupUsers_dbo.InternalGroups_InternalGroupId] FOREIGN KEY([InternalGroupId])
    REFERENCES [dbo].[InternalGroups] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[InternalGroupUsers] CHECK CONSTRAINT [FK_dbo.InternalGroupUsers_dbo.InternalGroups_InternalGroupId]
    GO
    ALTER TABLE [dbo].[OperatorGroupUsers] WITH CHECK ADD CONSTRAINT [FK_dbo.OperatorGroupUsers_dbo.OperatorGroups_OperatorGroupId] FOREIGN KEY([OperatorGroupId])
    REFERENCES [dbo].[OperatorGroups] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[OperatorGroupUsers] CHECK CONSTRAINT [FK_dbo.OperatorGroupUsers_dbo.OperatorGroups_OperatorGroupId]
    GO
    ALTER TABLE [dbo].[ServiceDeputyManagers] WITH CHECK ADD CONSTRAINT [FK_dbo.ServiceDeputyManagers_dbo.Services_ServiceId] FOREIGN KEY([ServiceId])
    REFERENCES [dbo].[Services] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[ServiceDeputyManagers] CHECK CONSTRAINT [FK_dbo.ServiceDeputyManagers_dbo.Services_ServiceId]
    GO
    ALTER TABLE [dbo].[ServiceOperatorGroups] WITH CHECK ADD CONSTRAINT [FK_dbo.ServiceOperatorGroups_dbo.OperatorGroups_OperatorGroupId] FOREIGN KEY([OperatorGroupId])
    REFERENCES [dbo].[OperatorGroups] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[ServiceOperatorGroups] CHECK CONSTRAINT [FK_dbo.ServiceOperatorGroups_dbo.OperatorGroups_OperatorGroupId]
    GO
    ALTER TABLE [dbo].[ServiceOperatorGroups] WITH CHECK ADD CONSTRAINT [FK_dbo.ServiceOperatorGroups_dbo.Services_ServiceId] FOREIGN KEY([ServiceId])
    REFERENCES [dbo].[Services] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[ServiceOperatorGroups] CHECK CONSTRAINT [FK_dbo.ServiceOperatorGroups_dbo.Services_ServiceId]
    GO
    ALTER TABLE [dbo].[ServiceOperators] WITH CHECK ADD CONSTRAINT [FK_dbo.ServiceOperators_dbo.Services_ServiceId] FOREIGN KEY([ServiceId])
    REFERENCES [dbo].[Services] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[ServiceOperators] CHECK CONSTRAINT [FK_dbo.ServiceOperators_dbo.Services_ServiceId]
    GO
    ALTER TABLE [dbo].[Services] WITH CHECK ADD CONSTRAINT [FK_dbo.Services_dbo.Services_ParentId] FOREIGN KEY([ParentId])
    REFERENCES [dbo].[Services] ([Id])
    GO
    ALTER TABLE [dbo].[Services] CHECK CONSTRAINT [FK_dbo.Services_dbo.Services_ParentId]
    GO
    ALTER TABLE [dbo].[TicketInvitations] WITH CHECK ADD CONSTRAINT [FK_dbo.TicketInvitations_dbo.Tickets_TicketId] FOREIGN KEY([TicketId])
    REFERENCES [dbo].[Tickets] ([Id])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[TicketInvitations] CHECK CONSTRAINT [FK_dbo.TicketInvitations_dbo.Tickets_TicketId]
    GO
    ALTER TABLE [dbo].[Tickets] WITH CHECK ADD CONSTRAINT [FK_dbo.Tickets_dbo.Customers_CustomerId] FOREIGN KEY([CustomerId])
    REFERENCES [dbo].[Customers] ([Id])
    GO
    ALTER TABLE [dbo].[Tickets] CHECK CONSTRAINT [FK_dbo.Tickets_dbo.Customers_CustomerId]
    GO
    ALTER TABLE [dbo].[Tickets] WITH CHECK ADD CONSTRAINT [FK_dbo.Tickets_dbo.ServiceMailboxes_ServiceMailboxId] FOREIGN KEY([ServiceMailboxId])
    REFERENCES [dbo].[ServiceMailboxes] ([Id])
    GO
    ALTER TABLE [dbo].[Tickets] CHECK CONSTRAINT [FK_dbo.Tickets_dbo.ServiceMailboxes_ServiceMailboxId]
    GO
    ALTER TABLE [dbo].[Tickets] WITH CHECK ADD CONSTRAINT [FK_dbo.Tickets_dbo.Services_ServiceId] FOREIGN KEY([ServiceId])
    REFERENCES [dbo].[Services] ([Id])
    GO
    ALTER TABLE [dbo].[Tickets] CHECK CONSTRAINT [FK_dbo.Tickets_dbo.Services_ServiceId]
    GO
    ALTER TABLE [dbo].[Tickets] WITH CHECK ADD CONSTRAINT [FK_dbo.Tickets_dbo.Tickets_ParentId] FOREIGN KEY([ParentId])
    REFERENCES [dbo].[Tickets] ([Id])
    GO
    ALTER TABLE [dbo].[Tickets] CHECK CONSTRAINT [FK_dbo.Tickets_dbo.Tickets_ParentId]
    GO

  • Duplicates in library, which is in album, (more complicated)

    So I had 3 massive libraries that I merged into 1 using iPhoto Library Manager. However on my first attempt I neglected to check the option to not import duplicates and replace duplicates in existing albums. I had attempted a second time and was successful, however that library has since been damaged and is more or less un-usable.
    So reverting back to my original attempt. I have an album structure that is all set and good to go. However I forgot that there were many duplicates and I'd like to trim down the size of my library. I am aware of duplicate annihilator and would love to find a way (efficient way) to rid myself of the duplicates while not being destructive to the albums and/or being able to re-link the albums to their originals.
    I'm thinking that the tools I will be needing to use are Duplicate annihilator and iPhoto Library Manager. I think that it's the method that I can't figure out. Any help would be greatly appreciated. If I wasn't dealing with a library in excess of 40,000 photos this wouldn't be too difficult to do manually. Thanks for any suggestions.
    Nathan

    There are two apps, actually one app and one Applescript script, for finding and removing duplicate photos from iPhoto. They are:
    Duplicate Annihilator
    iPhoto AppleScript to Remove Duplicates - free
    The Applescript is a wee bit slower than AH but can do essentially the same thing, identify the duplicates.  Just create two smart albums:  one with Description contains "duplicated" and one with Description contains "original". Then you can compare the two and delete the one you don't want.
    OT

  • Looping around an arraylist of strings to find matches(more complicated!)

    Total Posts: 1
    Help developing an algortim
    Posted: 03-05-2006 07:11 AM
    Hi,
    I have been bashing my head with this for a while, so any help is much appreciated!
    I bascially have ONE arraylist which contains filenames as strings (e.g. file.txt, file1.xml, file2.doc, file2.xml, file2.txt)
    The arraylist bascially contains a document name with there associated metadata document names. For example file1.doc (document file), file1.xml (metedata file).
    There will be siuations where for example file1.doc may not have an associated file1.xml file with it. And there may be situations where there are 2 documents and only one associated metadata file (e.g. file.doc, file1.txt, file1.xml)
    I basiclaly need to loop arond the arraylist identifying only files names that:
    - have an associated metadatafile (once identified put the document name in an arraylist of matches)
    -this arraylist cannot contain duplicate documents with an associated file name (e.g. file.doc, file1.txt, file1.xml), if this particualr situations occurs I want to put these filenames in an arraylist of errors.
    Please help! thanks in advance

    I'm a little lost as to how
    >(e.g. file.doc, file1.txt, file1.xml)
    contains duplicate documents with an associated filename. Either the .txt and .xml are both metadata files, and you are saying that there should never exist two metadata documents of the same name, or else you meant to say
    (e.g. file1.doc, file1.txt, file1.xml)in which case you meant that two data files (the .doc and the .txt) with the same name (file1) cannot exist together if there exists a metadata .xml of the same name.
    Assuming the latter is true, try something like this: (hot off the grill ;)
    import java.util.*;
    public class Blah {
       public static void main(String[] args) {
          List<String> fileNames = Arrays.asList( new String[] {
             "File1.txt", "File2.txt", "File1.xml", "File1.doc", "File1.blah", "File3.doc",
             "File4.xml", "File4.txt", "File5.doc", "File6.doc", "File6.xml", "File7.csv",
             "File7.xsl", "File7.xml", "File8.xml", "File9.doc", "File90.txt"
          String metadataExtension = "xml";
          Map<String, Set<String>> pendingFileNames = new TreeMap<String, Set<String>>();
          Set<String> metadataNamesFound = new TreeSet<String>();
          Map<String, String> verifiedMetadataFileNamePair = new TreeMap<String, String>();
          Map<String, Set<String>> verifiedBadFileNames = new TreeMap<String, Set<String>>();
          Set<String> verifiedFileNamesWithoutMetadata = new TreeSet<String>();
          Set<String> verifiedMetadataWithoutFileName = new TreeSet<String>();
          for (String fileName: fileNames) {
             String[] halves = fileName.split("\\.");
             System.out.println(halves[0]+" "+halves[1]);
             String nameOnly = halves[0];
             String extension = halves[1];
             Set<String> associatedExtensions = pendingFileNames.get(nameOnly);
             if (associatedExtensions == null) {
                associatedExtensions = new TreeSet<String>();
                pendingFileNames.put(nameOnly, associatedExtensions);
             if (extension.equals(metadataExtension)) {
                metadataNamesFound.add(nameOnly);
             } else {
                associatedExtensions.add(extension);
          for (String name: pendingFileNames.keySet()) {
               Set<String> fileExtensions = pendingFileNames.get(name);
               boolean metaNameWasFound = metadataNamesFound.contains(name);
               String fullMetaName = name+"."+metadataExtension;
               if (fileExtensions == null || fileExtensions.size() == 0) {
                 if (metaNameWasFound)
                     verifiedMetadataWithoutFileName.add( fullMetaName );
               } else if (fileExtensions.size() == 1) {
                  String fullFileName = name+"."+fileExtensions.iterator().next();
                  if (metaNameWasFound)
                     verifiedMetadataFileNamePair.put(fullFileName, fullMetaName);
                  else
                     verifiedFileNamesWithoutMetadata.add(fullFileName);
               } else {
                 if (metaNameWasFound)
                     verifiedBadFileNames.put( name, fileExtensions );
                  else {
                    for(String extName: fileExtensions) {
                        verifiedFileNamesWithoutMetadata.add(name+"."+extName);
          System.out.println();
          System.out.println();
          // System.out.println(pendingFileNames);
          System.out.println("Verified one-to-one file/metadata pairs: \n"+verifiedMetadataFileNamePair);
          System.out.println("\nVerified errors (more than one document to one metadata): \n"+verifiedBadFileNames);
          System.out.println("\nVerified metadataless files: \n"+verifiedFileNamesWithoutMetadata);
          System.out.println("\nVerified fileless metadata: \n"+verifiedMetadataWithoutFileName);
    }

  • My ipod is disable and i know my passcode is there a way to get more passcode login attempts?

    I remember my passcode after the fact that i have tried to put it in, now my ipod is locked. I do not have my laptop that my ipod is syncd to because i am currently deployed, is there a way to get more passcode attempts?

    Sorry but no. You have to place the iPod in Recovery Mode and connect to your computer and restore via iTunes.
    iOS: Wrong passcode results in red disabled screen
    You may not be able to redownload your iTuns purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    since you are not, I think, in the country where you purchased them.

  • LabView for More Complicated Setups

    How is LabView for a complicated setup with 5 or 6 test instruments using
    GPIB for instrument control. Automated tests required are software intensive
    with power measurements, spectrum analyzer measurements, etc.
    Gary

    What RF measurements did you setup. What is PXI. What is it about LabView
    that is so great.
    Gary
    "Labviewguru" wrote in message
    news:[email protected]..
    > I wouldn't use anything BUT LabVIEW for this, and I have.
    >
    > I created an automated test setup to take several hundred measurements
    > including all of the RF measurements, voltages, resistance, even Audio
    > levels, and a host of others using ONLY a Laptop with LabVIEW, and
    > several instruments communicating through a GPIB-USB converter.
    >
    > Of course, if I had to do it over again, I would have used PXI.

  • Alternative to Adobe Indesign for more Complicated Data Merges?

    Attached is a snapshot of what i currently have going with Adobe Indesign.
    Unfortunatly, Indesign has some problems that i have not been able to find a solution to :
    1.) When using the " Multiple Record Layout ", it will not populate the rest of the screen if there is an embedded picture in the background.
    2.) I prefer a much simpler approach, for instance, designating a certain field as Data derived from Cell " EH3 " in excel for example, instead of relying on the multiple record layout.
    3.) The Documents I want to generate are not incognito in regards to Layouts and i want something with more powerful customization and also able to use the Entire Excel File and display data all within one page, without going the multiple record layout route.
    That pretty much sums it up, I've included a picture of the templatei've made in indesign, I've made a red circle at the bottom to indicate the part of the document that will not work with a multiple record layout approach, since the data export is basically a mirror of itself all the way down.
    Any Suggestions as to what kind of program i should use would be most appreciated or alternative methods of using Indesign.Thank you for your time.

    There are third-party programs and plug-ins that do much more than Data Merge, but they usually have a high cost and a more steep learning curve. One that I've used in the past with QuarkXPress is XData from Em Software (they also have one for InDesign called InData, but I haven't used it). They're like Data Merge on steroids. There are others, so Google and see what you can find.

  • Itunes wont open more complicated

    Two users
    One was created as test for pc problems
    Other one was me
    In the test itunes is empty
    And it wants to erase shufle
    In the was me itunes doesnt open
    The backup is erased by virus
    The backup hard drive shows empty and is not recognise by the pc but thats wd and microsoft and not you
    So cant uninstall and reinstall itunes

    First, you may have to go into safe mode and remove Quicktime. Use the Windows Installer CleanUp utility to help get rid off everything. Here is an article about it
    http://support.microsoft.com/default.aspx?scid=kb;en-us;290301
    Next, I need to ask you questions. Which Service Pack of XP do you have? Which firewall and antivirus programs are you running? We will go from there...
    Rachyl

  • Who wants to have fun problem solving a more complicated issue?

    My main problem is I don't have permissions to access a Time Machine back up of all my files.
    Here's what happen: I was looking one day at how much space I was taking up with my 2009 MBP. I had about 209 GB of "other". Curious as to what this "other" was I ran Disk Inventory X to find out, but I ran into a problem. I inherited this computer from my mother who at some point turned on FileVault. Well FileVault wouldn't let me find out what that "other" space was, so I decided to try to disable it. But I could not disable it without 117 GB of free space. Unfortuantely all this "other" space took up so much that I couldn't free up enough space. I'm not exactly sure how, but somehow I finally figured out that it was a Sparse Disk Budle Image that was taking up the space. I did some research to try and figure out what this was and in my research determined it was a copy of basically everything on my computer. I had a back up of everything so I thought I could delete it all and be fine. So I did. When I did that it basically made my account unuseable because my info was wrong and all kinds of crazy stuff started happening. So I jut decided to re-image it with Mountain Lion. Now that I have re-imaged it all everything is new again I am trying to get my information back on. I understand that if I back up from Time Machine it will probably put back on FileVault, thus throwing this situation into a loop, so I don't want to do that. I really just want my 20 GB of photos back from my iPhoto library, but everytime I try to access my User account on my external hard drive it tells me I don't have permission. I tried to go into Disk Ultility and and repair permissions but it is greyed out. I'm out of ideas... I'm not computer illiterate, I actually work for an Apple reseller so I know my stuff on this. But i think I messed everything up when I deleted the Sparse Disk. I don't know. Can someone help me?

    The sparsebundle was the backing store of your FV home directory. When you deleted it, you destroyed all your data. Legacy FV has poor compatibility with Time Machine. The sparsebundle is backed up only when you log out. You'll have to find the last such snapshot and restore from it.

  • Pasting from Illustrator to Photoshop has become more complicated and unpredictable-why?

    I've been using Illustrator and Photoshop together for years, drawing in AI and pasting the results into PS. For some reason now, with AI 17.1, an unannounced change has been made, as far as I can tell: I have to be aware of the resolution settings in Illustrator-something I never had to pay attention to before-and, before I can paste the AI image from the clipboard into PS I need to adjust-manually- the size and resolution settings in the PS dialogue from the default setting (72dpi) to something resembling the units (pixels v. inches) and the resolution (300dpi) of the AI  vector image. But I thought vector art was resolution-independent? Oddly, I don't need to specify a size, just the units. I'm willing to believe that this may solve a problem or resolve an issue. So what is the problem or issue? I can't find bugger-all in the "New features" about it. What's going on? I'm on an iMac w/ 16GB RAM, running Mavericks 10.9.2. AI CC 17.1, PS CC 14.2.1.

    I changed the AI File Handling and Clipboard settings as suggested. I even tried changing the "Preserve" settings at the bottom. No change in the cut-paste procedure in Photoshop. One peculiarity I noticed: with an AI image on the clipboard, I open a "new" canvas file in PS to receive the image. The new file shows dimensions in pixels (accurate pixel dimensions, according to AI) and dpi at 72. If I change the dpi to 300 first, then change the units to inches (or centimeters), what I get is a tiny, proportional 300 dpi space into which the actual AI image won't fit. But if I change the PS canvas dimensions first,  to inches, THEN change the dpi to 300, the process works and the canvas is the correct size. So even though I have deliberately set the AI Document settings at "High" or "Custom" (300dpi) resolution-something I never had to do before- the clipboard is telling PS 72dpi instead. Why isn't Photoshop reading the actual dimensions off the clipboard? Or why isn't the clipboard getting them from AI? Hardware or OS problem? Clipboard problem?

Maybe you are looking for

  • Breadcrumb doesn't retain the previous page values

    I have the following hierarchy in my pages. home > search > summary > details. The user goes to the search page gives a criteria and the summary page shows all the required matching results. Now the summary results is a table of name, id, date etc. T

  • Mail apps/plugins to help file messages?

    With the closure of MobileMe I have finally made the move to Lion and with it I had to finally put Eudora to rest... There was a great feature in Eudora where you could simply right click on a highlighted word in an email in your Inbox and it would p

  • Is there any way I can file email and have it put back in my intray at a future date ?

    When I was working at IBM we had a facility to 'bring-up mail' at a future date. This meant that if I needed to do something at a future date (or more likely someone was standing in for me ) the email could be filed and then re-presented at a future

  • BPEL tutorial or Jdeveloper 11g ?

    Hi all, I have just installed SOA suite 11g.I am trying to create a sample BPEL process,I am unable to find create new BPEL project in Jdev 11g. Can anyone kindly post the link for bepl development tutorial in j developer 11g ? Thank You

  • Records are not readed

    Hi Experts Sometimes (in reporting or when Im doing calcs by IP functions), not all records are taked in account. Only if I collapse the Infocube, then reporting and calcs are ok.  This happend only with real-time infocubes. Whats happend? How can I