Database Design For Ticketing System; User Ticket Quotas

Mar 21, 2006

My question takes two parts; firstly, is the new table that I'm proposing going to handle the business logic I describe below, and secondly, if I put the new table in, how in hell do I use it?

Right; present schema attached.

The idea, which I hope is fairly clear from the schema, is that you send it a buch of parameters about the event, admission date, etc, and it will return all tickets matching those parameters. An example stored proc for this is below:


CREATE PROCEDURE [dbo].[getSingleTicketsByParameters]
@eventIdINT,
@standIdINT,
@admissionDateIdINT,
@bookingDateIdINT,
@concessionIdINT,
@bookingMinQuantityIdINT,
@bookingMaxQuantityIdINT,
@membershipIdINT
AS
SET NOCOUNT ON
SELECT
[tblTickets].[id],
[tblTickets].[booking_date_id],
[tblTickets].[booking_min_quantity_id],
[tblTickets].[booking_max_quantity_id],
[tblTickets].[ticket_concession_id],
[tblTickets].[membership_id],
[tblTickets].[event_id],
[tblTickets].[stand_id],
[tblTickets].[admission_date_id],
[tblTickets].[price],
[tblTickets].[availability],
[tblTickets].[description],
[tblTickets].[admin_description],
[tblTickets].[ticket_open],
[tblTickets].[ticket_live],
[tblEvents].[event_name],
[tblEvents].[event_open],
[tblStands].[stand_name],
[tblStands].[stand_open],
[tblBookingDates].[booking_start_date],
[tblBookingDates].[booking_end_date],
[tblTicketConcessions].[concession_name],
[tblBookingMinQuantities].[booking_quantity],
[tblBookingMaxQuantities].[booking_quantity],
[tblAdmissionDates].[description],
[tblAdmissionDates].[admission_start_date],
[tblAdmissionDates].[admission_end_date],
[tblAdmissionDates].[date_open],
[tblMemberships].[membership_name]
FROM [tblTickets]
LEFT JOIN [tblEvents] ON [tblEvents].[id] = [tblTickets].[event_id]
LEFT JOIN [tblStands] ON [tblStands].[id] = [tblTickets].[stand_id]
LEFT JOIN [tblBookingDates] ON [tblBookingDates].[id] = [tblTickets].[booking_date_id]
LEFT JOIN [tblTicketConcessions] ON [tblTicketConcessions].[id] = [tblTickets].[ticket_concession_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMinQuantities ON [tblBookingMinQuantities].[id] = [tblTickets].[booking_min_quantity_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMaxQuantities ON [tblBookingMaxQuantities].[id] = [tblTickets].[booking_max_quantity_id]
LEFT JOIN [tblAdmissionDates] ON [tblAdmissionDates].[id] = [tblTickets].[admission_date_id]
LEFT JOIN [tblMemberships] ON [tblMemberships].[id] = [tblTickets].[membership_id]
WHERE 1=1
AND ([tblEvents].[id]=@eventId OR @eventId=0)
AND ([tblStands].[id]=@standId OR @standId=0)
AND ([tblTicketConcessions].[id]=@concessionId OR @concessionId=0)
AND ([tblAdmissionDates].[id]=@admissionDateId OR @admissionDateId=0)
AND ([tblBookingDates].[id]=@bookingDateId OR @bookingDateId=0)
AND ([tblBookingMinQuantities].[id]=@bookingMinQuantityId OR @bookingMinQuantityId=0)
AND ([tblBookingMaxQuantities].[id]=@bookingMaxQuantityId OR @bookingMaxQuantityId=0)
AND ([tblMemberships].[id]=@membershipId OR @membershipId=0)
GO



So. It's all about to get horribly, horribly complex (well, it is to me) so take a deep breath.

Tickets are subject to quotas. However, quotas are subject to... well, at the moment they can be based on event, stand, admission date, concession, or any combination of these. They can also be based on an individual ticket. All quotas, however, are annual; they only apply to ticket purchases in the same year. For example:
- you can't buy more than 4 tickets for date A, in stand B at event C, per year.
- you can't buy more than 2 tickets for stand D per year.
- you can't buy more than 4 of ticket number 123.

Now, I'm thinking that all I need to manage this is one table, and it's going to look a little like this:

tblQuotas
id INT PK
ticket_id INT FK
event_id INT FK
stand_id INT FK
admission_date_id INT FK
quota INT

So, if I put a record in there with an event, stand and admission date - and a quota - then I've met the first business rule that I described above. If I put in a record with just a stand id and a quota, then I've met the second sort. If I put in one with just a ticket id and a quota, then I've met the third.

Now we return to that big SQL statement above. The one that says "get me all eligible tickets that match these parameters". And it's got to get a lot bigger because I now need to not only join in tblQuotas, to see if any quotas apply to the ticket I've chosen (or to the event, stand, etc that make it up), but I've also got to join in tblBasket, and tblOrders, and tblUsers, to find out how much of any particular quota they've already used up in previous orders. Although that's only orders placed in the current year, mind. And of course I also now haveto pass the users ID in as a parameter so I can look up their order history.

Your head's hurting too, right?

So... this is where I've got to:

SELECT SUM(ticket_quantity) FROM [tblBasket]
INNER JOIN [tblTickets] ON [tblBasket].[ticket_id] = [tblTickets].[id]
INNER JOIN [tblOrders] ON [tblBasket].[order_id] = [tblOrders].[id]
WHERE
[tblTickets].[stand_id] = @standId
AND [tblOrders].[user_id] = @userId
AND ([tblOrders].[order_date] BETWEEN '2006/01/01' AND '2006/12/31')


What I want to do is incorporate that into the big SQL query up top, in such a way to make it only return tickets that not only match the ticket parameters but that also aren't linked to stands, admission dates or anything else, that the user has reached their quota on.

Oh, and I'm in a bit of a hurry so do try and get a move on won't you? ;)

But seriously - how do I put those two SQL querys together? Do I need one for each paramater that might have a quota attached, or is there a quicker way? All suggestions and advice, up to and including "get an easier job, dude", received gratefully :)

