Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Thursday, March 29, 2012

Error rendering report as HTML

I am rendering a report as HTML4.0 via Web Services interface and the report
appears...but only the first page. I notice a small yellow error icon on the
bottom of the page and if I double-click it reads:
Line: 20
Error: 'Report' is undefined
Code: 0
If I view the page source, around line 20 is the following:
function OnLoadReport()
{
var pageHits = null;
var rep = new Report(1, 155, pageHits, false, docMapIds);
if (parent != self) parent.OnLoadReport(rep);
}
What gives? This report works if I render as PDF. What am I doing wrong?
Thanks
- dwdw,
Take a look at the renderstream method: http://tinyurl.com/5q4qb
Bob
"dw" <dw@.discussions.microsoft.com> wrote in message
news:EE900282-8684-44A8-BDD5-780F9B071EF8@.microsoft.com...
> I am rendering a report as HTML4.0 via Web Services interface and the
report
> appears...but only the first page. I notice a small yellow error icon on
the
> bottom of the page and if I double-click it reads:
> Line: 20
> Error: 'Report' is undefined
> Code: 0
> If I view the page source, around line 20 is the following:
> function OnLoadReport()
> {
> var pageHits = null;
> var rep = new Report(1, 155, pageHits, false, docMapIds);
> if (parent != self) parent.OnLoadReport(rep);
> }
> What gives? This report works if I render as PDF. What am I doing wrong?
> Thanks
> - dw

Error Rendering PDF Files

If anyone can offer some suggestions for fixing this, I would be really
grateful.
I have a web page that shows reports a user can select. The rendering format
I use is PDF. When the user chooses to view the report for the first time,
they get an Adobe error message saying "There was an error opening this
document. The file cannot be found." The second attempt does not generate
this error. I also added a new report and it gets the Adobe error everytime.
If I let the format come out as native SQL Reporting, the error does not
happen at all. The user's would really like to have Adobe instead.
Can anyone tell me why this is happening and how to fix it? Thank you.I found the solution to this problem. Clearing the temporary internet files
enabled the Adobe error to go away.
"Mike Collins" wrote:
> If anyone can offer some suggestions for fixing this, I would be really
> grateful.
> I have a web page that shows reports a user can select. The rendering format
> I use is PDF. When the user chooses to view the report for the first time,
> they get an Adobe error message saying "There was an error opening this
> document. The file cannot be found." The second attempt does not generate
> this error. I also added a new report and it gets the Adobe error everytime.
> If I let the format come out as native SQL Reporting, the error does not
> happen at all. The user's would really like to have Adobe instead.
> Can anyone tell me why this is happening and how to fix it? Thank you.
>sql

Tuesday, March 27, 2012

error querying SQL Server from web page

We have a problem with an asp file retrieving data from SQL Server v7 databa
ses in
our test environment. The asp file opens a recordset to get a list of active
project
databases from another database table. The asp file loops through the record
set and
builds two SQL strings using the loop's current project database name to ret
rieve
counts from each project database. The counts are displayed in a table on a
web page.
Each SQL string is used to open a recordset against the loop's current proje
ct database.
The asp file worked fine until recently. Two new project databases were crea
ted by
backing up an existing database and restoring it with the new project names.
There
is a flag that we turn on to activate a project database. As soon as the new
projects
were turned on, the asp file failed with OLE DB error 0x80040E21. The error
message
indicated that the failure occurred when trying to open the first of the two
recordsets
associated with the two SQL strings that were being created. When we turned
off the new
projects, then everything worked fine again.
We started a trace in SQL Server and found that the SQL string being execute
d changed
when we added one of the new projects.
The SQL string for the old projects looked like:
N'SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WHERE...
in which I have used 'server' to represent the SQL Server name and 'projectd
b' to
represent the project database name. The server name is always the same; onl
y the
project database name changes.
When one of the new projects was reached in the loop, the SQL string started
out the
same as above. But at some point the query changes to:
N'select * from SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WH
ERE...
The query tanks and so does the asp file. A developer searched for postings
relating to the
OLE DB error and saw something about NULLs. Since it was possible for the qu
ery to return NULL,
he tried changing the query in the asp file to:
N'SELECT Sum(isNull(StudentCount, 0)) FROM server.projectdb.dbo.Sheets WHERE
..
This fixed the problem as the query succeeded for all of the project databas
es, old and new.
The question is why this fixed the problem and how did the original query pi
ck up the additional
text "select * from". Because -
1. Upon checking the project databases, there were old project databases tha
t returned NULLs to the
queries. These project databases didn't have a problem when queried by the o
riginal asp file.
2. The new project databases were loaded with data so that they didn't retur
n NULLs. They still
caused the old asp file to fail.
3. In case the problem was with NULLs returned by an old project database pr
eceding or following
the new project database we varied which project databases were turned on. T
his didn't affect the
results at all as the asp file always failed when it came to a new project d
atabase.
So the isNull function somehow cleared up the problem even though the proble
m doesn't appear to
relate to whether NULLs are returned by the original queries.
Other things we tried that didn't help -
1. scripting the database install rather than backup\restore
2. logging on to the SQL Server box directly and installing the new database
rather than doing it
remotely with a SQL Server client
The web server and the database server are both running Windows 2000 Server
5.0.2195 SP4 Build 2195.
The SQL Server version is 7.00.624.
Can someone shed some light on this?That is a very interesting problem... I am curious, does the problem go
away if you do NOT use the 4 part name... SQL may do some strange things
when using the 4-part name because the data could be coming from a linked
server...
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Pat Hurst" <anonymous@.discussions.microsoft.com> wrote in message
news:98D3FE8E-D08A-4C8D-8614-8261C877687A@.microsoft.com...
> We have a problem with an asp file retrieving data from SQL Server v7
databases in
> our test environment. The asp file opens a recordset to get a list of
active project
> databases from another database table. The asp file loops through the
recordset and
> builds two SQL strings using the loop's current project database name to
retrieve
> counts from each project database. The counts are displayed in a table on
a web page.
> Each SQL string is used to open a recordset against the loop's current
project database.
> The asp file worked fine until recently. Two new project databases were
created by
> backing up an existing database and restoring it with the new project
names. There
> is a flag that we turn on to activate a project database. As soon as the
new projects
> were turned on, the asp file failed with OLE DB error 0x80040E21. The
error message
> indicated that the failure occurred when trying to open the first of the
two recordsets
> associated with the two SQL strings that were being created. When we
turned off the new
> projects, then everything worked fine again.
> We started a trace in SQL Server and found that the SQL string being
executed changed
> when we added one of the new projects.
> The SQL string for the old projects looked like:
> N'SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WHERE...
> in which I have used 'server' to represent the SQL Server name and
'projectdb' to
> represent the project database name. The server name is always the same;
only the
> project database name changes.
> When one of the new projects was reached in the loop, the SQL string
started out the
> same as above. But at some point the query changes to:
> N'select * from SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets
WHERE...
> The query tanks and so does the asp file. A developer searched for
postings relating to the
> OLE DB error and saw something about NULLs. Since it was possible for the
query to return NULL,
> he tried changing the query in the asp file to:
> N'SELECT Sum(isNull(StudentCount, 0)) FROM server.projectdb.dbo.Sheets
WHERE...
> This fixed the problem as the query succeeded for all of the project
databases, old and new.
> The question is why this fixed the problem and how did the original query
pick up the additional
> text "select * from". Because -
> 1. Upon checking the project databases, there were old project databases
that returned NULLs to the
> queries. These project databases didn't have a problem when queried by the
original asp file.
> 2. The new project databases were loaded with data so that they didn't
return NULLs. They still
> caused the old asp file to fail.
> 3. In case the problem was with NULLs returned by an old project database
preceding or following
> the new project database we varied which project databases were turned on.
This didn't affect the
> results at all as the asp file always failed when it came to a new project
database.
> So the isNull function somehow cleared up the problem even though the
problem doesn't appear to
> relate to whether NULLs are returned by the original queries.
> Other things we tried that didn't help -
> 1. scripting the database install rather than backup\restore
> 2. logging on to the SQL Server box directly and installing the new
database rather than doing it
> remotely with a SQL Server client
> The web server and the database server are both running Windows 2000
Server 5.0.2195 SP4 Build 2195.
> The SQL Server version is 7.00.624.
> Can someone shed some light on this?|||May I congratulate you on your prescience. I removed the server name from th
e 2 queries in the asp file and omitted the IsNull function from both. The w
eb page came up without a hitch.
It appears that the code specifies the server name earlier in setting up a c
onnection object. This connection is used to open the 2 query recordsets so
I'm not sure why the server name was used in specifying the table in the que
ries. The developer who wro
te it is out of the office currently so I can't ask him.
Still I can't help wondering why only the two new databases created a proble
m.|||After tracking down a developer with access to the production system, I was
able to find out that production uses 2 database servers. The primary holds
the system's database and some of the project databases. The other holds a f
ew of the project databases
. The two are linked in SQL Server. So that's the rationale for four part na
mes.
Our test environment can only afford one database server so a four part name
is unnecessary as the projects are all on the server that the web page conn
ects to.

