SQL 2012 :: Time Out Errors For Particular SP

Apr 13, 2014

I want to find out the time out errors for a particular SP. How to check that?

View 2 Replies


ADVERTISEMENT

Time Out Errors

May 10, 2004

Hi,
We have an application connects to the database server, recently at times it gives "Error in OpenConnection ()
TimeOut Expired" Error.
I tried to put profiler and found that
"Error: 16945, Severity: 16, State: 1"
"Error: 16937, Severity: 16, State: 1"
are currently occuring on the server at some regular intervals and at that time connection timeout expired error
comes.
the above two cursors talk about cursors, but the procedures that the application is trying to use does not have any
cursors.
any help would be highly appreciated.
regards,
Harshal.

View 2 Replies View Related

SQL 2012 :: Accurate Sorting Data Each Time With Millions Of Records Without Time Field?

Apr 25, 2014

Sample Table

USE [Testing]
GO
/****** Object: Table [dbo].[Testing] Script Date: 4/25/2014 11:08:18 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON

[Code] ....

It seems to work fine with one million records.

Each primary key is unique, but the begindate is non-unique, and i guess even if i use datetime2 and add nanoseconds, from what i have read, there is a chance that i could have a duplicate datetime since the date is imported via XML from multiple sources.

View 7 Replies View Related

SQL 2012 :: Converting Time String In Temp Table To Military Time Then Cast As Integer?

Dec 26, 2014

I need to take a temporary table that has various times stored in a text field (4:30 pm, 11:00 am, 5:30 pm, etc.), convert it to miltary time then cast it as an integer with an update statement kind of like:

Update myTable set MovieTime = REPLACE(CONVERT(CHAR(5),GETDATE(),108), ':', '')

how this can be done while my temp table is in session?

View 2 Replies View Related

Intermittent Time Out Errors

Feb 5, 2008

We recently migrated a SQL 2000 DB to SQL Server 2005 SP2. We have a VB 6 executable that uses the SQL Server 2005 DB. Immediately we began getting intermittent errors when trying to run a Stored Proc on SQL 2005 DB. The two errors we see are:

Timeout expired

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

If you immediately try to run the same query, it usually will work. The queries are random and so are the errors. I have gotten the time out error in Server Management Studio a couple of times.

In the VB 6 App we are using MDAC 2.81. Her is the connection string:
Provider=SQLOLEDB.1;User ID=user;password=password;Initial Catalog=OASIS;Data Source=servername, portnumber

We added the port number to the DataSource in an attempt to troublshoot the issue, but it made no difference.

We have run sysinternals Process Monitor on a PC with the app running and we saw NAME NOT FOUND Results for Query Open actions for these DLLS:
C:Program FilesOASISCLUSAPI.DLL
C:Program FilesOASISRESUTILS.DLL
C:Program FilesOASIStdsapi.dll

C:Program FilesOASIS is the application path. Of course, they are not in the application path but they are in C:WindowsSystem32. They do not seem to be registered.

Here is an example of the code we use in a class to run a SP:

Public Function FetchPostings() As ADODB.Recordset
Dim cmFetch As ADODB.Command

On Error GoTo HandleError
Set cmFetch = New ADODB.Command
With cmFetch
.Name = "FetchObligations"
.ActiveConnection = gobjSecurity.Connection 'This is a connection string not a connection object
.CommandText = "spClaimFetchObligations"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("ClaimID", adInteger, adParamInput, , mlngClaimID)
Set FetchObligations = .Execute
End With

ExitSub:
Set cmFetch = Nothing
Exit Function

HandleError:
gobjError.HandleError Err.Number, Err.Description, App.EXEName, "clsClaim", "FetchObligations", gobjSecurity.UserID
Resume ExitSub
End Function


View 1 Replies View Related

Integration Services :: Errors Converting Date Time Formats With SSIS

Jul 10, 2015

I am getting below errors when I try to import data from csv format to a sqlserver table.The csv file has date column that has date with format: 7/10/2015  1:18:39 PM and the sql server is using datetime not null for that field in the table.

[OLE DB Destination [90]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Invalid date format".

[OLE DB Destination [90]] Error: There was an error with input column "Date" (138) on input "OLE DB Destination Input" (103). The column status returned was: "Conversion failed because the data value overflowed the specified type.".

View 3 Replies View Related

Correct Approach To Catching Execution Time Errors In A Custom Task

Jul 12, 2006

Hi,

I'm building a custom task and just wondering what is the correct way of passing errors back to SSIS. Is there a rcommended approach to doing this. Currently I just wrap everything in a TRY...CATCH and use componentEvents to fire it back! Here's my code:

public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser,IDTSComponentEvents componentEvents, IDTSLogging log, object transaction)
{
 bool failed = false;
 try
 {
  /*
  * do stuff in here
  */
 }
 catch (Exception e)
 {
  componentEvents.FireError(-1, "", e.Message, "", 0);
  failed = true;
 }
 if (failed)
 {
  return DTSExecResult.Failure;
 }
 else
 {
  return DTSExecResult.Success;
 }
}

 

