Sql Query For Helpdesk Application

May 25, 2006

I am having a difficult time to create the following query.

I am creating a vb.net command-line app that will produce a report from our helpdesk system on a scheduled basis. I have the following table structure

timeStamp - Date/Time
RuleID - Text(50)
ResultId - Text(50)


The RuleId are the Ids of the different server process that we monitor. The ResultId can be a 1 for Success, or 3 for Failure. Entries are only added during a falure, and the a recovery from the falure. Each entry will be a new record.

I need to get a query that will produce the following. The query will need to retrieve the first success for the RuleId after the failure since there can be many success and failure result in the table:

timestamp, RuleId, ResultId(3 - Failure), timestamp, resultId(1 - Success)

Thanks in advance

View 6 Replies


ADVERTISEMENT

Database Schema For HelpDesk Application

Nov 15, 2005

helloi have to make helpdesk application for teh IT Department of my company,so if anyone can help by supporting me by database schema for HelpDesk application.thank you for the help

View 1 Replies View Related

Helpdesk Database Statistics Crosstab Report

Jul 20, 2005

Hello SQL and Crystal Reports friends,I am trying to make a report and need some help please.It is a helpdesk database. Jobs are logged, and then closed. Each ofthese events is timestamped in the database in the date fields“DateLogged” and “DateClosed”JanFebMarAprNewClosedNewClosedNewClosedNewClosed10 51362364525etc.I am trying to create a crosstab style report that will show each monthof the year along the top, and then the number of jobs logged and closedduring that month. The problem I am having is that when Crystal Groupsby the month, you have to specify a date field for the grouping. If Iselect “DateLogged”, then the crosstab will accurately show all of thejobs logged for that month, but is not correct for the jobs closedduring that month. The problem is that is counting the number of jobsthat were both logged AND closed during the grouped month.Can anyone see how such a report is possible?Furthermore, I would like to be able to calculate how many jobs wereopen at the start of the month, as well as at the end of the month.Thank you for your help.*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

A Query Runs Fast In Query Analuser But Slow In APplication

Jul 23, 2005

I am able to run a query which runs FAst in QA but slow in theapplication.It takes about 16 m in QA but 1000 ms on theApplication.What I wanted to know is why would the query take a longtime in the application when it runs fast on SQL server?How should we try debugging it?Ajay

View 2 Replies View Related

T-SQL (SS2K8) :: Query Regarding Update Data Using Application

Apr 7, 2014

SELECT ContactID,FirstName,MiddleName,LastName,Description FROM Contact

Contact table contains 4 columns as explained. in the application there is one tab called Contact where it displays Above information and description is non editable.Now the new requirement has come user can update the description information and save information in a new column say 'Description1'. that means new column needs to be added in the db and also necessary changes needs to be done at the application side

For ex :SELECT ContactID,FirstName,MiddleName,LastName,Description,Description1 FROM Contact

Now when user views the contact table it should display description info by default from 'description' table.If he edits he should see edited data from 'description1' table.the logic should if updated data is there display that data from 'description1' table other wise display from 'description' table

View 9 Replies View Related

Application Role How Query A View Whose Reference Table Is In Another Db?

Aug 23, 2007

Hi everybody.
I created an application role in a database (DB1) and gave it all the rights on a view in DB1 which refers to a table located in another db (DB2). I also gave the rights to the app role on a table of DB1
I tried to use this app. role through the sp_setapprole launched by a user (server principal?) which is SQL Server administrator (and local administrator (Win 2003 Server)).
With the following query
SELECT USER_NAME()

I see that the approle is being used.
Than, if I query the table on DB1 everything works, but if I query the view, referring a table in db2 I get following error:


The server principal "NameOfServerPrincipal" is not able to access the database "DB2" under the current security context.
What should I do to make it work?

The table in DB2 has the same schema of the view in DB1 which refers to it.
I put the DB1 TrustWorthy and both the database have the db_chaining option activated.

Any idea on how to solve the problem would be widely appreciated.
Thank you very much.
Vania

View 5 Replies View Related

SQL Server 2012 :: Query For User Access To Application Modules

Mar 24, 2015

I have to create a query that will be returning the users and the application modules they have access for. Along with the list of users and modules the query should also return if any module is not accessible for that user.

The 'ApplicationUsers' table is like this:

CREATE TABLE #ApplicationUsers
(
userId INT,
UserName VARCHAR(50)
)
INSERT INTO #ApplicationUsers VALUES
(1, 'Daniel'), (2,'Martin'), (3, 'Brandon'), (4, 'Doug')The 'ApplicationModule' table is like this:

[Code] .....

I used pivot query but there are a couple of limitations in it(may be I am making mistakes in it). First, the pivot columns are static whereas I need dynamic column names(Application Modules). Second, I need to include all the users with all the modules with access or without access that I am unable to achieve.

