Showing posts with label silly. Show all posts
Showing posts with label silly. Show all posts

Friday, March 30, 2012

Numeric to real type

Hi Everyone,

I hope this is not a silly one. Well, I have two tables - table 1 destination, table 2 source. Data is being imported from table 1 to table 2. For ages this has been working fine but now we get an error which just says can not insert value 1 (.i.e. user defined error message from error handling). I have been trying to run this whole thing bit by bit and detect the actual error but for some reason it doesn't show any error but only on live.

I could detect just one potential issue that value 1 in table1 is numeric defined with size 13 precision (20,10) and in table 2 it is defined as real. But I am not sure if conversion from numeric to real can be any problem as the SP didn't show me when I tried to run manually.

Can anyone double on my assumption that this might be a potential problem which doesn't seem to occur on test server as it might be because the data are different in test and live.

Thanks a ton in advance,
Sree

Quote:

Originally Posted by sreemati

Hi Everyone,

I hope this is not a silly one. Well, I have two tables - table 1 destination, table 2 source. Data is being imported from table 1 to table 2. For ages this has been working fine but now we get an error which just says can not insert value 1 (.i.e. user defined error message from error handling). I have been trying to run this whole thing bit by bit and detect the actual error but for some reason it doesn't show any error but only on live.

I could detect just one potential issue that value 1 in table1 is numeric defined with size 13 precision (20,10) and in table 2 it is defined as real. But I am not sure if conversion from numeric to real can be any problem as the SP didn't show me when I tried to run manually.

Can anyone double on my assumption that this might be a potential problem which doesn't seem to occur on test server as it might be because the data are different in test and live.

Thanks a ton in advance,
Sree


Well that should not be a problem because 1 is just a single digit number.
We would not be able to find the real reason with the help of user defined message.
Is it possible to find the original error message and POST it for my reference?|||

Quote:

Originally Posted by amitpatel66

Well that should not be a problem because 1 is just a single digit number.
We would not be able to find the real reason with the help of user defined message.
Is it possible to find the original error message and POST it for my reference?


Hi

I did not mean the Number 1 by value1, I just meant it in reference to a field value1. Yes, I know that I am trying to re-create the error and get the error message, hopefully I get lucky soon and than I will post it.

Thanks,
Sree|||

Quote:

Originally Posted by sreemati

Hi

I did not mean the Number 1 by value1, I just meant it in reference to a field value1. Yes, I know that I am trying to re-create the error and get the error message, hopefully I get lucky soon and than I will post it.

Thanks,
Sree


Then I assume there should be some problem with the data.
Ok, find out the exact error message and POST here for my reference!!

Wednesday, March 21, 2012

Number of databases

This may sound like a silly question, but is their a limit
to how many databases you can have on a SQL 2000
Enterprise Edition?
Our orginization has a Clustered SQL server and I have
always just put all of our databases on it. I am having
no problems with performance but was chastised for having
so many on it any way. I have 83 databases.
Anyway I was curious if Microsoft has a reccomendation of
max amount of db.
Thanks
jjThis is a multi-part message in MIME format.
--=_NextPart_000_0190_01C35B57.E055FD40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You're allowed 32,727 database per instance of SQL Server.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"John Jarrett" <jarrej@.yahoo.com> wrote in message =news:013c01c35b78$7a919430$a401280a@.phx.gbl...
This may sound like a silly question, but is their a limit to how many databases you can have on a SQL 2000 Enterprise Edition?
Our orginization has a Clustered SQL server and I have always just put all of our databases on it. I am having no problems with performance but was chastised for having so many on it any way. I have 83 databases.
Anyway I was curious if Microsoft has a reccomendation of max amount of db.
Thanks
jj
--=_NextPart_000_0190_01C35B57.E055FD40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

You're allowed 32,727 database per =instance of SQL Server.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"John Jarrett" wrote in =message news:013c01c35b78$7a=919430$a401280a@.phx.gbl...This may sound like a silly question, but is their a limit to how many =databases you can have on a SQL 2000 Enterprise Edition?Our =orginization has a Clustered SQL server and I have always just put all of our databases =on it. I am having no problems with performance but was chastised =for having so many on it any way. I have 83 databases. Anyway I was curious if Microsoft has a reccomendation of =max amount of db.Thanksjj

--=_NextPart_000_0190_01C35B57.E055FD40--|||> This may sound like a silly question, but is their a limit
> to how many databases you can have on a SQL 2000
> Enterprise Edition?
Yes. The limit is 32767 per server instance.
> Anyway I was curious if Microsoft has a reccomendation of
> max amount of db.
The above is the limit stated in BOL. Other factors (such as size, number of
users / transactions) will be far more significant constraints on
performance than the number of DBs. Possibly you might want to limit the
number of DBs per server for administrative reasons or in the interests of
availability and resilience but I'm looking at 4 servers which have a total
of 188 DBs between them, so 83 doesn't seem excessive by that benchmark.
--
David Portas
--
Please reply only to the newsgroup
--|||I have a client who is currently running 700 databases on 1 server. And
while the system seems to be functioning, they are seeing latency in data
showing up. Meaning that a record that is added or updated to the database
doesent seem to show up for hours.
These databases average about 150MB each. Is there any configuration option
that would help this, or is this something that they just need to throw more
hardware at?
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:eVHkQu3WDHA.3248@.tk2msftngp13.phx.gbl...
> > This may sound like a silly question, but is their a limit
> > to how many databases you can have on a SQL 2000
> > Enterprise Edition?
> Yes. The limit is 32767 per server instance.
> > Anyway I was curious if Microsoft has a reccomendation of
> > max amount of db.
> The above is the limit stated in BOL. Other factors (such as size, number
of
> users / transactions) will be far more significant constraints on
> performance than the number of DBs. Possibly you might want to limit the
> number of DBs per server for administrative reasons or in the interests of
> availability and resilience but I'm looking at 4 servers which have a
total
> of 188 DBs between them, so 83 doesn't seem excessive by that benchmark.
> --
> David Portas
> --
> Please reply only to the newsgroup
> --
>
>|||You should run performance monitor, and run various SQL, cpu, memory and
disk counters to try to determine where the bottleneck is. I was almost
about to suggest changing the affinity mask if you had more than two
processors (because I remember that from studying). When you get
performance counter measurements back, you can tell whether to throw more
memory, CPU, upgrade the disk subsystem or if it is something more
configurable software wise (adjusting system properties to favor background
processes, adjusting pagefile size and location, creating filegroups to move
database objects to other disks, etc). Good luck.
--
*************************************
Andy S.
andy_mcdba@.yahoo.com
*************************************
"Robert Barr" <RobertLBarr@.cox.net> wrote in message
news:%23jn7wEXfDHA.1712@.TK2MSFTNGP11.phx.gbl...
> I have a client who is currently running 700 databases on 1 server. And
> while the system seems to be functioning, they are seeing latency in data
> showing up. Meaning that a record that is added or updated to the database
> doesent seem to show up for hours.
> These databases average about 150MB each. Is there any configuration
option
> that would help this, or is this something that they just need to throw
more
> hardware at?
>
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:eVHkQu3WDHA.3248@.tk2msftngp13.phx.gbl...
> > > This may sound like a silly question, but is their a limit
> > > to how many databases you can have on a SQL 2000
> > > Enterprise Edition?
> >
> > Yes. The limit is 32767 per server instance.
> >
> > > Anyway I was curious if Microsoft has a reccomendation of
> > > max amount of db.
> >
> > The above is the limit stated in BOL. Other factors (such as size,
number
> of
> > users / transactions) will be far more significant constraints on
> > performance than the number of DBs. Possibly you might want to limit the
> > number of DBs per server for administrative reasons or in the interests
of
> > availability and resilience but I'm looking at 4 servers which have a
> total
> > of 188 DBs between them, so 83 doesn't seem excessive by that benchmark.
> >
> > --
> > David Portas
> > --
> > Please reply only to the newsgroup
> > --
> >
> >
> >
>

Friday, March 9, 2012

NULL+ x = NULL problem

Hi there,
Is there any setting in SQL that can disable this silly logic.
For example, in a number cleaning query I want to combine the Code and the Number

The problem is that I either the code or the number is null, I lose the number:


update tbl
set Teleh = CodeH + TeleH


I know that I can split this and check if one is null, both null, both non-null but i am sure there must be an easier way such as Accesses & operator

The way that I am using now does this, but i'm not sure if this is the best approach

update tbl
set Teleh = isnull(Codeh,'') + isnull(Teleh,'')


The problem with this is that the result is not stored as null, but as '' length 0The problem with this is that the result is not stored as null, but as '' length 0but that's exactly what you wanted!!

or are you saying that if they are both null then you want the result null?

in that case (pun intended),update tbl
set Teleh = case when CodeH is null
and TeleH is null
then null
else coalesce(CodeH,'')
+coalesce(TeleH,'')
end|||Sorry
Often, the entire number is stored in CodeH and Teleh is empty
So if a update it to Codeh + Teleh, I loose the correct number in Codeh