Procedure Lose Performance During Usage

Mar 22, 2006

Hi,

i've a store procedure has a strange behavior, As soon as created has a good performance , but after some times (indeterminated) it takes more time to be execute.... (up to 70s!!!)

The thing that i've not understood was if i take the query inside to the store i execute it separtely I get result immediately... :eek:

Dropping and re-creating procedure,it become newly fast... I've just scheduled a maintenance plan with index optimization and integrity check, but this seems doesn't work ...

Any idea?

Thanks .

View 6 Replies


ADVERTISEMENT

After Applying Security Patch MS03-031, I Lose My SQL 2K Performance Monitor Counters

Aug 20, 2003

This is related to an earlier post, but I found out that I was able to see SQL Server counters in Performance monitor before applying the patch, but the counters were not present afterwards....

do I need to edit the registry ?

View 3 Replies View Related

Data Access :: Executing Stored Procedure From Excel VBA Seems To Lose Connection In Middle Of Sproc Execution

Jul 9, 2015

I am running into an issue while executing a sproc from Excel VBA.  Everything connects fine, and I am passing a parameter, however, after a few seconds, it seems like the connection receives a "completed" command and continues down it's code, but the sproc is still executing.  The result is that I never receive the record set from the sproc.Here is the code snippet from VBA:

' Create Recordset objects.
Dim cmd As New ADODB.Command
Dim conn As ADODB.Connection
Dim prm As ADODB.Parameter
Dim sConnString As String
Dim rs As ADODB.Recordset
Dim strQry As String
Dim rowCount As Long

[code]....

And here is the sproc that is being called. the first thing it performs after the "IF" block (there are multiple steps that would consecutively be called after this, but all of the data hinges on this first step working) is a TRUNCATE statement.  After running a SQL profiler while executing the VBA code, I consistently see an "account log out" entry; almost as if the connection from the Excel workbook is sent a disconnect instruction.  The sproc continues to run and perform the rest of the script in the "IF" block, but the returned recordset is never returned back to Excel.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET NOCOUNT ON
GO

[code]....

View 4 Replies View Related

SSIS Performance And Memory Usage

Sep 24, 2007

Hi -

I am facing 2 problems :
PROBLEM 1 :
We have a few packages that run pretty fast on a desktop server with 2 Gig RAM, Dual processor (approx 4-5 hours). But the same packages run very very slow on the another server containing 8 CPU and 12 Gig RAM (ran for 24 hours without completing).

PROBLEM 2 :
The CPU% ranges from 40-80% and the PF usage is stagnant at 2GB on desktop server for the same package. But in the 8CPU server, the CPU % ranges from 0-10% but the PF Usage raises from 750 MB to 8 GB.

This has become critical to our application.

TIA,

Shabs

View 4 Replies View Related

Sql Server Performance And Memory Usage

May 31, 2007

Hi All,



I'm new at SQL Server, I decided to use it in order to get all the advantages of using Vb.net and Sql. My server is a SQL standard version. I'm using a relational DB most of the time for complex select queries, everytime the server is used it performs 30 or 40 queries at the time, and I have recently realized that server consumes a lot of memory after one or two days of beign up.

Let's say that if I restart the SQL Server memory usage is about 650 Mb, but after two days memory is 1.4Mb, I have used Sql Profiler and Tunning Assistant where it recommended me to create some indexes, which indeed I created them, but that did not solved the memory problem, although some queries run faster.



My questions are:

is this memory usage is normal ?
if not, what should I check out to reduce memory usage?

Thanks in advance

George

View 12 Replies View Related

SQL Server Performance Monitor Log File Usage ??

Nov 4, 1999

Hi,

I logged some of the parameters of my SQL server using the Performance monitor into a log file - smn5.log & the log settings in smn5.pml. I started the log and the log file (smn5.log) started growing in size indicating that it was collecting data.

