Showing posts with label caused. Show all posts
Showing posts with label caused. Show all posts

Friday, March 9, 2012

Error 0xC020209C in Flat File Connection Manager in SSIS

Hi,
I got this error in a Flat File connection manager, it was saying that the last column caused the disk I/O Buffer overflow, whereas the last column contains 188 characters at max.

Any Idea how to deal with it ?

Thanks,
FahadI set the type of Flat File Source object to Unicode and problem was no more. But I still wonder whats the reason of this error ?

Wednesday, March 7, 2012

error :40 pls help ASAP

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


I am using SQL server Express 2005 on my local machine. And ASP.net 2.0 with C#.

SQL Server does not allow remote connections by default, if you want to connect remotely you will have to enable this feature. See the Screencast on my site for more information how to do this.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Note that the OP indicates that he is running it locally... Which is odd that it would be treating a local connection as remote.

Check the protocols under the SQL configuration tool and make sure named pipes isn't disabled.

|||Yes, I did enble all the features in SQL server Express, it allws remote conenction , TCP/IP and pipes,. I searched this problem here and did all the necessary things.
Still I get this error , please help . If I use my connection string from WEB.config i get following error

"............................................................................

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object. ................

and if I use my connection string in code , I get above error #40.

Please help.

My connection string in code look like this :

string connstr = "server=localhost; uid=myusername; pwd=mypassword; database=dabatabasename";

Please help ASAP.

thanks

|||

Your connection string is wrong, if you are using SQLServer Express, you will have to point to the Express instance:

string connstr = @."server=localhost\SQLExpress; uid=myusername; pwd=mypassword; database=dabatabasename";

Jens K. Suessmeyer

http://www.sqlserer2005.de

|||HI,

Thanks for the reply, I have modified conection String and it works ,

But I still not able to get it work from WEB.CONFIG file , Could you tell me what is the settings of WEB.CONFIG file for ASP.NET 2.0 . How can I get value of my connection String from WEB.CONFIG file.

Thanks,
|||

Could you please post the part of the connection string (if you use SQL Server authentication you can obfuscate the part with the password / username)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI Jens,

Here is the code of my connection string:

string connstr = "server=serverName\\SQLEXPRESS; Provider=SQLOLEDB; uid=myusername; DRIVER=SQL Native Client; pwd=mypasswd; database=MyDatabaseName";

This works rightnow , if I use in each pages.

Please let me kow how can I put in WEB.config file and use it in my all ASP pages.

|||

Did you make sure that you wont need the double \ in the web-config file ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI,

My problem is I am not able to get a value of Any varialbles of Web.config file.

I need to know how to get a value of any varialbes from WEB.CONFIG file.

Jatin.
|||

The web.config file is part of your ASP.NET application, you would be better off asking this question in a forum target at Visual Web Developer Express rather that SQL Server. The web.config file is not part of SQL Express and most the folks in this forum don't use VWD.

Mike

|||

Any updates on that ?

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||HI,

I have not posted yet on ASP.NET site. could you give me web address for that forum?

Jatin.

error :40 pls help ASAP

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


I am using SQL server Express 2005 on my local machine. And ASP.net 2.0 with C#.

SQL Server does not allow remote connections by default, if you want to connect remotely you will have to enable this feature. See the Screencast on my site for more information how to do this.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Note that the OP indicates that he is running it locally... Which is odd that it would be treating a local connection as remote.

Check the protocols under the SQL configuration tool and make sure named pipes isn't disabled.

|||Yes, I did enble all the features in SQL server Express, it allws remote conenction , TCP/IP and pipes,. I searched this problem here and did all the necessary things.
Still I get this error , please help . If I use my connection string from WEB.config i get following error

"............................................................................

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object. ................

and if I use my connection string in code , I get above error #40.

Please help.

My connection string in code look like this :

string connstr = "server=localhost; uid=myusername; pwd=mypassword; database=dabatabasename";

Please help ASAP.

thanks

|||

Your connection string is wrong, if you are using SQLServer Express, you will have to point to the Express instance:

string connstr = @."server=localhost\SQLExpress; uid=myusername; pwd=mypassword; database=dabatabasename";

