Thursday, March 22, 2012
ASP- Db Connection problem
I have a web application developed in ASP and SQL-server. One of my clients wanted the SQL DB to reisde in a separate machine than the IIS box. Also he doesn't want the SQL - DB box to be protected from public access. So only the IIS box is assiged a public IP, and the SQL box is in the same network(LAN) as of the IIS box. Now using TCP/IP can I connect to the SQL server from my ASP? or should I have to use Named pipes?
Here is the Connection string that I used:
constr="Provider=SQLOLEDB;Network Library=DBMSSOCN;SERVER=xxx;Initial Catalog=mydb;User Id=user;Password=xxxxxx;"
When I use the above, I don't know what is happening.. but my IE animated picture at the top right corner is moving(i.e its talking to the server) without any response. Can anyone of you give me a clue why this is happening?
Also I am NOT receiving any error, like 'Connection timed out' , or Script Timed out. That makes me nervous.Try creating a dsn and test the connection and/or write a vb app that uses the ado data control and use the automated connection string creator and test the connection. If that works, copy the connection string from your ado data control to your asp page.|||I like to use TCP/IP to connect, even though you hear that Name Pipe is faster. The simplest thing to do to see if you can use TCP/IP from your IIS machine is to physically logon to your IIS machine and go to DOS and enter the PING command to your SQL Server machine. Make sure you PING by hostname and not by IP address. If you get a response, perfect use TCP/IP to connect. If you don't get a response and your SQL Server machine has a static IP address, then PING by IP Address. If that is fine then I would enter my SQL Server machine into an LMHost file.
Tuesday, March 20, 2012
ASP & SQL Server on separate machines causes performance degragation
mail server, ftp server etc all on the same box.
The site runs several hundred ecommerce stores. Recently the
processor utilization has been spiking and I have decided to get
another server and use sql server on one and asp on the other.
So now I have a new windows 2003 server that I have setup all of the
asp code on. Problem is that when I run the asp code from the new
windows 2003 server it is extremely slow compared to the code running
on the old windows 2000 server which is where the sql server database
is also located.
From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.
Am I doing something wrong here or is this normal??
Could this possibly be just because the old server is still serving
many requests and is pushing the requests from the new server to the
back of the line?
Does anyone have any ideas?
The syntax I am using to open the connection string is:
db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"
conn_store.Open db_ConnectionString
where db_server is the ip address of the windows 2000 server
Is there a better way to do it across a network??
Any help or ideas would be much appreciated.Melanie:
>>From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.
Adding a new layer to an environment will rarely gain you performance.
There is an extra network hop that the server has to make to retrieve
the data.
Having said that, you will most likely gain scalability which is
different from performance.
You might want to have some form of high speed or dedicated network
connection in between your web server and sql server. Although you
should first try to determine if the connection in between the servers
is really the problem here.
FYI, your server configuration is widely used. Unless you are
retrieving a very large amount of data, you shouldn't be able to tell
that BIG of a difference.
Hope that helps.
BZ
mblack@.deltad.com (Melanie Black) wrote in message news:<3efc718d.0310291500.661bbaba@.posting.google.com>...
> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.
> From everything I have read the best way to optimize your site is to
> use 2 separate servers one for iis/asp and one for sql server.
> Am I doing something wrong here or is this normal??
> Could this possibly be just because the old server is still serving
> many requests and is pushing the requests from the new server to the
> back of the line?
> Does anyone have any ideas?
> The syntax I am using to open the connection string is:
> db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
> ";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"
> conn_store.Open db_ConnectionString
> where db_server is the ip address of the windows 2000 server
> Is there a better way to do it across a network??
> Any help or ideas would be much appreciated.|||On 29 Oct 2003 15:00:06 -0800, Melanie Black wrote:
> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.
Not a solution but:
Wouldn't it have been easier to move just SQL Server to Windows 2003 and
keep the ASP sites on the Windows 2000 machine?
--
Karim
Recommended host: http://www.cheapesthosting.com - Affordable hosting since
1998|||Actually that was originally the idea but the windows 2003 server turned
out to be windows 2003 web edition which does not support sql server.
Also I was able to figure out that by changing the database connection
type the performance increased signifigantly. I can still notice a bit
of a slowdown but not nearly what I saw before.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!sql