error querying SQL Server from web page

We have a problem with an asp file retrieving data from SQL Server v7 databases i
our test environment. The asp file opens a recordset to get a list of active project
databases from another database table. The asp file loops through the recordset and
builds two SQL strings using the loop's current project database name to retrieve
counts from each project database. The counts are displayed in a table on a web page.
Each SQL string is used to open a recordset against the loop's current project database
The asp file worked fine until recently. Two new project databases were created b
backing up an existing database and restoring it with the new project names. Ther
is a flag that we turn on to activate a project database. As soon as the new projects
were turned on, the asp file failed with OLE DB error 0x80040E21. The error message
indicated that the failure occurred when trying to open the first of the two recordsets
associated with the two SQL strings that were being created. When we turned off the new
projects, then everything worked fine again
We started a trace in SQL Server and found that the SQL string being executed changed
when we added one of the new projects
The SQL string for the old projects looked like
N'SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WHERE..
in which I have used 'server' to represent the SQL Server name and 'projectdb' to
represent the project database name. The server name is always the same; only the
project database name changes
When one of the new projects was reached in the loop, the SQL string started out th
same as above. But at some point the query changes to
N'select * from SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WHERE..
The query tanks and so does the asp file. A developer searched for postings relating to the
OLE DB error and saw something about NULLs. Since it was possible for the query to return NULL
he tried changing the query in the asp file to
N'SELECT Sum(isNull(StudentCount, 0)) FROM server.projectdb.dbo.Sheets WHERE..
This fixed the problem as the query succeeded for all of the project databases, old and new
The question is why this fixed the problem and how did the original query pick up the additiona
text "select * from". Because
1. Upon checking the project databases, there were old project databases that returned NULLs to the
queries. These project databases didn't have a problem when queried by the original asp file
2. The new project databases were loaded with data so that they didn't return NULLs. They still
caused the old asp file to fail
3. In case the problem was with NULLs returned by an old project database preceding or following
the new project database we varied which project databases were turned on. This didn't affect the
results at all as the asp file always failed when it came to a new project database
So the isNull function somehow cleared up the problem even though the problem doesn't appear to
relate to whether NULLs are returned by the original queries
Other things we tried that didn't help
1. scripting the database install rather than backup\restor
2. logging on to the SQL Server box directly and installing the new database rather than doing it
remotely with a SQL Server clien
The web server and the database server are both running Windows 2000 Server 5.0.2195 SP4 Build 2195
The SQL Server version is 7.00.624
Can someone shed some light on this?That is a very interesting problem... I am curious, does the problem go
away if you do NOT use the 4 part name... SQL may do some strange things
when using the 4-part name because the data could be coming from a linked
server...
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Pat Hurst" <anonymous@.discussions.microsoft.com> wrote in message
news:98D3FE8E-D08A-4C8D-8614-8261C877687A@.microsoft.com...
> We have a problem with an asp file retrieving data from SQL Server v7
databases in
> our test environment. The asp file opens a recordset to get a list of
active project
> databases from another database table. The asp file loops through the
recordset and
> builds two SQL strings using the loop's current project database name to
retrieve
> counts from each project database. The counts are displayed in a table on
a web page.
> Each SQL string is used to open a recordset against the loop's current
project database.
> The asp file worked fine until recently. Two new project databases were
created by
> backing up an existing database and restoring it with the new project
names. There
> is a flag that we turn on to activate a project database. As soon as the
new projects
> were turned on, the asp file failed with OLE DB error 0x80040E21. The
error message
> indicated that the failure occurred when trying to open the first of the
two recordsets
> associated with the two SQL strings that were being created. When we
turned off the new
> projects, then everything worked fine again.
> We started a trace in SQL Server and found that the SQL string being
executed changed
> when we added one of the new projects.
> The SQL string for the old projects looked like:
> N'SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets WHERE...
> in which I have used 'server' to represent the SQL Server name and
'projectdb' to
> represent the project database name. The server name is always the same;
only the
> project database name changes.
> When one of the new projects was reached in the loop, the SQL string
started out the
> same as above. But at some point the query changes to:
> N'select * from SELECT Sum(StudentCount) FROM server.projectdb.dbo.Sheets
WHERE...
> The query tanks and so does the asp file. A developer searched for
postings relating to the
> OLE DB error and saw something about NULLs. Since it was possible for the
query to return NULL,
> he tried changing the query in the asp file to:
> N'SELECT Sum(isNull(StudentCount, 0)) FROM server.projectdb.dbo.Sheets
WHERE...
> This fixed the problem as the query succeeded for all of the project
databases, old and new.
> The question is why this fixed the problem and how did the original query
pick up the additional
> text "select * from". Because -
> 1. Upon checking the project databases, there were old project databases
that returned NULLs to the
> queries. These project databases didn't have a problem when queried by the
original asp file.
> 2. The new project databases were loaded with data so that they didn't
return NULLs. They still
> caused the old asp file to fail.
> 3. In case the problem was with NULLs returned by an old project database
preceding or following
> the new project database we varied which project databases were turned on.
This didn't affect the
> results at all as the asp file always failed when it came to a new project
database.
> So the isNull function somehow cleared up the problem even though the
problem doesn't appear to
> relate to whether NULLs are returned by the original queries.
> Other things we tried that didn't help -
> 1. scripting the database install rather than backup\restore
> 2. logging on to the SQL Server box directly and installing the new
database rather than doing it
> remotely with a SQL Server client
> The web server and the database server are both running Windows 2000
Server 5.0.2195 SP4 Build 2195.
> The SQL Server version is 7.00.624.
> Can someone shed some light on this?|||May I congratulate you on your prescience. I removed the server name from the 2 queries in the asp file and omitted the IsNull function from both. The web page came up without a hitch
It appears that the code specifies the server name earlier in setting up a connection object. This connection is used to open the 2 query recordsets so I'm not sure why the server name was used in specifying the table in the queries. The developer who wrote it is out of the office currently so I can't ask him
Still I can't help wondering why only the two new databases created a problem.