Jens K. Suessmeyer

http://www.sqlserer2005.de

|||HI,

Thanks for the reply, I have modified conection String and it works ,

But I still not able to get it work from WEB.CONFIG file , Could you tell me what is the settings of WEB.CONFIG file for ASP.NET 2.0 . How can I get value of my connection String from WEB.CONFIG file.

Thanks,
|||

Could you please post the part of the connection string (if you use SQL Server authentication you can obfuscate the part with the password / username)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI Jens,

Here is the code of my connection string:

string connstr = "server=serverName\\SQLEXPRESS; Provider=SQLOLEDB; uid=myusername; DRIVER=SQL Native Client; pwd=mypasswd; database=MyDatabaseName";

This works rightnow , if I use in each pages.

Please let me kow how can I put in WEB.config file and use it in my all ASP pages.

|||

Did you make sure that you wont need the double \ in the web-config file ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI,

My problem is I am not able to get a value of Any varialbles of Web.config file.

I need to know how to get a value of any varialbes from WEB.CONFIG file.

Jatin.
|||

The web.config file is part of your ASP.NET application, you would be better off asking this question in a forum target at Visual Web Developer Express rather that SQL Server. The web.config file is not part of SQL Express and most the folks in this forum don't use VWD.

Mike

|||

Any updates on that ?

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||HI,

I have not posted yet on ASP.NET site. could you give me web address for that forum?

Jatin.

error :40 pls help ASAP

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


I am using SQL server Express 2005 on my local machine. And ASP.net 2.0 with C#.

SQL Server does not allow remote connections by default, if you want to connect remotely you will have to enable this feature. See the Screencast on my site for more information how to do this.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Note that the OP indicates that he is running it locally... Which is odd that it would be treating a local connection as remote.

Check the protocols under the SQL configuration tool and make sure named pipes isn't disabled.

|||Yes, I did enble all the features in SQL server Express, it allws remote conenction , TCP/IP and pipes,. I searched this problem here and did all the necessary things.
Still I get this error , please help . If I use my connection string from WEB.config i get following error

"............................................................................

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object. ................

and if I use my connection string in code , I get above error #40.

Please help.

My connection string in code look like this :

string connstr = "server=localhost; uid=myusername; pwd=mypassword; database=dabatabasename";

Please help ASAP.

thanks

|||

Your connection string is wrong, if you are using SQLServer Express, you will have to point to the Express instance:

string connstr = @."server=localhost\SQLExpress; uid=myusername; pwd=mypassword; database=dabatabasename";

Jens K. Suessmeyer

http://www.sqlserer2005.de

|||HI,

Thanks for the reply, I have modified conection String and it works ,

But I still not able to get it work from WEB.CONFIG file , Could you tell me what is the settings of WEB.CONFIG file for ASP.NET 2.0 . How can I get value of my connection String from WEB.CONFIG file.

Thanks,
|||

Could you please post the part of the connection string (if you use SQL Server authentication you can obfuscate the part with the password / username)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI Jens,

Here is the code of my connection string:

string connstr = "server=serverName\\SQLEXPRESS; Provider=SQLOLEDB; uid=myusername; DRIVER=SQL Native Client; pwd=mypasswd; database=MyDatabaseName";

This works rightnow , if I use in each pages.

Please let me kow how can I put in WEB.config file and use it in my all ASP pages.

|||

Did you make sure that you wont need the double \ in the web-config file ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||HI,

My problem is I am not able to get a value of Any varialbles of Web.config file.

I need to know how to get a value of any varialbes from WEB.CONFIG file.

Jatin.
|||

The web.config file is part of your ASP.NET application, you would be better off asking this question in a forum target at Visual Web Developer Express rather that SQL Server. The web.config file is not part of SQL Express and most the folks in this forum don't use VWD.

Mike

|||

Any updates on that ?

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||HI,

I have not posted yet on ASP.NET site. could you give me web address for that forum?

Jatin.

Sunday, February 26, 2012

Error : Difference of two datetime columns caused overflow at runtime.

At my job is a dts package that is failing in SQL 2005. I am not a SQL
expert. I am just trying to fix. I put the query in Query Analyzer
and get this error:

