Have tables created in a database and it is for a web application. When I access the web app from my computer the Database link works perfectly fine (like searcing for a customer), but when we try to access from different computer it is taking forever to
access it. the connection used is Persist Security Info = True. (these are all within the company Intranet).
You could use Timeout and set a proper time in your connectionstring, if your connectionstring could not connect to your instance in time, it will return timeout, it will help you to aviod database connection take too long time when the connection wouldn't
build properly.
gaby58
Member
108 Points
123 Posts
Why database connection is taking too long?
Nov 20, 2012 02:04 PM|LINK
Hi all,
Have tables created in a database and it is for a web application. When I access the web app from my computer the Database link works perfectly fine (like searcing for a customer), but when we try to access from different computer it is taking forever to access it. the connection used is Persist Security Info = True. (these are all within the company Intranet).
Any help is greatly appreciated.
Thanks
jagjot
Contributor
2648 Points
1229 Posts
Re: Why database connection is taking too long?
Nov 20, 2012 02:18 PM|LINK
Try using IP address as your DBName?
M.Sc, MIEEE, MCP, CCNA
gaby58
Member
108 Points
123 Posts
Re: Why database connection is taking too long?
Nov 20, 2012 02:30 PM|LINK
You mean IP address for the server where the Databse is hosting?
jagjot
Contributor
2648 Points
1229 Posts
Re: Why database connection is taking too long?
Nov 20, 2012 02:48 PM|LINK
yes. i will also check if the sql server port 1433 i guess is open..
M.Sc, MIEEE, MCP, CCNA
gaby58
Member
108 Points
123 Posts
Re: Why database connection is taking too long?
Nov 20, 2012 03:28 PM|LINK
How to check this one, I did use IP address in the place of server name, it still doen't work.
jagjot
Contributor
2648 Points
1229 Posts
Re: Why database connection is taking too long?
Nov 20, 2012 05:53 PM|LINK
pretty easy check this article http://support.microsoft.com/kb/287932
M.Sc, MIEEE, MCP, CCNA
Chen Yu - MS...
All-Star
21584 Points
2493 Posts
Microsoft
Re: Why database connection is taking too long?
Nov 22, 2012 09:03 AM|LINK
Hi,
You could use Timeout and set a proper time in your connectionstring, if your connectionstring could not connect to your instance in time, it will return timeout, it will help you to aviod database connection take too long time when the connection wouldn't build properly.
More information about ConnectionString: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx
Best Regards,
Feedback to us
Develop and promote your apps in Windows Store