Monday, March 26, 2012

Error parsing XML SQL Command

Hi,
I'm getting some strange behavior when calling a stored proc...
It's an invoice page, so it has a list of assets, description, and $
total
You can modify this information and click on Update to update the
records with entered information. This works fine if I have one asset
in the invoice. But if I have more than one asset I get the following
error...
ParseXMLCommand->ReportEngine.Retrieval.ParseXMLCommand() [v
1.1.3]->ReportEngine.Retrieval.ExecuteQuery() [v 1.1.3] error
'80040067'
Error parsing XML SQL Command (Only one top level element is allowed in
an XML document. ).
/common/jax/applications/meter_invoices_client2.asp, line 126
Below is the code from meter_invoices_client2.asp which takes care of
this SQL operation. The commented lines are the existing query, which
is now being moved to a stored proc. with the code below. The embedded
SQL works fine under any circumstance. I don't think its a problem
with the stored procedure as it doesnt even get there yet.
'BEConn.Execute "Update InvoiceAsset SET SortTotal='" &
replace(Request.Form("SortTotal" & AssetID),"'","''") & "', " & _
' "SortOrderID='" & replace(Request.Form("SortOrderID" &
AssetID),"'","''") & "', " & _
' "Asset_location='" & replace( Request.Form("Asset_Location" &
AssetID),"'","''") & "', " & _
' "SubTotalDesc='" & replace(Request.Form("SubTotalDesc" &
replace(Request.Form("SortTotal" & AssetID),"'","''")),"'","''") & "',
" & _
' "RecordChanged='" & trim(Request.Form("Perm")) & "' " & _
' "WHERE asset_cd='" & AssetID & "'" & _
' "AND invoicenumber ='" & invoicenumber & "';"
XML_SP5 = XML_SP5 & "<sp name='p_update_sortOrders' db-code='" &
dbId & "' loc-code='1'>"
XML_SP5 = XML_SP5 & "<param name='@.asset_total' datatype='string'
index='1' value='" & replace(Request.Form("SortTotal" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 & "<param name='@.asset_orderId' datatype='string'
index='2' value='" & replace(Request.Form("SortOrderID" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 & "<param name='@.asset_location' datatype='string'
index='3' value='" & replace( Request.Form("Asset_Location" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 & "<param name='@.asset_subtotal' datatype='string'
index='4' value='" & replace(Request.Form("SubTotalDesc" &
replace(Request.Form("SortTotal" & AssetID),"'","''")),"'","''") &
"'/>"
XML_SP5 = XML_SP5 & "<param name='@.perm' datatype='string' index='5'
value='" & trim(Request.Form("Perm")) & "'/>"
XML_SP5 = XML_SP5 & "<param name='@.assetID' datatype='string'
index='6' value='" & AssetID & "'/>"
XML_SP5 = XML_SP5 & "<param name='@.invoiceNo' datatype='string'
index='7' value='" & invoicenumber & "'/>"
XML_SP5 = XML_SP5 & "</sp>"
Set oXMLRetrieve = Server.Createobject("ReportEngine.Retrieval")
Call oXMLRetrieve.ExecuteQuery(reRecordSet,XML_SP5)I think posting on here just helps me out...lol
I got it to work finally...if anyone is interested...the error was
occurring because it was looping through all the fields on the form to
check if it is the one to be updated...so everytime through the loop it
was invoking the query XML_SP5 but XML_SP5 was continually being
appended do so it would look like this on the 2nd iteration...
<sp name='p_update_sortOrders' db-code='2' loc-code='1'><param
name='@.asset_total' datatype='string' index='1' value='1029'/><param
name='@.asset_orderId' datatype='string' index='2' value='2'/><param
name='@.asset_location' datatype='string' index='3' value='WEXFORD, PA
900-18999'/><param name='@.asset_subtotal' datatype='string' index='4'
value=''/><param name='@.perm' datatype='string' index='5'
value='N'/><param name='@.assetID' datatype='string' index='6'
value='663018'/><param name='@.invoiceNo' datatype='string' index='7'
value='3459956'/></sp><sp name='p_update_sortOrders' db-code='2'
loc-code='1'><param name='@.asset_total' datatype='string' index='1'
value='4016'/><param name='@.asset_orderId' datatype='string' index='2'
value='43'/><param name='@.asset_location' datatype='string' index='3'
value='COLUMBIA, MD 900-19002'/><param name='@.asset_subtotal'
datatype='string' index='4' value='SPEED CODE 4016'/><param
name='@.perm' datatype='string' index='5' value='N'/><param
name='@.assetID' datatype='string' index='6' value='663021'/><param
name='@.invoiceNo' datatype='string' index='7' value='3459956'/></sp>
which makes it 2 top level elements (sp) and hence throws the error
Cheers!

Error parsing XML SQL Command