I then went to Options button and said Save. After this in the File menu, I selected Export Log and saved it in a .CSV file, expecting it to contain the Logged data. However, it contains only the Log settings as shown below :
--------------------------------
Reported on L&T1362
Log File C:MSSQLLOGsmn5
Interval: 15.000 seconds

Object,Computer
SQLServer-Log,ERMINTRUDE
SQLServer-Procedure Cache,ERMINTRUDE
SQLServer-Locks,ERMINTRUDE
SQLServer,ERMINTRUDE
SQLServer-Log,FLORENCE
SQLServer-Procedure Cache,FLORENCE
SQLServer-Locks,FLORENCE
SQLServer,FLORENCE
---------------------------------

Could some one please tell me how to gather and view the logged information ? smn5.log contains 10MB of data - the perf. monitor shows that.

Thanks
Satish

View 2 Replies View Related

Performance Issue - No Index Usage If Variables Used.

Jul 25, 2007

Hi guys,



My company is currently migrating from Interbase to SQL Server 2005. During the migration we have came across a rather peculiar issue and wondering if anyone can advise.



We have a table.. named "prospect" which holds client information



We have a stored procedure which hangs on the following statement.


DECLARE @surname char(25);

SET @surname='BLAH%';

SELECT *
FROM Prospect
WHERE c_surname LIKE @surname;


The above takes 28 seconds to run. The following statement returns a result inside a second.


SELECT *
FROM Prospect
WHERE c_surname LIKE 'BLAH%';





In Interbase, the original returned the answer within a second too. The schema in both database is the same.



The 1st statement does not use an index! The execution plan is different to the 2nd statement. I am aware I can create an index recommended by the Database Engine Tuning which solves the issue or specify the index to use in the original statement but why does the engine not use the correct index if there is a variable involved? I need to know as we have just started looking at the code.



Thanks,



Kalim

View 2 Replies View Related

How To Audit Usage Of A Particular Stored Procedure

Dec 20, 2001

Hello All,
I want to audit the users who are using a particular store procedure.
Your solution for this problem is highly appreciated.
Thanks,
Naveen.

View 1 Replies View Related

How To Count Usage Of Store Procedure?

Mar 26, 2001

Hello .
How to count how many time and who executed stored procedure using Sql agent or system tables

View 1 Replies View Related

Tracing Stored Procedure (SP) Usage

Jul 20, 2005

Hi,what I am trying to discern is if there is any way of logging SPactivity on a SQL server 2k DB. Ideally I would want to log SP name,parameters, user and time.I found sp_monitor in MSDN but that just gives overall statistics.Not specific enough to aid debugging.Thanks in advance,Finlay Macrae

View 1 Replies View Related

Procedure Cache Usage Drops... Why?

Apr 28, 2008

My server (SQL 2005 SP2) typically runs with a procedure cache usage of about 92% or higher... lately it seems like at some point in time during the day it just drops to anywhere between 50% and 65%... with this comes horrible server performance and many snowball effects. If I clear the procedure cache it will go up only about 10% for a minute or two. The only way I can get it to recover completely seems to be restarting the SQL service. Then it will be fine till the next incident. The database is a read only (not set to read only but no updates other than replication). and the same SPs are run over and over and over throughout the day. also did notice that the compiles of the SPs goes up drastically at this point also. not sure if this is part of the cause or part of the effect.

CPU is normal. response from anything (even sp_who) is slow.

i do not understand the way procedure cache works completely so I thought I would ask for some direction.

Any ideas where to look or where to start???
Any thing I can do to catch this when it happens would be great.

thanks a head of time.

View 34 Replies View Related

SQL Server 2012 :: How To Capture CPU And Memory Usage For A Stored Procedure

Jan 19, 2015