(4322 row(s) affected)

Server: Msg 535, Level 16, State 1, Line 1
Difference of two datetime columns caused overflow at runtime.

I am just trying to understand what this means, what I should be
looking for and what could be wrong. Here is the query:

SELECT i.SerialNumber, '' AS mac_number, DATEDIFF([second], 'Jan 1,
1970', s.DateOrdered) AS Support_StartDt, DATEDIFF([second], 'Jan 1,
1970',
s.Warranty_Enddate) AS Support_EndDt,
DATEDIFF([second], 'Jan 1, 1970', c.Registration_Date) AS
Registration_Date, c.FirstName AS enduser_fname,
c.LastName AS enduser_lname, c.CompanyName AS
enduser_companyname, c.ContactEmail AS enduser_email, c.Address AS
enduser_address1,
c.Address2 AS enduser_address2, c.City AS
enduser_city, c.State AS enduser_state, c.Zip AS enduser_zip,
c.WorkPhone AS enduser_phone,
c.Fax AS enduser_fax, d.DealerName AS
dealer_companyname, d.ContactFirstName AS dealer_fname,
d.ContactLastName AS dealer_name,
d.Address1 AS dealer_address, d.City AS
dealer_city, d.State AS dealer_state, d.Zip AS dealer_zip,
d.ContactPhone AS dealer_phone,
d.ContactFax AS dealer_fax,
ISNULL(SUBSTRING(p.ProductName, 11, LEN(p.ProductName) - 10), 'unknown
IWP product') AS product_type, '' AS extra1,
'' AS extra2, '' AS extra3, '' AS extra4, '' AS
extra5, '' AS extra6, '' AS extra7
FROM tblInventory i full outer JOIN
tblDealers d ON i.DealerID = d.DealerID full
OUTER JOIN
tblSupport s ON i.InventoryID = s.InventoryID
full outer JOIN
tblCustomers c ON s.InventoryID = c.InventoryID
LEFT OUTER JOIN
tblProducts p ON LEFT(i.SerialNumber,
PATINDEX('%-%', i.SerialNumber)) = p.SerialPrefix
WHERE i.SerialNumber <> ''

Any ideas would be greatly appreciated.geekwagon@.gmail.com (geekwagon@.gmail.com) writes:
> At my job is a dts package that is failing in SQL 2005. I am not a SQL
> expert. I am just trying to fix. I put the query in Query Analyzer
> and get this error:
>
> (4322 row(s) affected)
> Server: Msg 535, Level 16, State 1, Line 1
> Difference of two datetime columns caused overflow at runtime.
>
> I am just trying to understand what this means, what I should be
> looking for and what could be wrong. Here is the query:
>
> SELECT i.SerialNumber, '' AS mac_number, DATEDIFF([second], 'Jan 1,
> 1970', s.DateOrdered) AS Support_StartDt, DATEDIFF([second], 'Jan 1,
> 1970',
> s.Warranty_Enddate) AS Support_EndDt,
> DATEDIFF([second], 'Jan 1, 1970', c.Registration_Date) AS

One or of the rows has a value that is in 2038 or later in one of the
columns. My bets are on Warranty_Enddate and somehas put in 99991231
for an infinite warranty.

(2038-01-19 03:14:07.000 is the time when the number of seconds since
1970-01-01 exceeds the range of an un integer.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||>From Transact-SQL Reference:

DATEDIFF produces an error if the result is out of range for integer
values. For milliseconds, the maximum number is 24 days, 20 hours, 31
minutes and 23.647 seconds. For seconds, the maximum number is 68 years.

Friday, February 17, 2012

error

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)This error is mainly based ont he fact that SQL Server disables remote connections by default. If you are not sure how to switch remote conenctions on, refer to the screencast on my site for a detailed explanation.

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||

If the webcast doesn't solve your problem, you can check out:

http://blogs.msdn.com/sql_protocols/archive/2005/09/28/474698.aspx

it has a great deal of information on how to debug connectivity issues. In fact, if you search for a bit of your error string in their search box there, you should come up with quite a few blogs on configuration issues that can cause this problem and how to resolve them.

I hope this helps,

John