Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Thursday, March 29, 2012

do not have permission error message

I have been trying to run a script that modifies objects in a SQL Server 2005 database. I am trying to drop an index but I am told the index does not exist or I do not have the correct permissions. An example of one of the commands in the script that I am trying to execute are as follows.

command:
DROP INDEX spices.ADAPTER_MESSAGE.ADAPTER_MESSAGE_SET;

response:
Msg 3701, Level 11, State 6, Line 1
Cannot drop the index 'spices.ADAPTER_MESSAGE.ADAPTER_MESSAGE_SET', because it does not exist or you do not have permission.

The index does exist in the table so the problem must be related to permissions. I am the one who created the database so I am the dbo. I should have permission to do anything in the database, right? So why am I getting this error when my script runs?

thanks,
shimo

The dbo should be able to drop the index.

Is it possible that you are not running as the dbo? Maybe an application role has been set or something like that.

One way to check is

select user_name() to determine your user context.

Another possiblility is that the spices table is not in dbo or your default schema.

Try using the two part name schema.spices.ADAPTER_MESSAGE.ADAPTER_MESSAGE_SET

HTH,

-Steven Gott

S/DET

SQL Server

|||

Is this a SQL x64 bit edition?

We have had similar issue and reported to MS Connect site.

sql

Thursday, March 22, 2012

do I have a torn page?

Ive been getting alerts like the following all morning:
DESCRIPTION: Error: 823, Severity: 24, State: 2
I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
COMMENT: (None)
JOB RUN: (None)
What do I need to do here?
TIA, ChrisRHi
Look like corruption.
Run DBCC CHECKDB on the database and get last nights backup out, you might
need to restore it.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"ChrisR" <noemail@.bla.com> wrote in message
news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
> file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>|||Here's some additional info about those situations:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in file
> 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>

do I have a torn page?

Ive been getting alerts like the following all morning:
DESCRIPTION: Error: 823, Severity: 24, State: 2
I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
COMMENT: (None)
JOB RUN: (None)
What do I need to do here?
TIA, ChrisRHi
Look like corruption.
Run DBCC CHECKDB on the database and get last nights backup out, you might
need to restore it.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"ChrisR" <noemail@.bla.com> wrote in message
news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
> file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>|||Here's some additional info about those situations:
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...[vb
col=seagreen]
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
file
> 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>[/vbcol]

do I have a torn page?

Ive been getting alerts like the following all morning:
DESCRIPTION: Error: 823, Severity: 24, State: 2
I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
COMMENT: (None)
JOB RUN: (None)
What do I need to do here?
TIA, ChrisR
Hi
Look like corruption.
Run DBCC CHECKDB on the database and get last nights backup out, you might
need to restore it.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"ChrisR" <noemail@.bla.com> wrote in message
news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in
> file 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>
|||Here's some additional info about those situations:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:Ow4eB1ZTFHA.2680@.tk2msftngp13.phx.gbl...
> Ive been getting alerts like the following all morning:
> DESCRIPTION: Error: 823, Severity: 24, State: 2
> I/O error (bad page ID) detected during read at offset 0x0000111c264000 in file
> 'D:\MSSQL\MSSQL\Data\production_Data.mdf'.
> COMMENT: (None)
> JOB RUN: (None)
>
> What do I need to do here?
> TIA, ChrisR
>
sql

Do I have a Spy software

I received this error message in the system event viewer
file. Is this a sign of some spy software in my system?
AMLI: ACPI BIOS is attempting to read from an illegal IO
port address (0x71), which lies in the 0x70 - 0x71
protected address range. This could lead to system
instability. Please contact your system vendor for
technical assistance.You might try asking this in a more relevant newsgroup. This one is for SQL
Server security issues. Perhaps try a newsgroup based on whatever OS you're
using?
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
"Don Mc" <anonymous@.discussions.microsoft.com> wrote in message
news:13a2801c44408$38d24cf0$a501280a@.phx
.gbl...
> I received this error message in the system event viewer
> file. Is this a sign of some spy software in my system?
> AMLI: ACPI BIOS is attempting to read from an illegal IO
> port address (0x71), which lies in the 0x70 - 0x71
> protected address range. This could lead to system
> instability. Please contact your system vendor for
> technical assistance.
>|||You can also visit;
http://www.microsoft.com/mscorp/twc...cy/spyware.mspx
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Wednesday, March 21, 2012