View 5 Replies View Related

Query:how To Transfer Data From A .net Application In Wireless Mode In A WLAN Enviornment.

Sep 27, 2005

Hi All,

View 5 Replies View Related

Distrib.exe Application Error , Application Failed To Initialize Properly(0xx0000142)

Apr 13, 2008

have SQL Server 2005 std edition SP1 installed on Windows 2003 Std edition .Configured Transactional (single Publisher and no clustered environment.)
Replication past two months working fine, Now
1.Distrib.exe application err is coming.

Due to which my job is failing (Distributor to Subscriber).
Iam attaching thw file.
Thanks
Sandeep

View 1 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Query Window

Jan 23, 2008

Hi,I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query windowPlease see the image attached http://kyxao.net/127/ExecutionProblem.png Any ideas for this issue?Thanks a lot Jalijack 

View 2 Replies View Related

What I Need To Run Compiled Application On Another Application?

Sep 11, 2007



Hey,
don't know if it's the right place for this question but i hope you help me.
I made an application with VS 2005 that connecting to sql server file db.mdf
Now i want this application work on another user computer, and of course i don't want to install vs 2005 there.
I did install .net framework, but what i need to do to make the database work? do i have to install sql server on his computer? or is there something more simple?
I know that if i was using access file than i need to install nothing else.
please help!
thanx.
max

View 4 Replies View Related

Differentiate Between Whether Stored Procedure A Is Executed Inside Query Analyzer Or Executed Inside System Application Itself.

May 26, 2008

Just wonder whether is there any indicator or system parameters that can indicate whether stored procedure A is executed inside query analyzer or executed inside application itself so that if execution is done inside query analyzer then i can block it from being executed/retrieve sensitive data from it?

What i'm want to do is to block someone executing stored procedure using query analyzer and retrieve its sensitive results.
Stored procedure A has been granted execution for public user but inside application, it will prompt access denied message if particular user has no rights to use system although knew public user name and password. Because there is second layer of user validation inside system application.

However inside query analyzer, there is no way control execution of stored procedure A it as user knew the public user name and password.

Looking forward for replies from expert here. Thanks in advance.

Note: Hope my explaination here clearly describe my current problems.

View 4 Replies View Related

My Asp.net Web Application

Feb 27, 2008

ALTER procedure [dbo].[AHD_EmpID_GET]
as
begin declare @User varchar
declare @empid varchardeclare @Pword varchar
select E.EmpID as Code, E.Empcode as Description
from AHD_glb_Employees E
inner join AHD_users U on E.empid=U.empid
--where E.Empid=@empid
end
i have tried this but it is not getting a unique value...........
can u help me pls??
 
 

View 3 Replies View Related

ASP.NET Application To Use DTS

Aug 3, 2005

I've got an application that needs to:1.  Look on the user's machine and locate a file2.  Pull that file over to DTS3.  Allow DTS to insert this file into a table
I'm sure this can be done....anyone got any article on how to do it?
Thanks!

View 1 Replies View Related

VB Application

Jan 19, 2001

Hi

I have created a Visual Basic application the connects to my SQL database.
The appliction lets a user click on a button, data is retrieved from the database
and then formatted in Excel. Everything works fine on my machine (this is probably
because i have both VB and SQL installed on my machine)
I have created a .exe and deployed the application on some users desktops. The
problem is that when they click on a button - nothing happens. I dont even get any
error messages! Everything else appears to be fine. I have tested the DSNs and
they appear to be fine too.
Does anyone know why this would happen ??

Thanks, Ruaidhri.

View 2 Replies View Related

SQL WITH WEB APPLICATION

Jun 16, 2000

hI,
EVERY ONE.
1)IF I EXECUTE QUERY FROM QUERY ANAL , QUERY & STORE PROC RUN VERY FINE , BUT SAME REPORT IF I DO FROM FRONT END(i.e from web application tool) THEN IT TAKE VERY LONG TIME.WHAT COULD BE THE REASON ?

2) IF I REBOOT MACHINE - SQL SERVER. THEN FROM FRONT END if I RUN ANY REPORT THEN IT WORK FAST BUT NOT same AS OF QUERY ANALY .I DON'T UNDERSTAND THIS .
PLEASE ANY ONE HAS COME ACORSS THIS PROBLEM & HAVE ANY SUGGECTION PLEASE REPLY ME

THANKS
NIRMAL

View 1 Replies View Related

SQL 7.0 And NT Application Log

Apr 12, 1999

Whenever a user logs on to SQL-Server there´s
a message in the application log of windows NT
like
"Login succeeded for user 'Domainusername'. Connection: Trusted."
Since we have lots of users. The application log fills up twice a day.
Is there any way to prevent SQL-Server from doing this ?
(I know that there are settings in the event-viewer which clear events
whenever space is needed).