Hi,
I'm getting some strange behavior when calling a stored proc...
It's an invoice page, so it has a list of assets, description, and $
total
You can modify this information and click on Update to update the
records with entered information. This works fine if I have one asset
in the invoice. But if I have more than one asset I get the following
error...
ParseXMLCommand->ReportEngine.Retrieval.ParseXMLCommand() [v
1.1.3]->ReportEngine.Retrieval.ExecuteQuery() [v 1.1.3] error
'80040067'
Error parsing XML SQL Command (Only one top level element is allowed in
an XML document. ).
/common/jax/applications/meter_invoices_client2.asp, line 126
Below is the code from meter_invoices_client2.asp which takes care of
this SQL operation. The commented lines are the existing query, which
is now being moved to a stored proc. with the code below. The embedded
SQL works fine under any circumstance. I don't think its a problem
with the stored procedure as it doesnt even get there yet.
'BEConn.Execute "Update InvoiceAsset SET SortTotal='" &
replace(Request.Form("SortTotal" & AssetID),"'","''") & "', " & _
'"SortOrderID='" & replace(Request.Form("SortOrderID" &
AssetID),"'","''") & "', " & _
'"Asset_location='" & replace( Request.Form("Asset_Location" &
AssetID),"'","''") & "', " & _
'"SubTotalDesc='" & replace(Request.Form("SubTotalDesc" &
replace(Request.Form("SortTotal" & AssetID),"'","''")),"'","''") & "',
" & _
'"RecordChanged='" & trim(Request.Form("Perm")) & "' " & _
'"WHERE asset_cd='" & AssetID & "'" & _
'"AND invoicenumber ='" & invoicenumber & "';"
XML_SP5 = XML_SP5 & "<sp name='p_update_sortOrders' db-code='" &
dbId & "' loc-code='1'>"
XML_SP5 = XML_SP5 &"<param name='@.asset_total' datatype='string'
index='1' value='" & replace(Request.Form("SortTotal" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 &"<param name='@.asset_orderId' datatype='string'
index='2' value='" & replace(Request.Form("SortOrderID" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 &"<param name='@.asset_location' datatype='string'
index='3' value='" & replace( Request.Form("Asset_Location" &
AssetID),"'","''") & "'/>"
XML_SP5 = XML_SP5 &"<param name='@.asset_subtotal' datatype='string'
index='4' value='" & replace(Request.Form("SubTotalDesc" &
replace(Request.Form("SortTotal" & AssetID),"'","''")),"'","''") &
"'/>"
XML_SP5 = XML_SP5 &"<param name='@.perm' datatype='string' index='5'
value='" & trim(Request.Form("Perm")) & "'/>"
XML_SP5 = XML_SP5 &"<param name='@.assetID' datatype='string'
index='6' value='" & AssetID & "'/>"
XML_SP5 = XML_SP5 &"<param name='@.invoiceNo' datatype='string'
index='7' value='" & invoicenumber & "'/>"
XML_SP5 = XML_SP5 & "</sp>"
Set oXMLRetrieve = Server.Createobject("ReportEngine.Retrieval")
Call oXMLRetrieve.ExecuteQuery(reRecordSet,XML_SP5)
I think posting on here just helps me out...lol
I got it to work finally...if anyone is interested...the error was
occurring because it was looping through all the fields on the form to
check if it is the one to be updated...so everytime through the loop it
was invoking the query XML_SP5 but XML_SP5 was continually being
appended do so it would look like this on the 2nd iteration...
<sp name='p_update_sortOrders' db-code='2' loc-code='1'><param
name='@.asset_total' datatype='string' index='1' value='1029'/><param
name='@.asset_orderId' datatype='string' index='2' value='2'/><param
name='@.asset_location' datatype='string' index='3' value='WEXFORD, PA
900-18999'/><param name='@.asset_subtotal' datatype='string' index='4'
value=''/><param name='@.perm' datatype='string' index='5'
value='N'/><param name='@.assetID' datatype='string' index='6'
value='663018'/><param name='@.invoiceNo' datatype='string' index='7'
value='3459956'/></sp><sp name='p_update_sortOrders' db-code='2'
loc-code='1'><param name='@.asset_total' datatype='string' index='1'
value='4016'/><param name='@.asset_orderId' datatype='string' index='2'
value='43'/><param name='@.asset_location' datatype='string' index='3'
value='COLUMBIA, MD 900-19002'/><param name='@.asset_subtotal'
datatype='string' index='4' value='SPEED CODE 4016'/><param
name='@.perm' datatype='string' index='5' value='N'/><param
name='@.assetID' datatype='string' index='6' value='663021'/><param
name='@.invoiceNo' datatype='string' index='7' value='3459956'/></sp>
which makes it 2 top level elements (sp) and hence throws the error
Cheers!
sql

Monday, March 12, 2012

Error of Microsoft OLE DB Provider for SQL Server

Hi All:

I have a ASP page which use external DLL load data from SQL 2000 server, but it keeps give me error as following:

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Microsoft OLE DB Provider for SQL Server (0x8004000)

the line cause the error is as:

<%

dim newRS

dim visiter = Server.CreateObject("ExternalDLL.visit")

newRS = visiter.enews.getENews

%>

visit and enews are all class file inside ExternalDLL.

any body can help me out what's wrong with my page? the external DLL and sqloledb.dll are both registed on the machine.

Your help is great appreciate

Regards

Echo

Echo,

"Microsoft OLE DB Provider for SQL Server (0x8004000)" is related to the forum. However, for ASP related issue, you might want to check ASP forum as well.

|||

Hi !

