We are classic ASP programmer. We are using the database sql server 2005 management studio. ASP page is on one machine (Window server 2012 R2) and sql server 2005 management studio is on another machine (Window server 2003). When run the ASP page, It gives very slow response.
Script look like this.
strsql="select * from test1" '' 25 records on this table
Set rs = Server.CreateOb ject("ADODB.Rec ordset")
rs.open strsql, objCnn
if not rs.eof then
while not rs.eof
id = rs("id")
qty="select count(*) as tcount from test2 where id=" & id
Set rs1 = Server.CreateOb ject("ADODB.Rec ordset")
rs1.open qty, objCnn
if not rs1.eof then
tcount = rs1("tcount")
end if
rs1.close
set rs1=nothing
rs.movenext
wend
end if
rs.Close : Set rs = Nothing
when both database and ASP script on same machine then it does not take time to response. It gives response in 1-2 second but when both is in different machine it takes long time then gives the response. Some times it gives ScriptTimeout error.
We have opened the both database on the same machine and run the same query it does not take time. Query exucute time is Approx.equal.
Is there missing any IIS or ADO setting?
Can you please help us?
Script look like this.
strsql="select * from test1" '' 25 records on this table
Set rs = Server.CreateOb ject("ADODB.Rec ordset")
rs.open strsql, objCnn
if not rs.eof then
while not rs.eof
id = rs("id")
qty="select count(*) as tcount from test2 where id=" & id
Set rs1 = Server.CreateOb ject("ADODB.Rec ordset")
rs1.open qty, objCnn
if not rs1.eof then
tcount = rs1("tcount")
end if
rs1.close
set rs1=nothing
rs.movenext
wend
end if
rs.Close : Set rs = Nothing
when both database and ASP script on same machine then it does not take time to response. It gives response in 1-2 second but when both is in different machine it takes long time then gives the response. Some times it gives ScriptTimeout error.
We have opened the both database on the same machine and run the same query it does not take time. Query exucute time is Approx.equal.
Is there missing any IIS or ADO setting?
Can you please help us?
Comment