View 2 Replies


ADVERTISEMENT

Tagging System Database Design

Apr 20, 2007

Hi Guys,I've been thinking about a normalised schema for a folksonomy syetem for my site. I'm fairly sure this is a good way to do things, but I have a coupld of questions... firstly, here's a quick low down on planned schema: Usersuser_idetc.Itemsitem_iditem_descetc.Tagstag_idtag_textItemTagstag_iduser_iditem_id Okay, now here's the thing. Obviously this is quite a normalised schema. I can retrieve all of an item's / user's tags easily. What I'd need to be able to do is return the list of tags and count for each item (perhaps just an item at a time).I can't really see any problems with this right now. But what happens if I have millions or Billions of rows. What's the proper way to retrieve tag counts for a huuuge set of data. I don't neceserrily need to implement something, but I'd quite like to know how one would get around the performance aspect of such a huge table. Ideas are welcomed greatly..Thanks. 

View 3 Replies View Related

Database Design For Email System

Nov 13, 2007

Hello to all out there

I want to design a database for an Email system.

Two options are coming to my mind

1) Whether I will go with a separate table for each user which will contain in each field information like MSGid, recipient, sender, subject, message.

2) or I will maintain the information in a single table for each user.

I am not able to comprehend the pros and cons of each solution above.

Please help.

View 3 Replies View Related

MSSQL 2005 User Database Now Shows Up In System Database Folder

Dec 10, 2007

While attempting to set up sql replication in MSSQL 2005 one of my user databases is now in the systems database folder. I need to move it back to the user databases folder. Any help would be greatly appreciated.

View 16 Replies View Related

User Review Database Design

Apr 14, 2008