As another poster said, this is defintely not a SQL Server related problem. You are loading an external DLL which does some SQL stuff and which has probably a bug inside or is not configured probably. So ask the vendor how to trace or how to configure this the right way. If you have no support, you can go the long way, tracking the users which try to login to SQL Server (if the server is configured the right way for this application) and see what statement are executed for the server. As I said thats the long way using the profiler. :-(

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

Sunday, February 26, 2012

error message while retrieving table from database

well i have got a form which displays some result from the databasse, it runs fi9 in webmatrix, but when i try to run it from my main page and when i click on that button which should displays the aspx page, it gives me this error:

############################################################

Server Error in '/' Application.
------------------------

Login failed for user 'MUFADDAL\ASPNET'.
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.Data.SqlClient.SqlException: Login failed for user 'MUFADDAL\ASPNET'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException: Login failed for user 'MUFADDAL\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.PopulateDataSet(DataSet dataSet, String listName) +494
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.GetDataSource(String listName) +51
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.ResolveDataSource() +95
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.DataBind() +59
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.DataBind() +10
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.OnPreRender(EventArgs e) +62
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489

------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

############################################################

i have kept no passwords in my mssql server 2000 database

can anyone help me out with this problemWeb Matrix runs as a normal application, and so runs under your user credentials. When run in IIS, you are running under different credentials (generally the user ASPNET on your machine).

Your connection string likely is using integrated securtiy (that is, you are not passing a SQL username and password). You must:

Add the 'MUFADDAL\ASPNET' user as a user in SQL Server (easy if SQL is on the same machine as the Web server, more difficult otherwise) or you could use SQL security and pass a username and password.|||i did create a user and gave him all of the permissions.
but still it is not working

Sunday, February 19, 2012

Error message in the log file

Every night I get the following error message in the SQL log file
Error: 7105, Severity: 22, State: 6
Page (1:2021785), slot 1 for text, ntext, or image node does not exist..
I get it 10 times between 04:00:05 and 04:03:30 and also at random during
daytime.
I want to know what causes the error so I have tried capturing almost
everything going on on the server through profiler but nothing seems togo on
in the database when the error message occurs.
There are no scheduled jobs on the server at between 03.30 and 04.30.
The server is running SQL 2000 sp 3.
I am now looking for all kind of hints that can help me find what is causing
the error, so all thoughts and ideas are welcome.
/Jaana> Every night I get the following error message in the SQL log file
> Error: 7105, Severity: 22, State: 6
> Page (1:2021785), slot 1 for text, ntext, or image node does not exist..
> I get it 10 times between 04:00:05 and 04:03:30 and also at random during
> daytime.
Have you tried running DBCC CHECKDB?
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi,
The reply is from MS (Took it from old posting from groups)
" This problem might be caused if the application's distributed transaction
timeout causes the DTC manager to abort the transaction.
To work around the problem, eliminate the cause of the timeouts or
increase the timeout value.
In addition, could you please check what operation resulted in the error?
Was there the 'select' statement using nolock hint or tablock hint? "
Thanks
Hari
MCDBA
"Jaana" <jaana.lehtonen@.banverket.se> wrote in message
news:#tvANZE$DHA.3668@.TK2MSFTNGP09.phx.gbl...
> Every night I get the following error message in the SQL log file
> Error: 7105, Severity: 22, State: 6
> Page (1:2021785), slot 1 for text, ntext, or image node does not exist..
> I get it 10 times between 04:00:05 and 04:03:30 and also at random during
> daytime.
> I want to know what causes the error so I have tried capturing almost
> everything going on on the server through profiler but nothing seems togo
on
> in the database when the error message occurs.
> There are no scheduled jobs on the server at between 03.30 and 04.30.
> The server is running SQL 2000 sp 3.
> I am now looking for all kind of hints that can help me find what is
causing
> the error, so all thoughts and ideas are welcome.
> /Jaana
>
>

Friday, February 17, 2012

Error Message 823 - bad page id

Hi,
we have problem with a corrupted database. The story is that accidentally
through restoring another database we have deleted this particular database.
We managed to recover the MDF and LDF file with GetDataBack, but the file
seems to be corrupted - both of them. When trying to attach this database bu
t
we are getting the Error Message 823 - bad page id ... The worst is that we
have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
data.
We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
but no success.
Is there a possibility of getting all of the datas from the corrupted
database - please suggest ?
PLEASE CONSIDER THIS AS URGENT!
Rgds,
Bani.Might consider calling Microsoft Product Support at this point - see if
anything else is possible.
HTH
Jerry
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
> Hi,
> we have problem with a corrupted database. The story is that accidentally
> through restoring another database we have deleted this particular
> database.
> We managed to recover the MDF and LDF file with GetDataBack, but the file
> seems to be corrupted - both of them. When trying to attach this database
> but
> we are getting the Error Message 823 - bad page id ... The worst is that
> we
> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
> data.
> We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
> but no success.
> Is there a possibility of getting all of the datas from the corrupted
> database - please suggest ?
>
> PLEASE CONSIDER THIS AS URGENT!
> Rgds,
> Bani.
>|||Did you make a backup of the saved .mdf/.ldf before you started running dbcc
checkdb with repair_allow_data_loss? If not, you should do that now before
doing anything else to the files/database.
When you run checkdb with no parameters, what errors do you receive? When
you run it with the repair option, do any errors get repaired? If so, keep
running it iteratively until it corrects everything it can. Remember
though, this option will try to remove corrupted data, so you will most
likely lose that data.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Might consider calling Microsoft Product Support at this point - see if
> anything else is possible.
> HTH
> Jerry
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
>|||Post the output from the following and I'll tell you what's wrong (I wrote
CHECKDB) and why repair isn't working:
DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lori Clark" <lclark@.dbadvisor.com> wrote in message
news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Did you make a backup of the saved .mdf/.ldf before you started running
> dbcc checkdb with repair_allow_data_loss? If not, you should do that now
> before doing anything else to the files/database.
> When you run checkdb with no parameters, what errors do you receive? When
> you run it with the repair option, do any errors get repaired? If so,
> keep running it iteratively until it corrects everything it can. Remember
> though, this option will try to remove corrupted data, so you will most
> likely lose that data.
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>|||Hi Paul,
results from this statement are around 58 pages, so below I'm sending you
some lines:
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
PageId in the page header = (284:-212301230).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
PageId in the page header = (6850:1456308804).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
PageId in the page header = (65280:1230385313).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
PageId in the page header = (33807:556419).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
PageId in the page header = (42499:-766674058).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
PageId in the page header = (0:2395407).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054488064, index ID 1, page ID (1:268). The PageId
in the page header = (47125:-11534198).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054291457, index ID 0, page ID (1:270). The PageId
in the page header = (65535:-1408243632).
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2130072865)' (object ID -2130072865).
...........
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2054488064)' (object ID -2054488064).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
PageId in the page header = (34238:251658240).
----
--
I will send you the results from DBCC
REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log
.LDF') as well:
Warning: The log for database 'ABC' has been rebuilt. Transactional
consistency has been lost. DBCC CHECKDB should be run to validate physical
consistency. Database options will have to be reset, and extra log files may
need to be deleted.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
----
--
And results from execute sp_resetstatus 'ABC':
Prior to updating sysdatabases entry for database 'ABC', mode = 0 and status
= 2048 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made.
----
--
From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
can send you all the lines, but it was too much. If required I can send you
in this way or to your mail if you like.
Regards.
BaniSQL
"Paul S Randal [MS]" wrote:

