Showing posts with label tries. Show all posts
Showing posts with label tries. Show all posts

Tuesday, March 6, 2012

[Microsoft][ODBC SQL Server Driver]Timeout expired

Hi:
I am getting this error when the .asp page tries to connect to the DB server.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
The web server is Windows 2000 Advanced Server, Dual CPU with
Hyperthreading, P4 with 2 GB RAM. The database is SQL 2000 Standard Edition
with SP3 and Cumulative Patch for Microsoft SQL Server (815495)MS03-031
installed on a remote server with the same config. I have also tried all the
possible variations like increasing the VBscript timeout in IIS from 90 to
300 and Global transaction timeout in COM+ applications from 60 to 300. This
however is not helping either. When I check the anonymous concurrent sessions
I find atleast 950 connections at any given time. Also installed MDAC 2.7
Refresh on both the servers.
Can any one help me on this please.
Mitul Z.
Hi Mitul,
This error message is somewhat a generic error message for ODBC. Here are
some ideas for troubleshooting the issue.
1. From the server hosting your web server, can you connect to the SQL
Server using Query Analyzer? If you do not have Query Analyzer available,
you can test connectivity by creating a test ODBC DSN and using the test
facility. Can you connect to the SQL Server with these techniques?
2. If you can connect using Query Analyzer or an ODBC test DSN, then the
issue is with the asp page itself. If you cannot connect to the SQL Server
using these tests, the problem is with ODBC configuration or a network
level problem is at play.
If you suspect a network problem is at play, Network Monitor traces will be
very helpful for your troubleshooting. That will at least allow you to
know if your connection request is reaching the SQL Server.
Please let me know if this information helps.
Thank you.
Gary
This posting is provided "AS IS" with no warranties, and confers no rights.

[Microsoft][ODBC SQL Server Driver]Timeout expired

Hi:
I am getting this error when the .asp page tries to connect to the DB server
.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
The web server is Windows 2000 Advanced Server, Dual CPU with
Hyperthreading, P4 with 2 GB RAM. The database is SQL 2000 Standard Edition
with SP3 and Cumulative Patch for Microsoft SQL Server (815495)MS03-031
installed on a remote server with the same config. I have also tried all the
possible variations like increasing the VBscript timeout in IIS from 90 to
300 and Global transaction timeout in COM+ applications from 60 to 300. This
however is not helping either. When I check the anonymous concurrent session
s
I find atleast 950 connections at any given time. Also installed MDAC 2.7
Refresh on both the servers.
Can any one help me on this please.
Mitul Z.Hi Mitul,
This error message is somewhat a generic error message for ODBC. Here are
some ideas for troubleshooting the issue.
1. From the server hosting your web server, can you connect to the SQL
Server using Query Analyzer? If you do not have Query Analyzer available,
you can test connectivity by creating a test ODBC DSN and using the test
facility. Can you connect to the SQL Server with these techniques?
2. If you can connect using Query Analyzer or an ODBC test DSN, then the
issue is with the asp page itself. If you cannot connect to the SQL Server
using these tests, the problem is with ODBC configuration or a network
level problem is at play.
If you suspect a network problem is at play, Network Monitor traces will be
very helpful for your troubleshooting. That will at least allow you to
know if your connection request is reaching the SQL Server.
Please let me know if this information helps.
Thank you.
Gary
This posting is provided "AS IS" with no warranties, and confers no rights.

Thursday, February 16, 2012

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function