Thanks.

View 2 Replies View Related

Application Log

Nov 9, 2001

Event Viewer log error "Application log is full". Please any suggestions on how to handle this. THanks

View 1 Replies View Related

Vb.net Application

Jun 26, 2007

i hv developed an application in vb.net, database is in server and more than 50 PCs i have installed my application. Is this the correct procedure, or else i hv to install it on the server and get the shortcut file in all the PCs.because if suppose i want to send a new patch file that time iam going to uninstall my application in all the PCs and installing it again. It takes time.



if i install this in server and create shortcut on every client pc, then how should i management variables value while coding. Please do let me know. thanks for your help

View 1 Replies View Related

Application To SQL Db

Mar 3, 2007

I'm not sure if this is the right section for the question, but here goes...



I have an application that needs to be run in network client mode. This app is supposed to connect to a SQL 2005 db hosted on a server. As I procede through the installation process I get a prompt when i populate the serverdb information.

'The listener port was responsice, but did not return a primary port number for <servername>. Please verify that <servername> is a valid and running database before proceeding.

A little background is in order:

Host:

Server 2003 Standard

SQL Server 2005

Installed instance of said db

Client:

Windows XP Pro sp2

Network config:

We have a domain with about 125 workstationslaptops. Windows firewall is turned off using a group policy (makes it easier to push apps out to clients). For giggles I made exceptions to the 'turned off' firewall policies for the needed ports etc. This was done on both the host server and the client.

Thank you in advance.

View 3 Replies View Related

Call SQL Job In ASP.NET Application

Jun 27, 2006

is it possible to call a SQL job from an ASP.NET application?  if so, how? I'm using VS.net2003 and am programming in C#I've been searching for a while, but haven't found anything.  It doesn't help that one of my keywords when searching is "job(s)."

View 1 Replies View Related

Regarding Update In Asp.net Application

Oct 2, 2006

i created a asp.net application using sql server. it retrieve data from a sql server and shows it in the form. it uses textbox control to show it. i wanna update it or add a new item in database. i wrote the code for it under update and add buttons. when i click on the update button after changing a data in textbox, the page is getting refreshed nad comign back to initial state without getting updated. but when i change the textbox1.text with a string in the code, its getting updated with string without any problem. even same problem for addition too, am using a dataadapeter and dataset for this. when i assign a string to the datset columns, its getting updated well but wheni assign it with textbox.text.tostring, nothing is happenig to database. can anyone help me in this issue, why the data was not sent to the datbase and the page is getting refreshed.. plz need help.. its urgent 

View 1 Replies View Related

SQL Problems With C#.Net Application

Mar 10, 2007

Below is a stored procedure i want to implement. However i am getting errors.
 
Please read and see if u can correct me.
 
Thanks
 
Gareth 
 
 
 
 
 
Create Procedure UpdateFile
 
@Filename         Varchar(255),
@imgContent       Image,
@imgContentType   Varchar(max),
@Description      Varchar(255),
@RtnDate          Datetime,
@UserID           Varchar(50)
 
As
 
Select UserID from Fileshare
If @UserID = UserID
Begin
 
UPDATE Fileshare
 
SET imgContent = @imgContent, imgContentType = @imgContentType, Userid = @UserID, Description = @Description, RtnDate = @RtnDate, FileLock = 0, LockedBy = ''
WHERE Filename = @Filename
 
-- If the parameter and current value dont match, an error
-- Is raised which i will need to deal with in my app.
 