Any comments?

 

-Jamie

 

View 5 Replies View Related

SQL 2012 :: Cluster Errors - No Auto Fail Over?

Jun 25, 2014

My environment is a 64 bit Windows Server 2012 Standard edition that is running SQL Server 2012 SP1 Standard Edition (64 bit) which has an Active Passive Cluster set up and I unfortunately had no involvement in this cluster build. The person who did is no longer with the company and is not responsive to questions.

This morning this following errors popped up:

Event ID: 1230 - Cluster resource 'Databases' (resource type 'Physical Disk', DLL 'clusres.dll') did not respond to a request in a timely fashion. Cluster health detection will attempt to automatically recover by terminating the Resource Hosting Subsystem (RHS) process running this resource. This may affect other resources hosted in the same RHS process. The resources will then be restarted.

The suspect resource 'Databases' will be marked to run in an isolated RHS process to avoid impacting multiple resources in the event that this resource failure occurs again. Please ensure services, applications, or underlying infrastructure (such as storage or networking) associated with the suspect resource is functioning properly.

Event ID: 1146 - The cluster Resource Hosting Subsystem (RHS) stopped unexpectedly. An attempt will be made to restart it. This is usually associated with recovery of a crashed or deadlocked resource. Please determine which resource and resource DLL is causing the issue and verify it is functioning properly.

When I saw these errors, I brought the "Databases", "Logs", and "Quorom" disks back online and all was well. I then proceeded to check Application and System Logs noticing there where some VMWare/SAN errors that caused the CPU spike resulting in the Cluster errors.

Regarding the questions, why didn't a failover occur and What can I do to mitigate this process are now what I am focusing on. Researching the above errors, I discovered that you could a policy based what happens in a situation like occurred this morning. You can set policies at the Role level, "Server" level, and at the disk level.

The Role Policy seems to be a little less involved, screenshot RoleProperties.png show these. I assume these are defaults. The server name properties are set to the following screenshot, Servername_Properties_Policy.png. This seems to be correct to me, but there is where I am lacking. I think this means that if it fails at this level all associated resources, disks, etc will failover to node 2.Now where I think the issue is, the third screenshot, Database_Properties_Policy.png. There is no policy set to for situation where a disk resource fails. Which I believe is what happened this morning. Some questions:

1. Do I need to set this similar to what is in the ServerName screenshot?
2. What happens if I check the box for "If restart is unsuccessful, fail over all resources in the role"? Will this only fail over this one disk? If so, it doesn't seem like that would be ideal. Would it fail over at the Role level and move over all associated resources?

I am also not sure what time limits I should set for Period restarts, maximum restarts, delay between restarts, etc...

View 3 Replies View Related

SQL 2012 :: Capturing Errors And RPC Completed With Extended Events

Jun 17, 2014

I have an existing EE setup that captures all failing queries (see code below). The problem is that I also want to somehow capture RPC_starting so that I can see which parameters are passed in whenever a query fails. Is there a way to somehow capture those two events (error_reported & rpc_starting), but only capture rpc_starting when there is actually an error reported?Or maybe just an event on rpc_starting and somehow filter to only capture when there is an error?

Existing error_reported EE code:
CREATE EVENT SESSION [what_queries_are_failing] ON SERVER ADD EVENT sqlserver.error_reported (
ACTION(sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.session_id,
package0.collect_system_time, sqlserver.transaction_id, sqlserver.username, sqlserver.client_hostname)

[code]....

View 6 Replies View Related

SQL 2012 :: Domain Account Errors Out When Use As Service Accounts

Jul 23, 2014

Installed sql server 2012 enterprise. Runs with the built in account fine.

I tried entering a domain account to run as the service account from sql configuration it fails with the error "the specified network password is not correct".

I tried from services.msc and entered successfully but when I try to restart it fails that the log in credentials are wrong.

the domain account and password I entered are just fine. What's it I should do or missing?

View 3 Replies View Related

SQL 2012 :: SSRS Log Files - Errors In Report Manager

Oct 7, 2014

I have SSRS Log files under

c:MSSQLMSRS11.MSSQLSERVERReporting ServicesLogFiles

I am getting frequently errors in report manager. When I open that log files, I can see some old logfiles in 2013. So now how to enable that logging feature again.

i.e. before that they enabled the logging in reportserver and disabled now?

View 3 Replies View Related

SQL 2012 :: How To Check Errors When Database Is Configured In AlwaysOn

Dec 15, 2014

how to check the errors when a database is configured in Always on in sql 2012?

View 1 Replies View Related

SQL 2012 :: Ignored Column In SSIS Package Throws Conversion Errors?

Dec 12, 2013

I have a data flow task in which I have a ADO NET source and OLE DB Destination. I have in the ADO NET source a sql command which pulls all the columns in a table. My requirement is to ignore a particular column,say column99. I opened advanced editor and deleted the mapping between the external and output columns for column99. I had also set the Error and Truncation to "Ignore Failure" for column99. I had also mapped the destination column to <Ignore> in OLD DB destination.

But this still throws the error-

Description: The ADO NET Source was unable to process the data. Field table-column99 missing an escape character for a quote.Unable to update PK WHERE clause.Error processing data batch.

How do I solve this?

View 9 Replies View Related

SQL Server 2012 :: Altering All Objects To Find Syntax Errors

Jul 25, 2014

How to alter all objects in database i want to find if can any syntax errors in my database after restoring from sql 2008 to 2012. I Can create as test and drop them but trying to find a way to alter proc , views and functions..

View 4 Replies View Related

SQL 2012 :: How To Resolve Data Inconsistent Errors In Merge Replication

Aug 12, 2015

How to resolve the data inconsistent errors in merge replication ?

View 0 Replies View Related

SQL 2012 :: Trace Creation Time Is Different From Time Check Creation

Oct 8, 2014

We have an SSAS instance where when we run the query "select * from $system.discover_traces" the creation time in the resultset shows a different time from when we actually started the trace.

for example if we have create the trace at 3.30pm it shows 7.35 pm in the Sql server management studio resultset when we run the query "select * from $system.discover_traces".

View 0 Replies View Related

SQL Server 2012 :: 2 Records At A Time?

Nov 15, 2013

I am developing a form for a mortgage company. There can be any number of borrowers on a given loan, and the business has asked that this form return only 2 borrowers at a time for a loan. For example, if there are 3 borrowers for a loan, they want the first copy of the form to print the first 2 borrowers and then another copy of the form to print the 3rd. No matter how many copies are printed, they want the borrower information to be labeled as 'Borrower1' xyz and 'Borrower2' xyz. Also, there will be a LOT more fields returned on the real form, so the sample information below is very simplified test data.

Sample Data:
CREATE TABLE #t (LoanID VARCHAR(5), BorrowerName VARCHAR(20), BorrowerOrder INT);
GO
INSERT INTO #t VALUES
('::E', 'John Smith', 0)
, ('::E', 'Jane Smith', 1)
, ('::E', 'Rob Jackson', 2)
, ('AF_CF', 'Sloan Burton', 1)

[code]...

I don't want that 2nd record to return. This result is what makes me think of gaps and islands, but I don't know if the 2nd record is really an island since it's (1) not stored this way...it's returning this way because of the query and (2) it's not sequential data..I tried restricting this by putting this into a CTE and then returning only the odd numbered records like I have below. This runs pretty quickly when dealing with one loan. But...I am concerned that the CTE will be slow when we run batches of loans.

Attempt with CTE:
--With CTE
;WITH cte AS
(SELECT
Borrower1 = BorrowerName
, Borrower2 = LEAD(BorrowerName) OVER(ORDER BY BorrowerOrder)
, RowNumber = ROW_NUMBER() OVER(ORDER BY BorrowerOrder)

[code]...

Is there a better, cleaner way to do this? Or is the CTE the best way to go?

View 8 Replies View Related

SQL 2012 :: Database Migration Time

Sep 2, 2014

Usually when in the process of migration, how to calculate how much time it will take to migrate the database. If a database full backup is taking approximately 3 hr how much time it will take to restore that database.

Which process is better to migrate the SQL server from 2008 to 2014.

Database migration wizard or restoring the db using backup file?

Usually if you are new to the sql server and you don't have any idea about the OS how can you find how much time it will take for migration for each database and for all databases

View 2 Replies View Related

SQL Server 2012 :: Seconds To AM / PM Time

Jun 15, 2015

I have a column that is an int field and it holds the number of seconds that corresponds to a time during the day. Example being that 24331 will be 6:45:31 AM and 67531 will be 6:45:31 PM. I'm looking for code that will show the time in AM/PM format and with the AM and PM at the end of time.

View 5 Replies View Related

SQL 2012 :: DTSX Giving Errors - Object Reference Not Set To Instance Reference

Sep 10, 2014

I am using vs 2010 to write my dtsx import scripts.I use a script component as a source to create a flat file destination file.Everything have been working fine,but then my development machine crashed and we have to install everything again.Now when i use the execute package utility to test my scripts i get the following error:

Error system.NullReferenceException: Object refrence not set to an instance reference.

In PreExecute section
TextReader = new system.io.streamreader(" file name")
In the CreateNewOutputRows:
dim nextLine as string
nextLine = textReader.ReadLine

[code]...

is there something which i did not install or what can be the error?

View 0 Replies View Related

SQL 2012 :: Read Response Time Transaction Log

Apr 15, 2014

We have poor performance spikes on a drive containing our log file but this is only for reads and seems to be at a time when we run a re-index job. If this is a likely correlation as to poor performance in reading the log file, and what reads are done from a log file.

View 2 Replies View Related

SQL 2012 :: Removing Joins And Execution Time?

Jun 13, 2014

I have a query which contains 12 left outer join. I remove some of the joins that don't have parameters. The result is coming same but usually when we remove joining it should take less exec time but for me it is taking more time. What could be the reason?

I am getting same result set.

View 6 Replies View Related

SQL Server 2012 :: Convert Integer To Time?

Dec 3, 2014

I've got a column that holds a time value in Integer form as a number from midnight (IE military time) with no leading 0s or colons.

0 = 00:00
30 = 00:30
...

1700 = 1700 etc...

How can I convert this to a real time field?

View 9 Replies View Related

SQL Server 2012 :: Convert Varchar To Time

Mar 9, 2015

I need my code to add the varchar CPUTM field + varchar CPUZIPTIM field which both has time values to see if greater than 2 hours. How do I do this when both fields are varchar. The value in CPUTM field is 335:55:20.97 duration time. My code is below.

CPUTM = 335:55:20.97 duration time
CPUZIPTM = 0:00:01.96 duration time

select * FROM [SMF_DATA].[dbo].[System_Management_Facility]
WHERE ((convert(varchar(13), CONVERT(time, CPUTM) + CONVERT(time, CPUZIPTM))) > '02:00:00.00')

View 2 Replies View Related

SQL Server 2012 :: Increment Day To Timestamp When Time Is After 00:00

Jun 29, 2015

I have a series of time from 08:10 till 00:55 and a single date in a seperate column. What I need to have is associate the date with each time from 08:10 and when it comes after 23:55 the date needs to be incremented to the next day.

something like below

29Jun2015 08:10
29Jun2015 08:15
29Jun2015 08:20
29Jun2015 08:25
29Jun2015 08:30
29Jun2015 08:35
29Jun2015 08:40
.....
.....
....
....
29Jun2015 23:55
30Jun2015 00:00
30Jun2015 00:05
30Jun2015 00:10
30Jun2015 00:15
30Jun2015 00:20

I tried to add the based on the datepart minute however its getting added only to 00:00 and not after that.

View 9 Replies View Related

SQL 2012 :: Server Is Dropping Time From DateTime

Aug 4, 2015

I have an asp.net 4.5 webpage that has a detailsview on it that has a bound field that points to a SQL Server 2012 datetime field (CompDate). This field is supposed to capture date AND time of completion of a record (this is a data gathering project).

<asp:BoundField DataField="CompDate" HeaderText="CompDate" SortExpression="CompDate" Visible="False" />

The code that inserts the datetime:

If e.NewValues.Item("Complete") = True Then
Dim dt As DateTime = Now
e.NewValues("CompDate") = dt
e.NewValues("UNAME") = Membership.GetUser.ToString
End If

Everything works great, except when the captured date/time is sent to sql server, the time portion is getting dropped and only zeros are getting stored in the time portion.

Results:
CompleteUNameCompDate
1 CarlR 2015-08-04 00:00:00

I've tried different formatting options and converting to string..

View 0 Replies View Related

SQL Server 2012 :: String To Date Without Time

Sep 15, 2015

I have string as '1-12-2012', i wanted to convert it into date as format '2012-12-01'. I used the function as cast('1-12-2012' as Date) it's working but for a set of values where Null occurs it gives error as conversion failed when casting date and/or time from character string.

View 5 Replies View Related

SQL 2012 :: Calculating Elapsed Time Between Records?

Oct 29, 2015

I have a table that contains an employee id and dates signifying time periods that those employees were working. I need to calculate anniversaries, such as 20 year, which are the sum of all periods spend working projected out to 20 years. For example,

emp_idstart_date end_date
1001 1998-01-01 2003-06-21
1002 1999-05-23 2008-03-28
1001 2004-08-19 NULL
1003 2004-10-12 2006-07-25
1004 2005-04-28 NULL
1002 2008-11-02 NULL
1003 2009-05-17 NULL

The periods in which the employees were inactive (the time period between active ranges) would push back their anniversary date, obviously. I'm only concerned with employees that are currently active (ie. the most recent record has a NULL end date). I thought about trying to use datediff to calculate the time between active periods, but I'm not sure how to go about doing it.

View 9 Replies View Related

SQL Server 2012 :: Convert Bigint Time To Datetime

Apr 17, 2014

How to convert bigint time to datetime (CST)

Declare @MyBigIntTime BIGINT =1397750400000

View 9 Replies View Related

SQL 2012 :: Calculating Elapsed Time Between Datetimes For Travel?

May 20, 2014

I have a requirement to be able to calculate the transit time between international locations when I have the flight departure time and flight arrival times and departure and arrival locations.

We have a problem though, in that the datetime stored are local times, and the journeys can involve crossing the international date line in either direction, so it is possible for the arrival time to be earlier than the departure time!

To give a famous example, if you flew Concorde from London to Washington, you could depart at 10am on the 1st of June (London time) and arrive at 8.00am on 1st June (Washington time)

Even worse, you could leave Brisbane at 2.00 am on the 1st June, cross the International Date Line and arrive at San Francisco at 23:00 on 31st May!

View 6 Replies View Related

SQL Server 2012 :: Inconsistent Results When Converting To Time?

Jun 5, 2014

I have a lot of rows of hours, set up like this: 0745, 0800, 2200, 1145 and so on (varchar(5), for some reason).

These are converted into a smalldatetime like this:

CONVERT(smalldatetime, STUFF(timestarted, 3, 0, ':')) [this would give output like this - 1900-01-01 11:45:00]

This code has been in place for years...and we stick the date on later from another column.

But recently, it's started to fail for some rows, with "The conversion of a varchar data type to a smalldatetime data type resulted in an out-of-range value".

My assumption is that new data being added in is junk. If I query for these values and just list them (rather than adding a column to convert them also) that's fine, of course. I've checked all the stuffed (but not yet converted - so 11:45 rather than 1145) output to see if it ISDATE(), and it is. There are no times with hours > 23 or minutes greater than 59 either.

If I add the CONVERT in, we see the error message. But here's the oddity, if I place all of the rows into a holding table, and retry the conversion, there is no error. It's this last bit that is puzzling me. Plus I can't see any errors in the hours data that would cause a conversion problem.

I've put the whole of this into a cursor to try to trap the error rows too, but all processes fine. Why would it fail if NOT in a cursor?

View 9 Replies View Related

SQL 2012 :: Restore MDF Then Apply Logs / Point In Time

Jun 6, 2014

Our backup system has worked ok for us to date. We can restore back to either full saves or up to a certain log (we take log backups on the hour). We've never had to, but wanted to test restoring to a point-in-time with the backup data.

What the system does is generates .mdf and .ldf files, which is essentially a full backup say in the middle of the night. It then creates .bak files for the log backups based on the backup set you want to restore.

I can detach the database and apply the .mdf and .ldf and re-attach the database, but to apply the .bak files I need to get the database into a (recovering) state. I can't seem to do that. Otherwise when I try to apply the .bak files the system says: The log or differential backup cannot be restored because no files are ready to rollforward.

How to apply a .mdf and then apply the .bak files?

View 7 Replies View Related

SQL Server 2012 :: Add 15 Minutes To A Time In Char Format

Mar 10, 2015

I am looking to be able to add 15 minutes to a time value that is in character format. here is sample data:

0530
0545
0600
0615
0630
0645
0700
0715
0730
0745

Whenever there is a leading zero, I need to preserve that as well. Here is an example of what I an looking for:

0545 + 15 = 0600
0600 + 15 = 0615
1345 + 15 = 1400

View 9 Replies View Related







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