I have around 100 packages (all [packages run at same time) each package calls a stored Procedure once the Stored proc Execution is completed the package will write the log information into a log table, here how can i capture the CPU and Memory usage for execution of each stored proc.

View 2 Replies View Related

Is There A Way To View Stored Procedure, Trigger AndFunction Usage In SQL Server?

Oct 11, 2006

I am maintaining an application where most of the business rules are inTriggers, Stored Procedures and User Defined Functions. When a bugarises, it can get very tedious to debug. Today for example, I wantedto modify a function that was being called by a trigger. The problemis that I don't want to change the function, for fear that it is beingcalled by one of the other SP's or triggers in the database (there arehundreds of them)Essentially, I need a tool that allows me to view where functions andsp's are being referenced from. At the very least, I'd like to performa "full text search" in the database objects, so that let's say I havea function named "fn_doSomething", I can search the schema for thisstring and get all the places where it appears.As you can see, I'm in the dark here. I've never worked on a systemwhere all business rules are at the database level. If you know of atool that does what I describe above, or anything else that wouldfacilitate my life, please let me know!Thanks for your help,Marc

View 5 Replies View Related

Computing The CPU Usage ,memory Usage For An Inserted Record

Nov 2, 2007




I have a client program that writes to sql server database 10 records per second . i want to compute the CPU usage and the memory usage for the whole program or CPU usage,memory usage for the insert statement in the program .

Can anybody help me with this?


View 6 Replies View Related

CPU Usage(%), Logical IO Performed (%) Usage For Adhoc Queries Is 90%

Sep 7, 2007



Hello, When I am seeing SQL Server 2005 Management studio Server Dashboard> I am seeing my(USERS) databases and msdb database usage is very small % of in CPU Usage(%), Logical IO Performed (%) Usage pie chart.

90% of Total cpu usage is showing for Adhoc Queries. what excatly this means in Dashboard? if application uses more than it would have shown in Database level or not?

sicerely this dashboard is good, if any one is watching daily, please advice their experiences here.

Thanks in advance. Hail SQL Server!

View 3 Replies View Related

Record Lose

May 24, 2007

Dear all,

I'm using SQL Server 2005 as my backend application. I had strange experience on it, sometime some of my records suddenly disappear without any deletion action.I've check the log files and I've already set a trigger on deletion to copy the deleted record to a history table, but I found nothing. Are there anybody that have same experience like me ?

View 6 Replies View Related

Can SQL Lose Records?

Jun 20, 2007

We are running SQL 7 with a front end that links to the tables through ODBC.In our main table, the user has no way to delete a record through theinterface, though it is possible to delete it by opening the ODBC link.Users would have no reason to delete a record, but one of our records turnedup missing.Now, it's possible that a user may have accidentally deleted the record.But, since users don't have any reason to delete records, and since theydon't access the ODBC links, it seems unlikely (though possible).I was wondering if anyone had every heard of SQL Server ever "losing" arecord that had previously been saved. I checked the nightly backup from thenight after it was added, and the record was there. So either a user deletedit, or somehow it got lost in SQL Server. I have no code that deletesrecords in this table in any way, shape or form, so it couldn't have beenmalfunctioning code.So, while I have a hard time believing that SQL Server would just "lose" arecord, I also know that anything's possible, so I thought I'd ask if anyonehad ever heard of such a thing.Thanks!Neil

View 8 Replies View Related

Lose Important Data

May 16, 2007

Hi all,
I have some problem :
I use sql server 2000,I have about 20000 records !
I delete all data unfortunately !
So , i need to restore all .
Are there way to do this ? I don't setup automatic backup !
My data is very important !

Thank you very much.

View 3 Replies View Related

Inside A Project You Lose The Control??

Jun 13, 2006

I've got a project with 12 packages. One of them runnning and at the same time when I try to alter another one or even add a new task I see that all the tasks on toolbox are disabled.

Why?

I would like to hear a good reason for this behaviour, afaik I don't get the point...

View 3 Replies View Related

Backup Of Database - Don't Lose Info - Triggers?

Feb 13, 2007

I have a database that has a table with tons of data in it and it is getting close to the 999 days before it starts deleting the oldest records. Is there a way to allow the table to keep all of the information? I don't think there is, so here is my next question. Is there a way that I can move the entire table into another database to save all the information and start over with the 999 days? My main goal here is to not lose ANY information from any table from the database.

Also, I was thinking that when an entry is added into the main table, if it can also be added into the other table where I move the old data? I think a trigger can be used here, but I'm not sure how to do one in 2005. Thank you very much in advance for your help!!!

View 1 Replies View Related

Linked Reports Lose Original Layout

Nov 16, 2005

I created a linked report and I see that the original height and width settings which were set for landscape have changed into portrait:

View 7 Replies View Related

Lose DB Connection After Calling Reporting Service By URL

Jan 24, 2008

I used the URL approach to call the reporting service. In the ASP page, I use javascript to open a new window to view the report. But when I close the new window and work on the original window. It seems that the DB connection to the SQL server is not working.


View 1 Replies View Related

Reporting Services :: Cannot Seem To Lose Most Double Borders

Aug 19, 2015

We run std 2008 r2.  On my col heading text boxes and data text boxes i'm purposely picking only borders above and left in an attempt to get rid of what looks like a double border between text boxes. 

The only places I see what appears to be a single thickness is the left of the 1st column hdg and data, and above any col hdg text box I set this way. 

Also, when I pick .5 instead of 1 pt thickness, ssrs always puts it back to 1 pt.

How can I get the appearance of single thickness borders instead double?

View 5 Replies View Related

Lose Sql Connectivity To Database When Putting New Router In.

Dec 5, 2007

We recently had a problem were a webserver lost connection to sql 2000 database after we put in a new router. When we failed back to old router it was able to connect to database again. It is using a non standard port 2125 to connect to sql database. Why would a new router cause connection problems to a database.

View 4 Replies View Related

Linked Reports Lose Original Layout For Printing

Jul 18, 2007

I have several reports that are set to landscape but then lose this layout when a linked report is created from the original report. I found the link below describing Brian Welcker's workaround and my question is where do you place the vb.net code he provided?



http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=137986&SiteID=1



View 3 Replies View Related

Jobs Lose Ownership/permissions When Server Reboots

Nov 19, 2006

This is sort of a DR issue since it involves reboots and power failures.

We have MSSQL 2005 SP1 and unpatched systems, but in particular we have this problem still with the SP1 server (in addition to the unpatched systems). Running on Win 2k3.


It seems that upon reboot, our stored SSIS jobs lose their pemissions and/or ownership for execution. It doesn't happen at every reboot or power failure, but seemingly more than half the time.

Here is the error reported:
The job failed. The owner () of job Job_1 does not have server access.

But checking the properties of the job and it shows an valid owner in the Owner field. I believe we are using Active Directory for authentication and the user listed is valid in that respect.

We have "fixed" this problem before by removing the job completely and re-installing it, with the same owner. No issues until the next system outage.

Has anyone else seen this before? Is there a fix or is this some kind of bug?

View 5 Replies View Related

SQL Server 2005 Express - Upgrading Will Lose Data?

Apr 26, 2006

Hi - quick question.

I wanted to upgrade pre-release version of SQL Express to the latest version, and wanted to make sure that none of the database information would be lost. The thing that concerns me is that it states to uninstall previous versions of SQL Server 2005 Express before installing the latest version. I threw the database tables into a backup directory, and I think this should be fine, but I want to be sure. Let me know. Thanks!

View 4 Replies View Related

XML Source: String Types Lose Length Attributes In XML Schema?

Jan 25, 2007

I'm having a problem with the XML Source data flow component not transferring the length attributes from an XML Schema to the column attributes of the output table.

An example schema that I have is:

<?xml version='1.0' encoding='UTF-8'?><data xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><xsd:schema> <xsd:simpleType name='NameType'> <xsd:restriction base='xsd:string'> <xsd:minLength value='0'/> <xsd:maxLength value='50'/> </xsd:restriction> </xsd:simpleType> <xsd:element name='Name' type='NameType' nillable='true'/> <xsd:simpleType name='FamilyType'> <xsd:restriction base='xsd:string'> <xsd:minLength value='0'/> <xsd:maxLength value='50'/> </xsd:restriction> </xsd:simpleType> <xsd:element name='Family' type='FamilyType' nillable='true'/> <xsd:element name='row'> <xsd:complexType> <xsd:sequence> <xsd:element ref='Name'/> <xsd:element ref='Family'/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name='data'> <xsd:complexType> <xsd:sequence> <xsd:element ref='row' maxOccurs='unbounded'/> </xsd:sequence> </xsd:complexType> </xsd:element></xsd:schema> <!-- data follows --> <row><Name>Fred</Name><Family>Jones</Family></row></data>
When I reference file in the XML Source data control, it correctly infers that there are two columns, but the length of the strings in the columns are set as 255.

This behaviour appears to be at odds with the SSIS documentation (SQL Server Integration Services/Integration Services Object and Concepts/Data Flow Elements/Integration Services Sources/XML Source), which states (highlighting mine):

When the data is extracted from the XML data file, it is converted to an Integration Services data type. The XSD or inline schema may specify the data type for elements, but if it does not, the XML Source Editor dialog box assigns the Unicode string data type (DT_WSTR) to the column in the output that contains the element, and sets the column length to 255 characters. If the schema specifies the maximum length of an element, the length of output column is set to this value. If the maximum length is greater than the length supported by the Integration Services data type to which the element is converted, then the data is truncated to the maximum length of the data type. For example, if a string has a length of 5000, it is truncated to 4000 characters because the maximum length of the DT_WSTR data type is 4000 characters; likewise, byte data is truncated to 8000 characters, the maximum length of the DT_BYTES data type. If the schema specifies no maximum length, the default length of columns with either data type is set to 255. Data truncation in the XML source is handled the same way as truncation in other data flow components. For more information, see Handling Errors in Data.

Has anyone had any luck in getting string lengths automatically extracted from an XML document? If so, where I am going wrong?

Regards,

Michael

View 10 Replies View Related

Do Cursors Lose Their Place If Deletes And Multiple Commits Are Occuring On The Underlying Table?

Oct 11, 2007

will my fetches on a cursor continue seamlessly even if deletes and multiple commits are occuring on the underlying source table? I want to make sure the cursor will not lose it's place as I believe some older dbms's did.

View 11 Replies View Related

SQL Server 2012 :: Query To Get CPU Usage / Memory Usage Details Of Server?

Jan 30, 2014

providing a query for fetching the data for CPU Usage, Memory usage, blocking and all details ...

I want to create a job which will run on a Node every 15 min and store data in a table for each instance...

DMV is not giving more stuff and xtended events not sure if i can store that data into a table?

View 7 Replies View Related

Procedure Performance In QA Vs Sql Agent Job

Jul 20, 2005

I am having a problem with a procedure. I can run it from QA and ittakes 50 minutes. When I have it in a scheduled job, it takes 3hours!! What could be the cause of this? Why the big timedifference?Thanks

View 3 Replies View Related

Stored Procedure Performance

Aug 6, 2007

Hey Guys,

I have a question..

i have created a procedure that is about 500 line long.

now this is actually a controller procedure which calles other procedures and functions to generate data for a report.
But this procedure table about 3 min to generate result set. I am not using any temp table. I am using table variables.

My procedure do not recompile.
My rocedure have some insert into ... Exec statements also..


My question is Will performance increase if i split the stored procedure into 2 or 3 or 4 parts?

View 3 Replies View Related

Stored Procedure Performance

Oct 23, 2006

Hello,

Given that a stored procedure and T-SQL code in query analyzer are exactly the same, why would the stored procedure run much slower?

When I mean much slower I mean 3 sec for the code in query analyzer as opposed to 2:33 sec for the stored procedure.

Exact same code!

Profiler also gives more reads and writes for stored procedure, and a lot of BatchStarted and BatchCompleted directives between the 'start' and 'end' of the stored procedure.

Any help is greatly appreciated.



-Tim

View 4 Replies View Related







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