--Error message so (without entering anything for the returned error so far is
--Msg 102, Level 15, State 1, Procedure UpdateFile, Line 19
--Incorrect syntax near '@Filename'.
 

View 5 Replies View Related

One Application With 2 DataBase

Aug 6, 2007

Hai All ,
        Iam having the one Application in DotNet2005.But iam using the two database(SqlServer2005).If user's login the application it will check credentials in first database, if he is not having the login credentials it will cheek the second Database. How can I handle in the configuration file?. How can I change the connection string depending upon the Database in my application for database operation (like insert and update).Any one kindly provide the solution.Thanks and regards,sureshK 
 

View 7 Replies View Related

Application Is Very Slow

Oct 7, 2007

 Dear All,Finally I completed my project. Thanks all you helped me to do it.Now I have the biggest problem. In my application the Data grid is filled with Data from SQL server table which has large number of records. When I run my queries in SS Management Studio it runs very fast. To fill data to datagrid it takes lots of time. How can I reduce this time. How can I increase the performance of my Application.Thanks,Janaka   

View 4 Replies View Related

Im Trying To Run A Application And Getting Following Errors

Nov 17, 2007

Imports System.Data.SqlClientImports System.DataImports Microsoft.SqlServerPartial Class _Default    Inherits System.Web.UI.Page    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click    End Sub    Protected Sub TextBox3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged    End Sub    Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource1.Selecting    End Sub    Protected Sub Save_Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Save_Button1.Click        Dim conn As New SqlConnection()        conn.ConnectionString = Data Source=REDSTONE;Persist Security Info=True;User ID=******;Password=******;Unicode=True    End SubEnd Class
 
End of statement expected.    C:Documents and SettingskasireddyMy DocumentsVisual Studio 2005WebSitesBankCustomerInfo.aspx.vb
'System.Data' is a namespace and cannot be used as an expression.    C:Documents and SettingskasireddyMy DocumentsVisual Studio 2005WebSitesBankCustomerInfo.aspx.vb
C:Documents and SettingskasireddyMy DocumentsVisual Studio 2005WebSitesBankCustomerInfo.aspx.vb 

View 1 Replies View Related

Securing Web Application

Dec 11, 2007

Hi, I am using ASP.Net 2005 with C# language and SQL SERVER 2005...
I am developing an web based application and have to deploy it on server.
I need to prevent my site from the SQL Injection and have to use some algorithms.
What is the best technique or method (Algorithm) in .Net ?
Give some measures to prevent from Hackers.

View 3 Replies View Related

Asp.Net Mobile Web Application

Jan 22, 2008

I am geeting following error while trying to acquire db connection. I use sql server ce2.0 with vs2005
Failed to find or load the registered .Net Framework Data Provider

View 3 Replies View Related

Calling The SP From ASP.NET Application

Feb 8, 2008

Hi All,
 
I have problem in calling the SP from ASP.NET application 
 @DefApp nvarchar(255)= '' ,@DefBusFunction nvarchar(255)= '' ,@DefImpact nvarchar(255) = '',AS Begin declare @sql nvarchar(4000)declare @whereClause nvarchar(4000)DECLARE     @return_value intdeclare @sqlWhere nvarchar(4000) select @sql = 'SELECT DefApp, DefBusFunction, DefImpact FROM Def LEFT JOIN ZFunction ON (def.DefApp = ZFunction.App) AND (Def.DefBusFunction = ZFunction.BusFunction)' if @DefImpact <> ''      Set @whereClause = ' where DefImpact '      SET @whereClause = @whereClause + ' = ''' + @DefImpact + '''' set @sqlWhere=@sql + @WhereClauseEXEC @sqlWhereEnd 
and i am calling this SP from my ASP.net application to fill the SSRS report. I have written code in ASP.NET like:
 sqlCmd = new SqlCommand("subbusample", conn);
sqlCmd.CommandType = CommandType.StoredProcedure;sqlCmd.Parameters.Add(new SqlParameter("@DefImpact", SqlDbType.NVarChar, 255, txtValue3.Text.ToString()));
sqlCmd.Parameters.Add(new SqlParameter("@DefBusFunction", SqlDbType.NVarChar, 255, txtValue1.Text.ToString()));
sqlCmd.Parameters.Add(new SqlParameter("@DefApp", SqlDbType.NVarChar, 255, txtValue2.Text.ToString()));
 RptViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
RptViewer.ServerReport.ReportServerUrl = new System.Uri("http://servername/ReportServer");RptViewer.ShowParameterPrompts = false;
RptViewer.ServerReport.ReportPath = "/folder name/Subbu_Sample";
 
when i execute it, i am not able to fill the report with data.
 
Please let me know what i am doing wrong.
 
Thanks,
SR.

View 6 Replies View Related

Using SQL Application Roles From ASP.NET

Nov 1, 2004

Hi there

Can anyone point me to a good tutorial or give me a run down on using Sql Application roles from my asp.net application. Books Online only give a run down on how to set it up - not how to implement or use it from my code. MSDN no help. Google - same thing.

Any help greatly appreciated.

Thanks in advance

View 2 Replies View Related

SQL 2000 In A Web Application

Dec 20, 2004

Is there a way to connect to a sql db and read the databases and write them to a webpage? Then is there a way to view the tables in a selected database on a webpage?

I'm trying to make a web based enterprise manager.

View 2 Replies View Related

I Can't Execute My Asp.net Application With IIS 5.0

Apr 6, 2005

Hi,
please i have a problem, i can't execute my asp.net application with IIS 5.0?
i have a message indicating that MYSERVERASPNET can't connect, and that arrive when trying connect to the database under SQL Server 2000.
you have to know that my application work very well with webserver of WebMatrix.
Web Matrix Project : version 0.6
.Net Framework 1.1
Thank you.

View 1 Replies View Related

Application Log Is Full

Jul 3, 2001

I regularly get the message : application log is full. I cleared event viewer's log file but it didn't help.
What is this message about?
Thanks in advance,

Asnate

View 2 Replies View Related







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