DNS required ?

Hi All!
I facing the following problem:
Sometimes i get error while connecting to my SQLServer instance from client
machine "Timeout expired". I found it occurs when my DNS server is not reach
eable from client machine. But i connecting through alias, created by Client
network utility, where i s
pecify directly IP-address, NOT DNS-name ! I tried to connect through QA, os
ql - resuls the same.
Why it requires DNS ? What parameter i missing ?
Telnet on IP-address port works normally.
Server - NT 4.0 SP6 PDC, SQLServer 2000 Std Ed
Client - Windows 98 or NT 4.0IF you try to connect to a server named London, the name London needs to be
resolved to the IP address. This is the function that DNS provides...
However if you use theIP address yourself, DNS does not have to do anything.
Wayne Snyder MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
(Please respond only to the newsgroups.)
I support the Professional Association for SQL Server
(www.sqlpass.org)
"Slava Melnikov" <vasya000@.yandex.ru> wrote in message
news:F6CBFA12-2F13-452B-B848-5BA82228D0A1@.microsoft.com...
> Hi All!
> I facing the following problem:
> Sometimes i get error while connecting to my SQLServer instance from
client machine "Timeout expired". I found it occurs when my DNS server is
not reacheable from client machine. But i connecting through alias, created
by Client network utility, where i specify directly IP-address, NOT DNS-name
! I tried to connect through QA, osql - resuls the same.
> Why it requires DNS ? What parameter i missing ?
> Telnet on IP-address port works normally.
> Server - NT 4.0 SP6 PDC, SQLServer 2000 Std Ed
> Client - Windows 98 or NT 4.0|||What version of the SQL Server ODBC driver (sqlsrv32.dll) is installed on
the client. There is a issue with wsome of the earlier MDAC 2.6 SQL Server
ODBC drivers. If your driver version is 2000.8.0.194 you may be running
into this problem. It also occurs on some later versions as well. If you
install one of the more recent versions of MDAC, such as MDAC 2.7 then the
problem I am describing will not occur. Of course this assumes that you are
using the version of MDAC that has the problem.
When you ping the ip address does the response come back quickly or dies it
take some time?
Rand
This posting is provided "as is" with no warranties and confers no rights.|||O-oh!
sqlsrv32.dll version is really 2000.8.0.194.
Thanks for help, Rand !
I should install latest service pack or new MDAC it's
enough ?
ping works normally

>--Original Message--
>What version of the SQL Server ODBC driver
(sqlsrv32.dll) is installed on
>the client. There is a issue with wsome of the earlier
MDAC 2.6 SQL Server
>ODBC drivers. If your driver version is 2000.8.0.194 you
may be running
>into this problem. It also occurs on some later versions
as well. If you
>install one of the more recent versions of MDAC, such as
MDAC 2.7 then the
>problem I am describing will not occur. Of course this
assumes that you are
>using the version of MDAC that has the problem.
>When you ping the ip address does the response come back
quickly or dies it
>take some time?
>Rand
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>

DNS Error

Approximately 10 minutes after I start SQL Server, some protocols such as HTTP and IRC are no longer available. When I try to open a webpage in IEX, I get a DNS error, however I can still ping the sites.
Any advice?Could you be experiencing MyDoom (http://support.microsoft.com/?kbid=836528) or Blaster (http://www.microsoft.com/security/incident/blast.mspx)? They could produce these kind of symptoms.

-PatP|||Pat,

no I don't think so, since:

-I don't have any other problems with my PC
-This started only with SQL server
-I have the latest security updates, and the extra Blaster fix
-I have a virus scanner that updates daily

Could it have something to do with the hosts file?|||Could it have something to do with the hosts file?While pretty much anything is possible, that seems unlikely to me. If that were the case, how would starting SQL Server enter into the picture (so that the sites worked before SQL starts, and fail while SQL is running)?

-PatP|||Hmm I thought because I get DNS erros...
I did the Blaster and Doom update again but no infection was found.
Anyone else any ideas what could be wrong? Or how to detect?

Edit: I checked my Event log and there is always 4 errors and 1 warning when this occurs:

Event Type: Error
Event Source: MSSQLSERVER

19012 :
SuperSocket Info: Bind failed on TCP port 1433.

Event Type: Warning
Event Source: MSSQLServer

SuperSocket-Information: (SpnRegister) : Error 1355.

But SQL Server is still working after this. I checked KB but didn't find anything.|||Just curious, but does netstat -a -n show anything relevant?

-PatP|||I`m not sure... I did some checks with that but couldn`t make to much sense
of it. Could you tell me what I`m looking for?

The problem persists... Now I am on a small network and after the said problem the whole network breaks down and I lose internet connection. I have to reboot all machines and sometimes repair the network connection Very strange indeed. I can confirm that this only happens when SQL server is started.

Other programs running:

Kaspersky AV
Webroot SypSweeper
Sometimes ICQ or mIRC
The usual XP services|||Are you absolutely certain that the machine isn't infected by Slammer (http://www.microsoft.com/technet/security/alerts/slammer.mspx)?

-PatP|||Pat I think that was it. I didn't know that my Antivirus Program may not have been aware of this exploit.

Thanks!|||De nada! Glad that you were finally able to isolate (and fix) the problem!

-PatPsql

DMX Shape query error

Hi I created a DMX query to retrieve predictions based on previous customer purchases and wanted to filter out my input data by only purchases made in the current year. I keep receiving this error:

Code Snippet

===================================

Internal error: An unexpected error occurred (file 'dmxinit.cpp', line 1343, function 'DMXNodeInput::InitFromASTOpenRowset'). (Microsoft SQL Server 2005 Analysis Services)


Program Location:

at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider.Execute(ICommandContentProvider contentProvider, AdomdPropertyCollection commandProperties, IDataParameterCollection parameters)
at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.Execute()
at Microsoft.AnalysisServices.Controls.QueryResultGridStorage.ThreadProc()

And, here's my query:

Code Snippet

SELECTFLATTENED

(SELECT *

FROMPredictAssociation([PredictTable],

10,

INCLUDE_NODE_ID,

INCLUDE_STATISTICS

)

WHERE$NODEID <> ''

)

FROM

[Mining Model]

NATURALPREDICTIONJOIN

SHAPE {

OPENQUERY( [datasrc],

'SELECT ''1234'' AS [Customer_D_SID]'

)

} APPEND ({

SHAPE {

OPENQUERY( [datasrc],

'SELECT [Product_D_SID],[Customer_D_SID], [Transaction_Date]

FROM [Base_Sales_F]

WHERE [Customer_D_SID] = ''1234'' '

)

} APPEND ({

OPENQUERY( [datasrc],

'SELECT [Calendar_D_SID],[CALENDAR_YR_NBR]

FROM [dbo].[Calendar_D]

WHERE [CALENDAR_YR_NBR] >= ''2007'' '

)

} RELATE [Calendar_D_SID] TO [Transaction_Date]) AS B

} RELATE B.[Customer_D_SID] TO [Customer_D_SID]) AS [PredictTable]

AS T

I figured the only way to associate the calendar table with the sales table was to use a nested shape statement... is this wrong? Thanks for any help!

The internal error is being raised because your SHAPE statement is generating 2 levels of nesting which doesn't match your model defnition (SQL Server DM only supports single-level nesting i.e. nested tables cannot have table columns).

You need to remove the second nested join and instead, use a view on the transaction table that includes the column (CALENDAR_YR_NBR) you want to filter on.

|||Thank you! Making a view solved my problem.sql

Monday, March 19, 2012

DML error logging

Oracle 10g2 offers DML error logging, which enables to load data with traditional SQL without having a complete roll-back in case one record is refused. http://orafaq.com/node/76

This is almost similar to loading capabilities of ETL-tools (at least in the error-handling department)

Does anyone have a clue whether Microsoft is going to add such functionality to SQL Server 2005?

I think you have that in SSIS, (almost 99% sure, so ask over there in their forum too http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1) but depending on the situation, you can do this easily in an instead of trigger, if you know the criteria to check for. Just something like the following in the insert trigger will do:

insert into exceptions (columns)
select columns
from inserted
where <bad data check>

insert into real table (columns)
from inserted
where not <bad data check>

This might be a solution for a table where the user is doing heads down keying of data.

Another alternative is to do the same thing in a procedure, if you are doing single row edits by using a TRY...CATCH block and inserting into the exception table on error.

Will they add something like this to 2005, no. But the next version? Perhaps, go here: https://connect.microsoft.com/SQLServer/Feedback and voice your opinion/idea for solution. If you do, post back here with the URL and request votes.

DMI Indication

Hi
i am getting error. i dont understand what is this error
can any one help me out & tell us why this error is coming
here i am attaching the below error for Ref..
DMI Indication
Event Type = Cable unplugged/No LAN activity
Component Name = Intel Ethernet LAN Adapter(s)
Group = NIC Health Contributor
Severity = Information
Instance = Not Applicable
System = Unknown
SubSystem = DriverI don't believe that this message is in any way related to SQL Server.
Please try other newsgroups dealing with networking issues for this
question.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

DMI Indication

Hi
i am getting error. i dont understand what is this error
can any one help me out & tell us why this error is coming
here i am attaching the below error for Ref..
DMI Indication
Event Type = Cable unplugged/No LAN activity
Component Name = Intel Ethernet LAN Adapter(s)
Group = NIC Health Contributor
Severity = Information
Instance = Not Applicable
System = Unknown
SubSystem = DriverI don't believe that this message is in any way related to SQL Server.
Please try other newsgroups dealing with networking issues for this
question.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

DMI Indication

Hi
i am getting error. i dont understand what is this error
can any one help me out & tell us why this error is coming
here i am attaching the below error for Ref..
DMI Indication
Event Type= Cable unplugged/No LAN activity
Component Name= Intel Ethernet LAN Adapter(s)
Group= NIC Health Contributor
Severity= Information
Instance= Not Applicable
System= Unknown
SubSystem= Driver
I don't believe that this message is in any way related to SQL Server.
Please try other newsgroups dealing with networking issues for this
question.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Sunday, March 11, 2012

DLL missing or ??

I have SQL server 2000 and access 2003 adp file always disconnect
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
run-time error 429
ActveX component can't create object
How repair this without reinstall all'Hi
This seems to get asked quite a lot http://tinyurl.com/9aypy
Some suggested solutions may be
http://support.microsoft.com/kb/q189366/
http://tinyurl.com/aofef
http://tinyurl.com/eyt7r
John
"Valentin Albastroiu" wrote:

> I have SQL server 2000 and access 2003 adp file always disconnect
> Dim cnn As ADODB.Connection
> Set cnn = New ADODB.Connection
> run-time error 429
> ActveX component can't create object
> How repair this without reinstall all'
>
>|||The PC on which you install the application must have the same version or
greater of MDAC (Microsoft Data Access Components) that was on the
development PC when the application was compiled. If this error is occurring
on the development PC, then perhaps the MDAC components or configuration got
corrupted somehow. Either way, consider downloading and running the latest
verison of MDAC on both the development and end user PCs.
http://msdn.microsoft.com/library/d...mdacinstall.asp
"Valentin Albastroiu" <vali_albastroiu@.hotmail.com> wrote in message
news:uzl%23tZByFHA.736@.tk2msftngp13.phx.gbl...
>I have SQL server 2000 and access 2003 adp file always disconnect
> Dim cnn As ADODB.Connection
> Set cnn = New ADODB.Connection
> run-time error 429
> ActveX component can't create object
> How repair this without reinstall all'
>

DLL Error & Legend Question

I'm using version 8.5.
Is there a way to limit the legend to only show elements that are shown on the chart (i.e have a value)?

Also I'm recieving the following error when I attempt to generate a report into PDF:

"ERROR IN DATABASE DLL, CHECK REPORT'S SQL"

The report sql works fine in Query Analzyer, the database is up to and it is verified.

Any advice is greatly appreciated,

Thanks,
GalahadHi,
Change your database driver and try once again.

Regards

Deepak|||Yes i had tried that. But whenever i try to change to any other driver than pdsodbc.dll (ODBC), i get errors that are the same as before.

I'm accessing SQL Server data so I have changed to every driver that i know that would work w/ sql server. But no luck.

Other reports that I run have no issues using the same driver.

FYI, The reports are run locally on my machine for testing and migrated over to a dev server. A java client converts the Crystal into PDF files.

Any suggestions?

Thanks,
Galahad|||Open the report and Do verify Database
Set the Database Location path also|||Dear all in this discussion
i am also stuck with this problem , for an immediate solution , the DNS connection , along with a set location works , but the report speed is slow

The senario, the rpt files are in the local machine , the server has the database , when the report is requested it gives the error "Physical database not found"
please let me know the solution

Dll error

Hello,
I have developed an vb.net windows application, which uses SQLXMLBulkload3class. For this, I added references to Microsoft SQLXMLBulkload 3.0 Type library. This works fine through sourcecode and exe in my development pc. While building windows installer
(package and deployment) through setupwizard, says "cannot automatically detect dependencies for "c:\commonfiles\system\oledb\xblkld3.dll". Ignored that, went ahead and built the WindowsInstaller i.e. msi file. In the target pc, I installed .net framew
ork first and while installing the application package got an error "xblkld3.dll failed to register. HRESULT-2147023782." still went ahead and installed the application. Says "COM object with CLSID{.....} is either not valid or not registered" when it c
omes to SQLXMLBulkload module. Anything should I add in the references? Or Install any components or missing any dlls? Pls. Help me.
Thanks for all your help.
Rgds,
Padmaja.
Suggested way to redistribute SQLXML is to ask the user install SQLXML
themselves. The installer is available from MSDN.
FYI, these are the dependencies for SQLXML
a.. This release is installed using the Microsoft Windows Installer 2.0. You
might need to upgrade your installer to Windows Installer 2.0 prior to
installing SQLXML 3.0.
a.. SQLXML requires Microsoft SOAP Toolkit 2.0 to be installed to run Web
Services. Users not using Microsoft Windows XP must download the toolkit to
use Web Services.
a.. MDAC 2.6 or later must be installed before the installation can be run.
a.. This release also has a dependency on MSXML version 4.0 SP2. This
version of MSXML is included with the download.
Soap toolkit is not needed for SQLXML Bulkload (xblkld3.dll)
Chandra
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Padmaja" <anonymous@.discussions.microsoft.com> wrote in message
news:796EAED4-E157-44B7-BE52-8B0F6A73F2EC@.microsoft.com...
> Hello,
> I have developed an vb.net windows application, which uses
SQLXMLBulkload3class. For this, I added references to Microsoft
SQLXMLBulkload 3.0 Type library. This works fine through sourcecode and exe
in my development pc. While building windows installer (package and
deployment) through setupwizard, says "cannot automatically detect
dependencies for "c:\commonfiles\system\oledb\xblkld3.dll". Ignored that,
went ahead and built the WindowsInstaller i.e. msi file. In the target pc,
I installed .net framework first and while installing the application
package got an error "xblkld3.dll failed to register. HRESULT-2147023782."
still went ahead and installed the application. Says "COM object with
CLSID{.....} is either not valid or not registered" when it comes to
SQLXMLBulkload module. Anything should I add in the references? Or Install
any components or missing any dlls? Pls. Help me.
> Thanks for all your help.
> Rgds,
> Padmaja.
>
|||I checked for SQLXML SP3 & MDAC 2.7. They are already installed. I am getting the error of 'not detecting the dependencies' while building the windows installer. Any help is appreciated.
|||I checked for SQLXML and MDAC2.7. They are already installed. I am getting the error of 'cannot automatically detect dependencies xblkld3.dll' while creating windows installer. Any help is appreciated.
Thanks,
Padmaja.

Division by Zero Error

I am getting a division by zero error from the SQL below, I believe I need to utilize Cast because it could be a negative number and I need to be able to view 8 positions to the right of the dec. (0000.00000000). Any help would be greatly appreciated.

SELECT FromDate AS MonthOneDate,State,Description,SUM(Flowthru) AS CELCSumFT,SUM(TotalCount) AS CELCsumCNT,
(SUM(Flowthru)/SUM(TotalCount)) * 100 AS CELCFtPct,
RetailNum AS ARZSumFT,RetailDen AS
ARZSumCnt,(RetailNum/RetailDen) * 100 AS ARZFtPct,
((RetailNum/RetailDen) - SUM(Flowthru) /SUM(TotalCount)) / SQRT(((SUM(Flowthru) + RetailNum) / (SUM(TotalCount) +RetailDen)) * (1-(SUM(Flowthru)+RetailNum)/(SUM(TotalCount) + RetailDen)) * (1 / SUM(TotalCount)+1/RetailDen)) AS ZScoreMonth1
FROM pmMidwest33_BlueRed WHERE TotalCount <> 0 AND CLEC <>
'' AND Acna NOT IN ('TRE','TRD') AND STATE IN ('IL','IZ','TR','MI','RE')
AND MONTH(FromDate) = MONTH(DATEADD(m,-2,GETDATE()))
AND YEAR(FROMDATE) = YEAR(DATEADD(m,-2,GETDATE()))
GROUP BY FromDate,State,Description,RetailNum,RetailDenDid you figure what part of your SQL query returns a divide by zero ? It could be :

sum(TotalCount),
RetailDen,
SQRT(((SUM(Flowthru) + RetailNum)
...

Before casting anything, I would look for the origin of the problem.|||for example you have

select (SUM(Flowthru)/SUM(TotalCount)) * 100 AS CELCFtPct from table

select CELCFtPct = case when SUM(TotalCount)) = 0 then 0
else (SUM(Flowthru)/SUM(TotalCount)) * 100 end
from table

You can do that for all your divisions so you do not get division by zero error. Not sure what field you needed this on but its a good ideal to do this anytime that you are dividing because at some point you are bound to divide by zero.

Hope that helps

KG|||Thank you for your help.. I figured out that my data types needed to be changed to float. I had it a varchar.

Joe

Friday, March 9, 2012

Dividing by 0

From sample posted, I tried the following but results in #error. Any
suggestion?
Here is the actual expression:
= Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
Fields!ccommission.Value/( Fields!cprice.Value- Fields!Average_Cost.Value)))I've had the same issue. To get around it, I've written a custom function
and then return the value to the report.
"Knolls" wrote:
> From sample posted, I tried the following but results in #error. Any
> suggestion?
> Here is the actual expression:
> = Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
> Fields!ccommission.Value/( Fields!cprice.Value- Fields!Average_Cost.Value)))|||this should work
= Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
Fields!ccommission.Value/iif(( Fields!cprice.Value-
Fields!Average_Cost.Value)=0,1,( Fields!cprice.Value-
Fields!Average_Cost.Value))))
"Knolls" wrote:
> From sample posted, I tried the following but results in #error. Any
> suggestion?
> Here is the actual expression:
> = Iif(Fields!cprice.Value - Fields!ccommission.Value = 0,0, (100 *
> Fields!ccommission.Value/( Fields!cprice.Value- Fields!Average_Cost.Value)))

Divided by zero

=IIF( Fields!DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
Fields!GOL_DAILYRUNRT.Value * 100, 0)
Why this is throwing Divided by zero error
please help meBecause GOL_DAILYRUNRT.Value is zero? Perhaps you should put
IIF( Fields!GOL_DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
Fields!GOL_DAILYRUNRT.Value * 100, 0)?
MC
"PrasantH" <PrasantH@.discussions.microsoft.com> wrote in message
news:AD3D844C-C52A-4205-84FE-3315AC41484E@.microsoft.com...
> =IIF( Fields!DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
> Fields!GOL_DAILYRUNRT.Value * 100, 0)
> Why this is throwing Divided by zero error
> please help me|||As you are dividing by Fields!GOL_DAILYRUNRT.Value; I think you should
check if that is greater than zero.
Try this:
=IIF( Fields!GOL_DAILYRUNRT.Value = 0 ,0,Fields!DAILYRUNRT.Value/ IIF(
Fields!GOL_DAILYRUNRT.Value = 0,1, Fields!GOL_DAILYRUNRT.Value)
In any case, IIF is a function call and therefore all arguments are
evaluated before the function is invoked( which causes the division by zero
in expression).
"PrasantH" <PrasantH@.discussions.microsoft.com> wrote in message
news:AD3D844C-C52A-4205-84FE-3315AC41484E@.microsoft.com...
> =IIF( Fields!DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
> Fields!GOL_DAILYRUNRT.Value * 100, 0)
> Why this is throwing Divided by zero error
> please help me|||You will need another ) at the end:
=IIF( Fields!GOL_DAILYRUNRT.Value = 0 ,0,Fields!DAILYRUNRT.Value/ IIF(
Fields!GOL_DAILYRUNRT.Value = 0,1, Fields!GOL_DAILYRUNRT.Value))
I have tried your expression as it is a more elegant solution to this
nagging problem than I have been using. Of course in my tests this morning I
could not get the simple expression IIF(FieldB.Value = 0, 0, FieldA.Value /
FieldB.Value) to fail. It returned zero instead of #error, NaN, infinity....
It seems as though RS evealuate both sides of the IIF statement sometimes
and only one side on other occassions. There seems to be no consistency at
all that I can figure out, however, I will definitely try your expression the
next time I need to code around this issue. Thanks for the posting.
"RA" wrote:
> As you are dividing by Fields!GOL_DAILYRUNRT.Value; I think you should
> check if that is greater than zero.
> Try this:
> =IIF( Fields!GOL_DAILYRUNRT.Value = 0 ,0,Fields!DAILYRUNRT.Value/ IIF(
> Fields!GOL_DAILYRUNRT.Value = 0,1, Fields!GOL_DAILYRUNRT.Value)
> In any case, IIF is a function call and therefore all arguments are
> evaluated before the function is invoked( which causes the division by zero
> in expression).
> "PrasantH" <PrasantH@.discussions.microsoft.com> wrote in message
> news:AD3D844C-C52A-4205-84FE-3315AC41484E@.microsoft.com...
> > =IIF( Fields!DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
> > Fields!GOL_DAILYRUNRT.Value * 100, 0)
> > Why this is throwing Divided by zero error
> > please help me
>
>|||Note: IIF() is a function call. Therefore, all arguments get evaluated by
the CLR before the function is called. See also:
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctiif.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"B. Mark McKinney" <BMarkMcKinney@.discussions.microsoft.com> wrote in
message news:31975EF8-B448-4748-85DD-FBFFF54DB634@.microsoft.com...
> You will need another ) at the end:
> =IIF( Fields!GOL_DAILYRUNRT.Value = 0 ,0,Fields!DAILYRUNRT.Value/ IIF(
> Fields!GOL_DAILYRUNRT.Value = 0,1, Fields!GOL_DAILYRUNRT.Value))
> I have tried your expression as it is a more elegant solution to this
> nagging problem than I have been using. Of course in my tests this morning
I
> could not get the simple expression IIF(FieldB.Value = 0, 0, FieldA.Value
/
> FieldB.Value) to fail. It returned zero instead of #error, NaN,
infinity....
> It seems as though RS evealuate both sides of the IIF statement sometimes
> and only one side on other occassions. There seems to be no consistency at
> all that I can figure out, however, I will definitely try your expression
the
> next time I need to code around this issue. Thanks for the posting.
>
> "RA" wrote:
> > As you are dividing by Fields!GOL_DAILYRUNRT.Value; I think you should
> > check if that is greater than zero.
> >
> > Try this:
> > =IIF( Fields!GOL_DAILYRUNRT.Value = 0 ,0,Fields!DAILYRUNRT.Value/ IIF(
> > Fields!GOL_DAILYRUNRT.Value = 0,1, Fields!GOL_DAILYRUNRT.Value)
> >
> > In any case, IIF is a function call and therefore all arguments are
> > evaluated before the function is invoked( which causes the division by
zero
> > in expression).
> >
> > "PrasantH" <PrasantH@.discussions.microsoft.com> wrote in message
> > news:AD3D844C-C52A-4205-84FE-3315AC41484E@.microsoft.com...
> > > =IIF( Fields!DAILYRUNRT.Value > 0, Fields!DAILYRUNRT.Value /
> > > Fields!GOL_DAILYRUNRT.Value * 100, 0)
> > > Why this is throwing Divided by zero error
> > > please help me
> >
> >
> >|||Consider using CUSTOM CODE (look it up in the help docs) that can
globally solve this for your whole report with a function like this:
Function SafeDivide(byval onumer as Object, byval odenom as Object) as
Decimal
' author: jerry nixon
' purpose: divide and avoid div by zero errs
' version: 1.4
If onumer Is Nothing Then Return 0
If odenom Is Nothing Then Return 0
If isDbNull(onumer) Then Return 0
If isDbNull(odenom) Then Return 0
Dim inumer As Decimal
Dim idenom As Decimal
Try
inumer = Ctype(onumer, Decimal)
idenom = Ctype(odenom, Decimal)
Catch ex as Exception
Return 0
End Try
If Not isNumeric(inumer) Then Return 0
If Not isNumeric(idenom) Then Return 0
If idenom = 0 Then Return 0
Try
Return Decimal.Divide(inumer, idenom)
Catch ex As Exception
Return 0
End Try
End Function

Divide by zero error?

I have several situations where I encounter the following error:
[Microsoft][ODBC SQL SERVER DRIVER][SQL Server]Divide by zero error
encountered.
I'm sure this topic has been covered hundreds of times - but how would I
stop this error in the following query:
SELECT [Pharmacy Exp] / TotalMem AS PhExpPMPM
FROM Sheet1$
WHERE ([Pharmacy Exp] <> '') AND (Period = '3Q04') AND (Domicile LIKE
'%ct%' OR
Domicile LIKE '%ma%' OR
Domicile LIKE '%nh%' OR
Domicile LIKE '%me%' OR
Domicile LIKE '%ri%' OR
Domicile LIKE '%vt%' OR
Domicile LIKE '%ny%' OR
Domicile LIKE '%nj%')
This issues comes about because either [pharmacy exp] or TotalMem is either
null or zero. I don't want to exclude the data from my query (ie: using
where [pharmacy exp] <>'') but would rather show a zero for the data point.SELECT CASE (TotalMem WHEN 0 THEN 0
ELSE [Pharmacy Exp] / TotalMem END PhExpPMPM
FROM Sheet1$
WHERE ([Pharmacy Exp] <> '') AND (Period = '3Q04') AND (Domicile LIKE
'%ct%' OR
Domicile LIKE '%ma%' OR
Domicile LIKE '%nh%' OR
Domicile LIKE '%me%' OR
Domicile LIKE '%ri%' OR
Domicile LIKE '%vt%' OR
Domicile LIKE '%ny%' OR
Domicile LIKE '%nj%')
Jacco Schalkwijk
SQL Server MVP
"William" <da@.northernit.net> wrote in message
news:KlU3e.6431$6a5.1685@.twister.nyroc.rr.com...
>I have several situations where I encounter the following error:
> [Microsoft][ODBC SQL SERVER DRIVER][SQL Server]Divide by zero error
> encountered.
> I'm sure this topic has been covered hundreds of times - but how would I
> stop this error in the following query:
>
> SELECT [Pharmacy Exp] / TotalMem AS PhExpPMPM
> FROM Sheet1$
> WHERE ([Pharmacy Exp] <> '') AND (Period = '3Q04') AND (Domicile LIKE
> '%ct%' OR
> Domicile LIKE '%ma%' OR
> Domicile LIKE '%nh%' OR
> Domicile LIKE '%me%' OR
> Domicile LIKE '%ri%' OR
> Domicile LIKE '%vt%' OR
> Domicile LIKE '%ny%' OR
> Domicile LIKE '%nj%')
> This issues comes about because either [pharmacy exp] or TotalMem is
> either
> null or zero. I don't want to exclude the data from my query (ie: using
> where [pharmacy exp] <>'') but would rather show a zero for the data
> point.
>

Divide by zero error! Help!

I don't understand why I get the error "Server: Msg 8134, Level 16,
State 1, Line 1
Divide by zero error encountered."
I check for 0, actually if I change the statement after ELSE to 2, it
will run with no issue and get 1 since the when statement is 0 in this
case. Please help.
SELECT
CASE WHEN SUM(CONVERT(INT, ICFPM_USER_12)* CONVERT(INT,
ICFPM_USER_14))= 0 THEN 1
ELSE SUM(REV_ORDER_QTY/(CONVERT(INT, ICFPM_USER_12)*CONVERT(INT,
ICFPM_USER_14)))
END
FROM SOFOD, ICFPM
WHERE SOFOD.PART_ID = ICFPM.PART_ID AND SOFOD.SO_ID = '105706'Hi
Don't assume that the execution order of an ELSE will follow the order you
coded. It may evaluate both CASEs in parallel and then use the output later.
During query execution, your query may be run differently to what you think.
This can be influenced by number of processors, RAM available, indexes and
statistics.
You need to make sure that your query does not have the possibility of
failing, no matter the code execution path.
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
<zod91@.yahoo.com> wrote in message
news:1149560228.320495.202850@.j55g2000cwa.googlegroups.com...
>I don't understand why I get the error "Server: Msg 8134, Level 16,
> State 1, Line 1
> Divide by zero error encountered."
> I check for 0, actually if I change the statement after ELSE to 2, it
> will run with no issue and get 1 since the when statement is 0 in this
> case. Please help.
>
> SELECT
> CASE WHEN SUM(CONVERT(INT, ICFPM_USER_12)* CONVERT(INT,
> ICFPM_USER_14))= 0 THEN 1
> ELSE SUM(REV_ORDER_QTY/(CONVERT(INT, ICFPM_USER_12)*CONVERT(INT,
> ICFPM_USER_14)))
> END
> FROM SOFOD, ICFPM
> WHERE SOFOD.PART_ID = ICFPM.PART_ID AND SOFOD.SO_ID = '105706'
>