I involved in redesign a database for hotel review listing. My current hotel datatable below

Hotel
ID
HotelName
Description
Address
TotalRating

If I would like to extend the review feature in details based on each user comments for example
Overall 7
Rooms 6
Services 7
Food 8


Could anyone guide me how could I modify the table or add new table that allow me to do so.
Thank you

View 10 Replies View Related

Logging With Another System User Cannot Access My Database

Mar 3, 2008

Hi,

I am using SQL Server Express Edition 2005 as a backend database working with Visual Basic 2005.

I am using Vista and having two users to access to my computer. User-1 and User-2.

I created a database in User-1 and works fine Visual Basic 2005.

Now the problem is when i login to my computer system with User-2. I cannot able to access the database with encountering error like "User-1/SQLExpress". I know that i cannot able to access to database which was created in User-1.

Do you any solution to this problem. when i login with user-1 and user-2 it should able to access database.

Thanks.

Regards
Kashif Chotu

View 1 Replies View Related

DB Design :: Remove Backup Option For All User For A Database In Server

Aug 4, 2015

I don't want to any body can backup of my database, even i can also not able to take backup.

View 17 Replies View Related

Restricting Data Access To System Database And Visibility To All Other User Databases...!

Jan 31, 2008

Hi,

How would I set permission for SQL Server 2005 "User A" to prevent access to System and other user databases, also How to hide the databases that "User A" has no rights to. I mean, when User A logs in, All other user databases are not visible to him/her.

Thanks,

View 6 Replies View Related

SQL Security :: Create Database User And Give Grants To Few System Tables

Aug 12, 2015

Need to create a user in sql server provide grants to few system tables to the above user.

View 10 Replies View Related

SQL Server Admin 2014 :: Changing Drive Letter For System Database And User Databases

Oct 18, 2013

I have system database and user database file are present in G,H and W drive.The process is going to be - copy data from G to S, H to T, W to U. Rename G to X, H to Y and W to Z. Rename S to G, T to H and U to W. Reboot the servers. The original G, H and W will then be X, Y and Z. The old S will be the new G, old T will be H and old U will be W. My question is that after doing this whether my SQL server will start or not

View 8 Replies View Related

System.Data.SqlClient.SqlException: Login Failed For User ''. The User Is Not Associated With A Trusted SQL Server Connection.

May 17, 2006

 
Hi all,
Can someone explain it to me  why I am getting the following error when I try to connect SQL server express with .NET 2.0?
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.Here is my code and i am using windows authentication:
<%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.SqlClient" %>
<%
        Dim connAkaki As SqlConnection    Dim cmdSelectAuthers As SqlCommand    Dim dtrAuthers As SqlDataReader        connAkaki = New SqlConnection("Server=.SQLEXPRESS;database=akaki")             connAkaki.Open()        cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest",  connAkaki)    dtrAuthers= cmdSelectAuthers.ExecuteReader()            While dtrAuthers.Read()          Response.Write("<li>")          Response.Write(dtrAuthers("Firstname"))              End While        dtrAuthers.Close()    connAkaki.Close()    %>
 

View 2 Replies View Related

Programmatically Adding A User To The System User Role

Dec 27, 2006

We have been working on an application that will be using a forms-authenticated report server (RS2005) as a reporting back-end. Using the reporting services web service I have been able to assign permissions to objects in reporting services no problem. The issue is that each user needs to be added to the System User role to be able to use the report builder properly. I can't seem to find a way to do this programmatically. Any idea?

View 1 Replies View Related

DB Design Question - Survey System

Jul 23, 2005