> Post the output from the following and I'll tell you what's wrong (I wrote
> CHECKDB) and why repair isn't working:
> DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Lori Clark" <lclark@.dbadvisor.com> wrote in message
> news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>
>|||It doesn't matter. Your data file looks like total garbage and now that
you've rebuilt the transaction log you've lost any semblance of
transactional consistency you may have been able to salvage.
You have no choice but to use your backup and learn from the lesson.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:9DDC8C35-DED4-4277-9E1D-4AE34DEDB8F9@.microsoft.com...[vbcol=seagreen]
> Hi Paul,
> results from this statement are around 58 pages, so below I'm sending you
> some lines:
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
> PageId in the page header = (284:-212301230).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
> PageId in the page header = (6850:1456308804).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
> PageId in the page header = (65280:1230385313).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
> PageId in the page header = (33807:556419).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
> PageId in the page header = (42499:-766674058).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
> PageId in the page header = (0:2395407).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054488064, index ID 1, page ID (1:268). The
> PageId
> in the page header = (47125:-11534198).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054291457, index ID 0, page ID (1:270). The
> PageId
> in the page header = (65535:-1408243632).
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2130072865)' (object ID -2130072865).
> ...........
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2054488064)' (object ID -2054488064).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
> PageId in the page header = (34238:251658240).
> ----
--
> I will send you the results from DBCC
> REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log
.LDF') as well:
> Warning: The log for database 'ABC' has been rebuilt. Transactional
> consistency has been lost. DBCC CHECKDB should be run to validate physical
> consistency. Database options will have to be reset, and extra log files
> may
> need to be deleted.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> ----
--
> And results from execute sp_resetstatus 'ABC':
> Prior to updating sysdatabases entry for database 'ABC', mode = 0 and
> status
> = 2048 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made.
> ----
--
> From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
> can send you all the lines, but it was too much. If required I can send
> you
> in this way or to your mail if you like.
> Regards.
> BaniSQL
> "Paul S Randal [MS]" wrote:
>

Error Message 823 - bad page id

Hi,
we have problem with a corrupted database. The story is that accidentally
through restoring another database we have deleted this particular database.
We managed to recover the MDF and LDF file with GetDataBack, but the file
seems to be corrupted - both of them. When trying to attach this database but
we are getting the Error Message 823 - bad page id ... The worst is that we
have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
data.
We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
but no success.
Is there a possibility of getting all of the datas from the corrupted
database - please suggest ?
PLEASE CONSIDER THIS AS URGENT!
Rgds,
Bani.
Might consider calling Microsoft Product Support at this point - see if
anything else is possible.
HTH
Jerry
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
> Hi,
> we have problem with a corrupted database. The story is that accidentally
> through restoring another database we have deleted this particular
> database.
> We managed to recover the MDF and LDF file with GetDataBack, but the file
> seems to be corrupted - both of them. When trying to attach this database
> but
> we are getting the Error Message 823 - bad page id ... The worst is that
> we
> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
> data.
> We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
> but no success.
> Is there a possibility of getting all of the datas from the corrupted
> database - please suggest ?
>
> PLEASE CONSIDER THIS AS URGENT!
> Rgds,
> Bani.
>
|||Did you make a backup of the saved .mdf/.ldf before you started running dbcc
checkdb with repair_allow_data_loss? If not, you should do that now before
doing anything else to the files/database.
When you run checkdb with no parameters, what errors do you receive? When
you run it with the repair option, do any errors get repaired? If so, keep
running it iteratively until it corrects everything it can. Remember
though, this option will try to remove corrupted data, so you will most
likely lose that data.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Might consider calling Microsoft Product Support at this point - see if
> anything else is possible.
> HTH
> Jerry
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
>
|||Post the output from the following and I'll tell you what's wrong (I wrote
CHECKDB) and why repair isn't working:
DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lori Clark" <lclark@.dbadvisor.com> wrote in message
news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Did you make a backup of the saved .mdf/.ldf before you started running
> dbcc checkdb with repair_allow_data_loss? If not, you should do that now
> before doing anything else to the files/database.
> When you run checkdb with no parameters, what errors do you receive? When
> you run it with the repair option, do any errors get repaired? If so,
> keep running it iteratively until it corrects everything it can. Remember
> though, this option will try to remove corrupted data, so you will most
> likely lose that data.
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>
|||Hi Paul,
results from this statement are around 58 pages, so below I'm sending you
some lines:
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
PageId in the page header = (284:-212301230).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
PageId in the page header = (6850:1456308804).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
PageId in the page header = (65280:1230385313).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
PageId in the page header = (33807:556419).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
PageId in the page header = (42499:-766674058).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
PageId in the page header = (0:2395407).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054488064, index ID 1, page ID (1:268). The PageId
in the page header = (47125:-11534198).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054291457, index ID 0, page ID (1:270). The PageId
in the page header = (65535:-1408243632).
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2130072865)' (object ID -2130072865).
............
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2054488064)' (object ID -2054488064).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
PageId in the page header = (34238:251658240).
I will send you the results from DBCC
REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log.LDF') as well:
Warning: The log for database 'ABC' has been rebuilt. Transactional
consistency has been lost. DBCC CHECKDB should be run to validate physical
consistency. Database options will have to be reset, and extra log files may
need to be deleted.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
And results from execute sp_resetstatus 'ABC':
Prior to updating sysdatabases entry for database 'ABC', mode = 0 and status
= 2048 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made.
From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
can send you all the lines, but it was too much. If required I can send you
in this way or to your mail if you like.
Regards.
BaniSQL
"Paul S Randal [MS]" wrote:

> Post the output from the following and I'll tell you what's wrong (I wrote
> CHECKDB) and why repair isn't working:
> DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Lori Clark" <lclark@.dbadvisor.com> wrote in message
> news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>
>
|||It doesn't matter. Your data file looks like total garbage and now that
you've rebuilt the transaction log you've lost any semblance of
transactional consistency you may have been able to salvage.
You have no choice but to use your backup and learn from the lesson.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:9DDC8C35-DED4-4277-9E1D-4AE34DEDB8F9@.microsoft.com...[vbcol=seagreen]
> Hi Paul,
> results from this statement are around 58 pages, so below I'm sending you
> some lines:
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
> PageId in the page header = (284:-212301230).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
> PageId in the page header = (6850:1456308804).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
> PageId in the page header = (65280:1230385313).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
> PageId in the page header = (33807:556419).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
> PageId in the page header = (42499:-766674058).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
> PageId in the page header = (0:2395407).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054488064, index ID 1, page ID (1:268). The
> PageId
> in the page header = (47125:-11534198).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054291457, index ID 0, page ID (1:270). The
> PageId
> in the page header = (65535:-1408243632).
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2130072865)' (object ID -2130072865).
> ...........
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2054488064)' (object ID -2054488064).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
> PageId in the page header = (34238:251658240).
> ----
> I will send you the results from DBCC
> REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log.LDF') as well:
> Warning: The log for database 'ABC' has been rebuilt. Transactional
> consistency has been lost. DBCC CHECKDB should be run to validate physical
> consistency. Database options will have to be reset, and extra log files
> may
> need to be deleted.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> ----
> And results from execute sp_resetstatus 'ABC':
> Prior to updating sysdatabases entry for database 'ABC', mode = 0 and
> status
> = 2048 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made.
> ----
> From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
> can send you all the lines, but it was too much. If required I can send
> you
> in this way or to your mail if you like.
> Regards.
> BaniSQL
> "Paul S Randal [MS]" wrote:

