help with emergency, asp program cannot talk to sql server 2000 an

C

c676228

Hi everyone,

Our site is down, because of our hosting company applied sql server 2000 sp4
on windows 2000 server.

right after it applied the service pack, our sql server database is down and
no conn etc. When one technical support restart the server,

the obejcts like tables in database cannot be recognized from our asp pages
anymore, data cannot be inserted into any database table and data cannot be
pulled out correctly from database table through asp program, but I can run
query and look at data through sql analyzer.

what is the problem, is it because of connection string? before this service
pack 4, everything runs fine and we never had this kind of disaster.

I have connection string like this:

conn.Open "dsn=XXXXXX;uid=XXXXX;pwd=XXXXXX"

Is there any problem with my connection string with sp4 applied?

Can you please help?

Betty
 
S

Steven Burn

Posting the error message(s) you are receiving, and the code you are using,
will go alot further with helping.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
C

c676228

Steven,
This is error message I got from my asp program of all pages.
Description: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object
name 'tis_productRate'

Actually the table is right there, I can see from my sql analyzer and I can
query this table, the data is right there.
Thanks for yuur help!
Betty
 
B

Bob Barrows [MVP]

c676228 said:
Steven,
This is error message I got from my asp program of all pages.
Description: [Microsoft][ODBC SQL Server Driver][SQL Server]

Nothing to do with your problem, but:
http://www.aspfaq.com/show.asp?id=2126
Invalid
object name 'tis_productRate'

Actually the table is right there, I can see from my sql analyzer and
I can query this table, the data is right there.
Thanks for yuur help!

It's most likely a permissions issue: the login you are using to connect to
your database does not have permission to view that table. If you require
further assistance, you need to post the code that produces the symptom.
 
C

c676228

Bob,
Here is the code. The error messge points to line I marked with star and
very intesting thing is to customers that some of my application looks OK
when application goes from one page to another, but behind the secene, no
data has been inserted into any database table. why does this happen right
after sp4 is applied to our sql server 2000?

dim CFARarr(6)
dim NOCFARarr(6)
dim AgeLower(6)
dim AgeUpper(6)
dim rcount

Function fillRateInfo()
Dim k
k=0

sQry="Select count(*) from tis_productRate where product ='"& "select" &"'"
* Set Rcount=conn.Execute(sQry) ' error message here
If CInt(Rcount(0)) <> 0 then
rcount=Rcount(0)
End If

cmdTemp.CommandText = "select AgeLower, AgeUpper, Rate, CFARRate from
tis_productRate where product='"& "select" &"'"
set RateChart = Server.CreateObject("ADODB.RecordSet")
RateChart.Open cmdTemp, , adOpenStatic, adLockReadOnly

While not RateChart.EOF
if k<6 then
ageLower(k)=CInt(RateChart("AgeLower"))
ageUpper(k)=CInt(RateChart("AgeUpper")) +1
CFARarr(k)=CDbl(Trim(RateChart("CFARRate")))
NOCFARarr(k)=CDbl(Trim(Ratechart("Rate")))
' age1(k).Add "Rate", RateChart("Rate")
k=k+1
end if
RateChart.movenext
wend

End Function


--
Betty


Bob Barrows said:
c676228 said:
Steven,
This is error message I got from my asp program of all pages.
Description: [Microsoft][ODBC SQL Server Driver][SQL Server]

Nothing to do with your problem, but:
http://www.aspfaq.com/show.asp?id=2126
Invalid
object name 'tis_productRate'

Actually the table is right there, I can see from my sql analyzer and
I can query this table, the data is right there.
Thanks for yuur help!

It's most likely a permissions issue: the login you are using to connect to
your database does not have permission to view that table. If you require
further assistance, you need to post the code that produces the symptom.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
L

Luke Zhang [MSFT]

Hello Betty,

I agree with Bob this seems to be a security issue. The account you used in
the conncetion string:

conn.Open "dsn=XXXXXX;uid=XXXXX;pwd=XXXXXX"

may not have permission to access the table 'tis_productRate' any more.
You may first check if the table 'tis_productRate' is owned by 'dbo' or if
the account you used is an adminitrator account in current database.

Anyway, you better consult the hosting company about this if you don't have
administrator permission on the database. Normally, this requires a
configration on the database. I think the code is OK since it used to work
fine.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bob Barrows [MVP]

c676228 said:
Bob,
Here is the code.

You left out your connection string (you can censor the sensitive
information in it, if any). That's the most relevant piece of information
needed to diagnose a security issue. We need to understand what login
account is being used to connect to your database
The error messge points to line I marked with star
and very intesting thing is to customers that some of my application
looks OK when application goes from one page to another, but behind
the secene, no data has been inserted into any database table. why
does this happen right after sp4 is applied to our sql server 2000?

I don't understand. You seem to be talking about a different problem now.
This code you are showing has nothing in it that would insert data into a
database table.


sQry="Select count(*) from tis_productRate where product ='"&
"select" &"'" * Set Rcount=conn.Execute(sQry) ' error message here

<snip - everything after this point is irrelevant - we need to see what's
happening prior to this point - specifically the point where you connect to
the database>
 
D

Dave Anderson

c676228 said:
Our site is down, because of our hosting company applied sql server
2000 sp4 on windows 2000 server.

right after it applied the service pack, our sql server database is
down and no conn etc. When one technical support restart the server,

the obejcts like tables in database cannot be recognized from our asp
pages anymore, data cannot be inserted into any database table and
data cannot be pulled out correctly from database table through asp
program, but I can run query and look at data through sql analyzer.

what is the problem, is it because of connection string? before this
service pack 4, everything runs fine and we never had this kind of
disaster.

That symptom could very well occur if you were using sa and a blank password
to connect:

"If the SQL Server instance to be upgraded to SP4 has a blank
password for the sa login account, a password must be provided
before an unattended installation is run."

http://download.microsoft.com/downl...E-4DE0-B36F-C44E06B0D2A3/ReadmeSql2k32sp4.htm
 
C

c676228

I don't really know what happened after they applied sp4 to my sql server
2000.

I told my myself, I need to take a look at my testing database, I suddenly I
found out that my live data get into my testing database and that tell me why
some my production program gives invalid object error messge. You can image
what will happen when you have production code running against testing
database.

So I look at the ODBC set up and the original DSN is pointing to testing
database instance instead of my origianl set up --> production database.

We have two database instances on our server. I guess they were not aware of
it. One is testing server(MSDE), one is production server(sql server 2000),
after the service pack is applied, something happened, I still don't know
they manually did it, or system set up?

Thank you all for providing your idea.
 
B

Bob Barrows [MVP]

c676228 said:
I don't really know what happened after they applied sp4 to my sql
server 2000.

I told my myself, I need to take a look at my testing database, I
suddenly I found out that my live data get into my testing database
and that tell me why some my production program gives invalid object
error messge. You can image what will happen when you have production
code running against testing database.

So I look at the ODBC set up and the original DSN is pointing to
testing database instance instead of my origianl set up -->
production database.

Yet another reason to avoid ODBC DSNs. Again:

http://www.aspfaq.com/show.asp?id=2126
 
C

c676228

Dave,
I didn't use sa and blank password in the origianl set up. Instead, when I
found that my dsn is switched to testing
database, the using id is SA and it has a blank password there
 
B

Bob Barrows [MVP]

c676228 said:
Dave,
I didn't use sa and blank password in the origianl set up. Instead,
when I found that my dsn is switched to testing
database, the using id is SA and it has a blank password there

.... both of which are horrible ideas, even on a test database server.

Never use the sa account in applications: create a limited-rights sql
login account and use that instead. If a hacker gains access to your sa
password, your entire network could be at risk. Guard the sa account as
if your job depended on it (it probably does)

A blank sa password is a huge security hole - have you never heard of
the Code Red worm?
 
C

c676228

sureBob,
Thank you for pointing that out. I have hear something like that, but no
what's exact name. No, I didn't use it in testing database.
I guess this is system default.
 
C

c676228

Bob,
Thank you for pointing that out. I have heard something like that, but no
what's exact name.That's why we don't use it in any database configuration
No, I didn't use it in testing database.
I guess this is system default.
 
C

c676228

Hi Bob, Dave and Steven,
Thanks you all for your idea, suggestion and comments.
I hope I didn't miss anybody's name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top