I've written several survey systems in which the majority of the questionshave the same or similar responses (Yes/No, True/False, scale of 1 - 5,etc).But this latest survey system I'm working on has 8-10 sections, with avariety of question attributes and answer scales. Some items have just adescription and require a Yes/No answer, others have a description and anactive status and require a Yes/No and price answer, some require a comment,etc.Rather than build a separate response table for each survey section, I wasthinking of building one generic response table, and trying to force allsections to fit by adding columns - some of which won't apply to some items.Like this:Survey Category (will apply to all items)Survey Section (will apply to all items)Item Description (will apply to all items)Item YN (will apply to all items)Item Price (will apply to about 10% of the items)Item Points (will apply to about 10% of the items)Item Active YN (will apply to about 10% of the items)Item Fail YN (will apply to about 10% of the items)Item Comment (will apply to about 10% of the items)For instance, in the structure above the field "Item YN" would representmultiple types of answers: is the item in use?, is the item in place?, isthe item given away for free?, is the item on display?, etc. Basically,anywhere a Yes/No answer is used.The advantage is one source table (rather than 8) for storing answers, andit might be easier to query and report on.The disadvantages I see are 1) it's more difficult to understand the meaningof the responses when the answer field is named Item YN, and 2) you have anon-normalized table that's difficult for a 3rd party to understand.If I have the questions and responses in separate tables, I'll use nameslike "ItemComplimentaryYN" and "ItemUsedYN" depending on the question. It'seasier for others to learn the data.I actually don't like the "generic" approach, and probably won't use it, butI figured I'd try to get some input from others who've written surveysystems.Thanks

View 5 Replies View Related

Modifying Db Design (internal Message System)

Jun 9, 2008

Hi,

I currently have an internal message system, and I want to modify the db design so users can create their own custom folders.

Currently I have just this table in use, with the bolded column, the one I want to add. With this design, I am thinking of defaulting each "folderID" in this table to a value of 0, which will denote the standard inbox folder. I think this is better because I don't think its necessary or beneficial to have each user have their own row in this table just for their standard inbox.


CREATE TABLE [dbo].[tblMessage](
[MessageID] [int] IDENTITY(1,1) NOT NULL,
[MessageFrom] [int] NOT NULL,
[MessageTo] [int] NOT NULL,
[Message] [varchar](1500) NULL,
[prevMessage] [varchar](500) NULL,
[Subject] [varchar](50) NULL,
[date] [smalldatetime] NULL,
[Checked] [tinyint] NULL,
[deletedbySender] [tinyint] NULL,
[deletedbyRecipient] [tinyint] NULL,
[IP] [varchar](15) NULL,
[folderID] [int] NULL
)

I am planning on adding a table like this below


CREATE TABLE [dbo].[tblMessage_folders]
(
[folderID] [int] IDENTITY(1,1) NOT NULL,
[userID] [int] NOT NULL,
[folderName] [varchar](50) NULL,
[dateCreated] [smalldatetime] NULL,
)


Any differing opinions, or anyone agreeing with me I would love to hear your opinions. I'm just want to be sure this doesnt create any problems I might not be seeing.

Thanks once again!!
mike123

View 2 Replies View Related

File Archival System Table Design

Dec 13, 2007

I am preparing to design an application that will archive files created by another application. In my SQL database I want to store details about the file and then the file its self. Each file is about 500kb in size and there will be about 20,000 files generated per year.

My preference is to store these files in a blob field. It makes storage, linking to file meta data, backup etc easy for me. I have already solved the technical issues surrounding pulling the file in and out of a blob field.

By my calculations I will need a server with 10GB of disk space for each year of files archived which doesn't seem outlandish for table size.

I do not want to design my application however to find out a year from now that I should have been storing these files in a traditional file system because of (... whatever ...) and just linking them by path in the sql database.

I'm curious what users of this forum believe to be the best practices surrounding this type of database?

View 2 Replies View Related

How To Store Ticket Ages?

Dec 28, 2007

Hello there. I've been debating the best way to store the age of a ticket in a queue. Here's a little overview:

The application has a form that has users enter the current count and oldest ages of tickets in several queues. The format in the application they pull this data from stores it as Day:Hour:Minute (0:04:59)


The first time around, I stored them as datetime. But since you can't store a Day as zero (some tickets may be 0 days, 23:54 Hours old) I stored the day as a year. Well that proved to be stupid, because the averages in reports were way off. Next I stored the age as text, like this: 10459 (1 Day, 04:59 Hours old). Now my problem is when using that number in a report, I have to convert it to decimal and multiply the day by 24 and add it to the hour, just so they will be weighted correctly.

This is a mess... and I've searched all over the internet for examples, but every search result is for storing a persons age, not the age of a ticket.

Any one have any ideas?

View 2 Replies View Related

DB Design :: Database Design For Matrix Representation

May 13, 2015

I have a scenario like below

Product1
Product2 Product3
Product4 Product5
Product1 1
1 0 0
1
Product2 1
1 0 0
1
Product3 0
0 1 1
0
Product4 0
0 1 1
0
Product5 1
1 0 0
1

How to design tables in SQL Server for the above.

View 2 Replies View Related

Ticket Sales For Groups And Random Code ?

May 30, 2007

I need to provide a way to handle groups that buy tickets in bulk lots, say 20 at a time. Users can later register with a "ticket code". I need to tie these two together and provide a way for groups to buy more tickets at a later time.


There should be a code that can be generated for each ticket that a group buys. This ticket is then to be given to a user to register with. A rogue user should not find it easy to guess the code. So, I want to generate a code for each group as they register, that is a random 6 or 7 digit, alphanumeric string and then something similar for a ticket. See table definitions below.

So for a ticket code, we could have something like this:
A23486D_TR34, where A23486D would be the group code

comments/suggestions/ideas welcome

At present Ive built two tables, [groups] and [group_tickets]



[group]
id int(10) unsigned
name varchar(45)
phone varchar(10)
email varchar(45)
contact_namevarchar(100)
signup_datedatetime
last_updatedatetime
group_codevarchar(6)
addr1 varchar(45)
addr2 varchar(45)
city varchar(45)
state char(2)
zip varchar(10)

[group_ticket]
id int(10) unsigned
group_idint(10) unsigned
purchase_datedatetime
fill_datedatetime
ticket_notestext
ticket_code varchar(12)

View 1 Replies View Related

Calculating Length Of Time A Ticket Was Suspended

Mar 7, 2007

I'm trying to find a solution to for a report i am building and was hoping that some of you will share your expertise with me. Basically, I need to work out how long an Incident Ticket was suspended (ie it's status is "on hold").

The data is stored something similar to the following...

Ticket Date Status
------ ---- ------
333 14/03/2005 10:24:19 "to on hold"
333 14/03/2005 15:23:01 "from on hold"
334 14/03/2005 11:14:11 "to on hold"
334 14/03/2005 16:26:15 "from on hold"
335 15/03/2005 10:10:15 "to on hold"
335 15/03/2005 11:15:35 "from on hold"
335 15/03/2005 13:26:10 "to on hold"
335 15/03/2005 14:30:59 "from on hold"
335 16/03/2005 14:00:05 "to on hold"
335 16/03/2005 16:45:15 "from on hold"
336 16/03/2005 10:10:15 "to on hold"
336 16/03/2005 12:45:12 "from on hold"

This is the result i'd like to see....

Ticket Start Hold End Hold Time Suspended
------ ---------- -------- --------------
333 14/03/2005 10:24:19 14/03/2005 15:23:01 datediff(...
334 14/03/2005 11:14:11 14/03/2005 16:26:15 datediff(...
335 15/03/2005 10:10:15 15/03/2005 11:15:35 datediff(...
335 15/03/2005 13:26:10 15/03/2005 14:30:59 datediff(...
335 16/03/2005 14:00:05 16/03/2005 16:45:15 datediff(...
336 16/03/2005 10:10:15 16/03/2005 12:45:12 datediff(...

Has anybody done something along the same lines? If so, could you point me in the right direction?

Thanks in anticipation

Jon

View 6 Replies View Related

Reporting Services Authentication Ticket Across Domain

Apr 4, 2007

Hi,

I am new to Reporting Services. I want to use Reporting Services 2005 in our application.

My custom web application is on one machine and Reporting Services 2005 is on other machine. I am using Forms Authentication and using Single Sign On for login

If my custom web application and Reporting Services are on same machin I can get "Authentication Ticket" issued by ReportingServices2005 to the Report server.



But in this case I am not able to get "Authentication Ticket" on Report Server since it is on other machine.

I am using ReportViewer control in my web application to display Reports and using LogonUser method to get the Authentication Ticket.



How can I pass CookieAuthentication ticket from my Custom Web Application to Report Server?

Is there any work around to pass Authentication Cookie across Domain or any other solution for this?



Regards

Amit

View 3 Replies View Related

T-SQL (SS2K8) :: Function To List Distinct Pax Name And Ticket Numbers?

Mar 14, 2014

I have data in a table Item_TB that I need to extract in a way that pulls out the distinct pax name and all the ticket numbers associated with the passenger per booking reference.

The data is:

Branch Folder ID Pax TktNo BookingRef
HQ 123 1 Jim 4444 ABCDE
HQ 123 2 Bob 5555 ABCDE
HQ 123 3 Jim 6666 ABCDE
HQ 123 4 Bob 7777 ABCDE
HQ 124 1 Jenny 8888 FGHIJ
HQ 124 2 Jenny 9999 FGHIJ
HQ 124 3 Jenny 3333 FGHIJ

I somehow need to get a function to pull the data out for each booking ref like so

--BookingRef ABCDE
Jim 4444/
6666
Bob 5555
7777
--BookingRef FGHIJ
Jenny 8888/
9999/
3333

I know I can get a simple function to return the all data, but I do not know how to only include the pax name once.

View 4 Replies View Related

Database Design/query Design

Feb 13, 2002

Ok, I'm doing a football database for fixtures and stuff. The problem I am having is that in a fixture, there is both a home, and an away team. The tables as a result are something like this:

-------
Fixture
-------
fix_id
fix_date
fix_played

----
Team
----
tem_id
tem_name

-----------
TeamFixture
-----------
fix_id
tem_id
homeorawayteam
goals

It's not exactly like that, but you get the point. The question is, can I do a fixture query which results in one record per fixture, showing both teams details. The first in a hometeam field and the second in an away team field.

Fixture contains the details about the fixture like date and fixture id and has it been played

Team contains team info like team id, name, associated graphic

TeamFixture is the table which links the fixture to it's home and away team.

TeamFixture exists to prevent a many to many type relationship.

Make sense? Sorry if this turns out to be really easy, just can't get my head around it at the mo!

View 2 Replies View Related

How To Create A System Type Table/ Change User Table To System Table.

May 23, 2007

Is there any Posibility to change a User Table to System Table.

How to create one system table.

I am in Big mess that One of the Table I am using is in System Type.

I cant Index the same. Is there any Mistake we can change a user table to system table.....

View 9 Replies View Related

How Do We Determine Which User Database Tables Are Mostly Retrieved By User Or Modified By User?

May 22, 2008



Hi,
Please give the T-SQL script for this ? Thanks

Shanth


View 4 Replies View Related

Kerberos Ticket Encryption Type And AlwaysOn Availability Group Listener

Jul 6, 2015

I ran into a Kerberos authentication issue because of a missing AOAG SPN. Some of the tickets that granted me access to the nodes of the AOAG cluster were using the encryption type that I would expect. However, the MSSQLSvc SPNs were not using what I would expect!

klist

#XX> Client Somebody@somedomain.com
Server: RPCSS/MySQLServer@somedomain.com
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96

#XX> Client Somebody@somedomain.com
Server: MSSQLSvc/MySQLServer@somedomain.com
KerbTicket Encryption Type: RSADSI RC4-HMAC(NT)

#XX> Client Somebody@somedomain.com
Server: MSSQLSvc/MyAOAGListener@somedomain.com
KerbTicket Encryption Type: RSADSI RC4-HMAC(NT)

I can't seem to figure out what the next step should be, and the infrastructure admins are stumped as well. How to proceed?

View 5 Replies View Related

DB Design Question: User Polls

Jun 5, 2007

I'm making a site with a series of polls on it so it'll ask the user a lot of questions and it'll have an area where they can vote on new questions that will be added later. If a question gets X number of votes, it gets added to the appropriate poll. I'd also like to tell them at the top of every page how many questions they have not answered (so they can tell how many new ones have been posted). Right now, I'm just designing the database though.
I assume each poll could be a table and each question a column (where I can use one of the column fields to hold the question itself - can you query column descriptions?). Then the users table could link with each of them. I could expand each table as new questions are voted in. But if the number of questions goes into the hundreds, will that be a problem (number of columns)?
Anyone done something like this before?

View 12 Replies View Related

User Defined Fields Best Design

Jul 20, 2005

hi all(happy raksha bandhan day)we have one of Automation software for sales running for acustomer.He was cool for the first month of product, but later poppedwith adding some extra fields.no problems i added in database , put aseperate code in my application for that field.but later every 2 dayshe was adding new fields.....so i thought to put in some inbuilt logicuser defined fields.second his user defined fields are like shoudl benumeric,string , length validation.But do not know whats the best wayto acheive this.I mean should i make seperate table where i definefield name, data types , validation and then in my application code ageneral logic for it in my application code.Any one has prooven designfor user defined fields,just thinking if i can even get a idea.....When i die i die programming........

View 2 Replies View Related

System/User View

Mar 7, 2005

:confused: How can we determine which views in SQL-database is system or user, by making a query to any system tables?

Thanks in advance,
Jai

View 4 Replies View Related

User Rights System

Feb 22, 2007

I need some advice with a msSQL 2005 databaseI'm creating a administration program in vb.net based on a new msSql db. This programme is involved with customeradmin, facturation, products, sales,...by example: Some employees don't has anything to do with product, so they don't need the rights to delete, create or edit it.The question is how can i resolve this problem, because i don't find any good solution. The rights are for every employee different, and can be changed by a admin panel. The admin can give a employee specific rights for every part of the programmeso how can we give a user certain rights when he is logging in into the program.thanks, BoardD :S ;)

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

Identifying System/User Databases

Nov 12, 2002

Hi,

i“m looking for TSQL-Code (7.0/2000) to identify, if a SQL Server Database ist a SystemDatabase or a UserDatabase. In the sysdatabases there is no information abount that.

Skol,
Peter

View 4 Replies View Related

How To Get User Name Of The Person Loged In To The System In SQL

Sep 27, 2007



Hi,

I have written a trigger for audit trail of one table in SQL and it has to get the user name who is doing the changes from the application(.net)
I have used the SQL user name and password while connecting the .net application to the database, and because of this whoever log in to the application and make changes on that table data, in the audit trail it still shows as the database user name.

I want to display the user name of the person logged in to the application

In the query i am using "System_user" for getting the user name. And the connection string in my application has a default uid and pswd.

I want to retain uid and pswd in the connection string but still want the query to get the name of the correct logged in user to the application.

Can anybody say me if this possible.

Thanks
Gayathri.

View 3 Replies View Related

DB Design :: Filestream Pathname - Cannot Find User Defined Function

Nov 3, 2015

I'm trying to run the query given below butĀ iFile.Pathname is underlined in red.

Query: SELECT top 1 iFile.Pathname AS 'PathName' FROM Videos

Error: Cannot find either column "iFile" or the user-defined function or aggregate "iFile.Pathname", or the name is ambiguous.

Do I need to run a procedure?

View 9 Replies View Related







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