Error Message 823 - bad page id

Hi,
we have problem with a corrupted database. The story is that accidentally
through restoring another database we have deleted this particular database.
We managed to recover the MDF and LDF file with GetDataBack, but the file
seems to be corrupted - both of them. When trying to attach this database but
we are getting the Error Message 823 - bad page id ... The worst is that we
have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
data.
We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
but no success.
Is there a possibility of getting all of the datas from the corrupted
database - please suggest ?
PLEASE CONSIDER THIS AS URGENT!
Rgds,
Bani.Might consider calling Microsoft Product Support at this point - see if
anything else is possible.
HTH
Jerry
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
> Hi,
> we have problem with a corrupted database. The story is that accidentally
> through restoring another database we have deleted this particular
> database.
> We managed to recover the MDF and LDF file with GetDataBack, but the file
> seems to be corrupted - both of them. When trying to attach this database
> but
> we are getting the Error Message 823 - bad page id ... The worst is that
> we
> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
> data.
> We have tried with DBCC CHECKDB( 'database_name' ,REPAIR_ALLOW_DATA_LOSS),
> but no success.
> Is there a possibility of getting all of the datas from the corrupted
> database - please suggest ?
>
> PLEASE CONSIDER THIS AS URGENT!
> Rgds,
> Bani.
>|||Did you make a backup of the saved .mdf/.ldf before you started running dbcc
checkdb with repair_allow_data_loss? If not, you should do that now before
doing anything else to the files/database.
When you run checkdb with no parameters, what errors do you receive? When
you run it with the repair option, do any errors get repaired? If so, keep
running it iteratively until it corrects everything it can. Remember
though, this option will try to remove corrupted data, so you will most
likely lose that data.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Might consider calling Microsoft Product Support at this point - see if
> anything else is possible.
> HTH
> Jerry
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
>> Hi,
>> we have problem with a corrupted database. The story is that accidentally
>> through restoring another database we have deleted this particular
>> database.
>> We managed to recover the MDF and LDF file with GetDataBack, but the file
>> seems to be corrupted - both of them. When trying to attach this database
>> but
>> we are getting the Error Message 823 - bad page id ... The worst is that
>> we
>> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of the
>> data.
>> We have tried with DBCC CHECKDB( 'database_name'
>> ,REPAIR_ALLOW_DATA_LOSS),
>> but no success.
>> Is there a possibility of getting all of the datas from the corrupted
>> database - please suggest ?
>>
>> PLEASE CONSIDER THIS AS URGENT!
>> Rgds,
>> Bani.
>>
>|||Post the output from the following and I'll tell you what's wrong (I wrote
CHECKDB) and why repair isn't working:
DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lori Clark" <lclark@.dbadvisor.com> wrote in message
news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Did you make a backup of the saved .mdf/.ldf before you started running
> dbcc checkdb with repair_allow_data_loss? If not, you should do that now
> before doing anything else to the files/database.
> When you run checkdb with no parameters, what errors do you receive? When
> you run it with the repair option, do any errors get repaired? If so,
> keep running it iteratively until it corrects everything it can. Remember
> though, this option will try to remove corrupted data, so you will most
> likely lose that data.
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>> Might consider calling Microsoft Product Support at this point - see if
>> anything else is possible.
>> HTH
>> Jerry
>> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
>> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
>> Hi,
>> we have problem with a corrupted database. The story is that
>> accidentally
>> through restoring another database we have deleted this particular
>> database.
>> We managed to recover the MDF and LDF file with GetDataBack, but the
>> file
>> seems to be corrupted - both of them. When trying to attach this
>> database but
>> we are getting the Error Message 823 - bad page id ... The worst is
>> that we
>> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of
>> the
>> data.
>> We have tried with DBCC CHECKDB( 'database_name'
>> ,REPAIR_ALLOW_DATA_LOSS),
>> but no success.
>> Is there a possibility of getting all of the datas from the corrupted
>> database - please suggest ?
>>
>> PLEASE CONSIDER THIS AS URGENT!
>> Rgds,
>> Bani.
>>
>>
>|||Hi Paul,
results from this statement are around 58 pages, so below I'm sending you
some lines:
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
PageId in the page header = (284:-212301230).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
PageId in the page header = (6850:1456308804).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
PageId in the page header = (65280:1230385313).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
PageId in the page header = (33807:556419).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
PageId in the page header = (42499:-766674058).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
PageId in the page header = (0:2395407).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054488064, index ID 1, page ID (1:268). The PageId
in the page header = (47125:-11534198).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2054291457, index ID 0, page ID (1:270). The PageId
in the page header = (65535:-1408243632).
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2130072865)' (object ID -2130072865).
...........
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object
ID -2054488064)' (object ID -2054488064).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
PageId in the page header = (34238:251658240).
----
I will send you the results from DBCC
REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log.LDF') as well:
Warning: The log for database 'ABC' has been rebuilt. Transactional
consistency has been lost. DBCC CHECKDB should be run to validate physical
consistency. Database options will have to be reset, and extra log files may
need to be deleted.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
----
And results from execute sp_resetstatus 'ABC':
Prior to updating sysdatabases entry for database 'ABC', mode = 0 and status
= 2048 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made.
----
From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
can send you all the lines, but it was too much. If required I can send you
in this way or to your mail if you like.
Regards.
BaniSQL
"Paul S Randal [MS]" wrote:
> Post the output from the following and I'll tell you what's wrong (I wrote
> CHECKDB) and why repair isn't working:
> DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Lori Clark" <lclark@.dbadvisor.com> wrote in message
> news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> > Did you make a backup of the saved .mdf/.ldf before you started running
> > dbcc checkdb with repair_allow_data_loss? If not, you should do that now
> > before doing anything else to the files/database.
> >
> > When you run checkdb with no parameters, what errors do you receive? When
> > you run it with the repair option, do any errors get repaired? If so,
> > keep running it iteratively until it corrects everything it can. Remember
> > though, this option will try to remove corrupted data, so you will most
> > likely lose that data.
> >
> > "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> > news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
> >> Might consider calling Microsoft Product Support at this point - see if
> >> anything else is possible.
> >>
> >> HTH
> >>
> >> Jerry
> >> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> >> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
> >> Hi,
> >> we have problem with a corrupted database. The story is that
> >> accidentally
> >> through restoring another database we have deleted this particular
> >> database.
> >> We managed to recover the MDF and LDF file with GetDataBack, but the
> >> file
> >> seems to be corrupted - both of them. When trying to attach this
> >> database but
> >> we are getting the Error Message 823 - bad page id ... The worst is
> >> that we
> >> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of
> >> the
> >> data.
> >> We have tried with DBCC CHECKDB( 'database_name'
> >> ,REPAIR_ALLOW_DATA_LOSS),
> >> but no success.
> >> Is there a possibility of getting all of the datas from the corrupted
> >> database - please suggest ?
> >>
> >>
> >> PLEASE CONSIDER THIS AS URGENT!
> >>
> >> Rgds,
> >> Bani.
> >>
> >>
> >>
> >>
> >
> >
>
>|||It doesn't matter. Your data file looks like total garbage and now that
you've rebuilt the transaction log you've lost any semblance of
transactional consistency you may have been able to salvage.
You have no choice but to use your backup and learn from the lesson.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:9DDC8C35-DED4-4277-9E1D-4AE34DEDB8F9@.microsoft.com...
> Hi Paul,
> results from this statement are around 58 pages, so below I'm sending you
> some lines:
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2130072865, index ID 12305, page ID (1:1114). The
> PageId in the page header = (284:-212301230).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2091533571, index ID 11843, page ID (1:1032). The
> PageId in the page header = (6850:1456308804).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079391744, index ID 23016, page ID (1:255). The
> PageId in the page header = (65280:1230385313).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2079326456, index ID 35669, page ID (1:273). The
> PageId in the page header = (33807:556419).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2076457321, index ID 15901, page ID (1:1083). The
> PageId in the page header = (42499:-766674058).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2059797435, index ID 34185, page ID (1:260). The
> PageId in the page header = (0:2395407).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054488064, index ID 1, page ID (1:268). The
> PageId
> in the page header = (47125:-11534198).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2054291457, index ID 0, page ID (1:270). The
> PageId
> in the page header = (65535:-1408243632).
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2130072865)' (object ID -2130072865).
> ...........
> CHECKDB found 0 allocation errors and 1 consistency errors in table
> '(Object
> ID -2054488064)' (object ID -2054488064).
> Server: Msg 8909, Level 16, State 1, Line 1
> Table error: Object ID -2046820369, index ID 3840, page ID (1:252). The
> PageId in the page header = (34238:251658240).
> ----
> I will send you the results from DBCC
> REBUILD_LOG(ABC,'C:\ABC\ABC_MS\1\ABC_log.LDF') as well:
> Warning: The log for database 'ABC' has been rebuilt. Transactional
> consistency has been lost. DBCC CHECKDB should be run to validate physical
> consistency. Database options will have to be reset, and extra log files
> may
> need to be deleted.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
> ----
> And results from execute sp_resetstatus 'ABC':
> Prior to updating sysdatabases entry for database 'ABC', mode = 0 and
> status
> = 2048 (status suspect_bit = 0).
> No row in sysdatabases was updated because mode and status are already
> correctly reset. No error and no changes made.
> ----
> From DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS if necessary I
> can send you all the lines, but it was too much. If required I can send
> you
> in this way or to your mail if you like.
> Regards.
> BaniSQL
> "Paul S Randal [MS]" wrote:
>> Post the output from the following and I'll tell you what's wrong (I
>> wrote
>> CHECKDB) and why repair isn't working:
>> DBCC CHECKDB (dbname) WITH ALL_ERRORMSGS, NO_INFOMSGS
>> --
>> Paul Randal
>> Dev Lead, Microsoft SQL Server Storage Engine
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Lori Clark" <lclark@.dbadvisor.com> wrote in message
>> news:eSR0$%232zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>> > Did you make a backup of the saved .mdf/.ldf before you started running
>> > dbcc checkdb with repair_allow_data_loss? If not, you should do that
>> > now
>> > before doing anything else to the files/database.
>> >
>> > When you run checkdb with no parameters, what errors do you receive?
>> > When
>> > you run it with the repair option, do any errors get repaired? If so,
>> > keep running it iteratively until it corrects everything it can.
>> > Remember
>> > though, this option will try to remove corrupted data, so you will most
>> > likely lose that data.
>> >
>> > "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
>> > news:%23IJoe32zFHA.2312@.TK2MSFTNGP14.phx.gbl...
>> >> Might consider calling Microsoft Product Support at this point - see
>> >> if
>> >> anything else is possible.
>> >>
>> >> HTH
>> >>
>> >> Jerry
>> >> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
>> >> news:1E07A841-84AC-40D0-938C-F37E11C32E12@.microsoft.com...
>> >> Hi,
>> >> we have problem with a corrupted database. The story is that
>> >> accidentally
>> >> through restoring another database we have deleted this particular
>> >> database.
>> >> We managed to recover the MDF and LDF file with GetDataBack, but the
>> >> file
>> >> seems to be corrupted - both of them. When trying to attach this
>> >> database but
>> >> we are getting the Error Message 823 - bad page id ... The worst is
>> >> that we
>> >> have one month old backup. With MSSQLRecovery 2.1 we recovered 65% of
>> >> the
>> >> data.
>> >> We have tried with DBCC CHECKDB( 'database_name'
>> >> ,REPAIR_ALLOW_DATA_LOSS),
>> >> but no success.
>> >> Is there a possibility of getting all of the datas from the corrupted
>> >> database - please suggest ?
>> >>
>> >>
>> >> PLEASE CONSIDER THIS AS URGENT!
>> >>
>> >> Rgds,
>> >> Bani.
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>

Wednesday, February 15, 2012

error message

I am getting this error trying accessing RM page.
Server Error in '/Reports' Application.
----
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.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
Microsoft.ReportingServices.UI.GlobalApp.Application_AuthenticateRequest(Object
sender, EventArgs e) +58
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +64
Any idea?
ThanksOn Aug 12, 8:53 pm, "markgoldin" <markgoldin_2...@.yahoo.com> wrote:
> I am getting this error trying accessing RM page.
> Server Error in '/Reports' Application.
> ----
> 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.
> Source Error:
> An unhandled exception was generated during the execution of the current web
> request. Information regarding the origin and location of the exception can
> be identified using the exception stack trace below.
> Stack Trace:
> [NullReferenceException: Object reference not set to an instance of an
> object.]
> Microsoft.ReportingServices.UI.GlobalApp.Application_AuthenticateRequest(Object
> sender, EventArgs e) +58
> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
> +92
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +64
> Any idea?
> Thanks
You should try looking in the SSRS logs to see if it gives you any
descriptive information (normally located in: C:\Program Files
\Microsoft SQL Server\MSSQL.2\Reporting Services\LogFiles ). If you
cannot resolve the issue by looking at the logs, you should look into
reinstalling SSRS. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant