Thursday, March 22, 2012
A Very Disturbing Finding about SQL Server Performance
computer is connected to an MS SQL server, and they are
listening to a music cd, in their own computer, the
performance of the SQL server degrades badly, until the
client stops listening to the CD. We have used
performance monitor to check this and are incredulous at
the findings. I have gone out on the web and, after some
exhaustive searching, have come up with nothing written
on the subject. Has anyone else experienced this
behavior? Has anyone else tested this? Does anyone have
an idea as to why this may be happening and how we can
insulate the performance of the SQL server from the
casual activities of the clients?
Thanks in advance for your replies.
John MangioneI listen to CDs as well as many of our developers while
connected to SQL server. We've never experienced what you
mention here.
>--Original Message--
>After some testing, we have found that, when a client
>computer is connected to an MS SQL server, and they are
>listening to a music cd, in their own computer, the
>performance of the SQL server degrades badly, until the
>client stops listening to the CD. We have used
>performance monitor to check this and are incredulous at
>the findings. I have gone out on the web and, after some
>exhaustive searching, have come up with nothing written
>on the subject. Has anyone else experienced this
>behavior? Has anyone else tested this? Does anyone have
>an idea as to why this may be happening and how we can
>insulate the performance of the SQL server from the
>casual activities of the clients?
>Thanks in advance for your replies.
>John Mangione
>.
>|||When the application is designed, there are many ways of
implementing database access.
If its done through cursors or VB Recordsets, this could
well be the case.
A (I won't say better) perhaps more efficient way is to
use SET commands.
E.g.
Issue the command to UPDATE directly to the server, rather
than locking the cursor.
Microsoft do recognise this as being more efficient.
Good Luck.
>--Original Message--
>If listening to the CD slows down the client machine
while it talks to the
>SQL server (SELECTs, INSERTs, UPDATEs, etc) then maybe
the application and
>the SQL code locks too many resources so other clients
have to wait and that
>might slow down the server.
>"John Mangione" <jmangione@.adelphia.com> wrote in message
>news:015601c36298$8032f4c0$a601280a@.phx.gbl...
>> After some testing, we have found that, when a client
>> computer is connected to an MS SQL server, and they are
>> listening to a music cd, in their own computer, the
>> performance of the SQL server degrades badly, until the
>> client stops listening to the CD. We have used
>> performance monitor to check this and are incredulous at
>> the findings. I have gone out on the web and, after some
>> exhaustive searching, have come up with nothing written
>> on the subject. Has anyone else experienced this
>> behavior? Has anyone else tested this? Does anyone have
>> an idea as to why this may be happening and how we can
>> insulate the performance of the SQL server from the
>> casual activities of the clients?
>> Thanks in advance for your replies.
>> John Mangione
>
>.
>|||Are you using Windows Media Player to listen to the CD's
IF so do you have one of the 3D visualizations running in the back ground
Why, these 3D graphics can eat up between 30-50% of your CPU.
I do not have any idea about the spec's of the machine they are running on
but if it is a desktop with SQL running on it, it can slow them down
significantly
Hope this helps|||This problem may very well expose design flaws in your application.
Regardless of what a user does on his/her machine SQL server must never be
slown down. You do not open a cursor at the client side and keep it open for
a log time, actually you are better off if you never use client side
cursors.
"John Mangione" <jmangione@.adelphia.net> wrote in message
news:016401c36361$a74aa390$a501280a@.phx.gbl...
> Well, I found out some additional information that has
> lowered my anxiety about the issue: the only people that
> are experiencing the degradation of service are those who
> are listening to the music, not any other users of that
> SQL server or the application on it.
> The indicator that threw us off is that the user's
> instance of the process running at the SQL server was
> spiking every time the music was playing on their
> machine. We are still at a loss to explain that, although
> Beverly's response might be closest to what's going on;
> that is, perhaps the use of recordset and cursor locks
> are creating interdepedencies on the two machines that
> could be avoided by using SET commands.
> Thank you all for your replies.
>
> >--Original Message--
> >After some testing, we have found that, when a client
> >computer is connected to an MS SQL server, and they are
> >listening to a music cd, in their own computer, the
> >performance of the SQL server degrades badly, until the
> >client stops listening to the CD. We have used
> >performance monitor to check this and are incredulous at
> >the findings. I have gone out on the web and, after some
> >exhaustive searching, have come up with nothing written
> >on the subject. Has anyone else experienced this
> >behavior? Has anyone else tested this? Does anyone have
> >an idea as to why this may be happening and how we can
> >insulate the performance of the SQL server from the
> >casual activities of the clients?
> >
> >Thanks in advance for your replies.
> >John Mangione
> >.
> >
Thursday, March 8, 2012
a simple question on compatibility
Hello,
I was wondering if there is a version conflict with SSRS for SQL 2000 and Visual Studio 2005? When I went to install the client it was looking for visual studio 2003 and well, I don't have that. Asides from stating it during the install, the client appeared to fully install and of course when I opened VS, no option for SSRS.
I was installing the client over a WAN and figured I should ask before I go on a bug hunt for what I did wrong.
Thanks
VS 2005 will produce 2k5 reports which can′t be deployed on a SQL 2k RS.HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
A Simple Insert statement in European version of SQL
table. Once my program receives the values, creates an insert statement
with comma separated values. Ie:
Insert into T (a,b) values (1.578, 2)
I now understand that those numeric values could have ',' in place of
decimal point for European version. So, the above values would look like
1,578 and 2.
How does the insert statement would know ',' is not a separator in this
case ? Ie:
Insert into T (a,b) values (1,578, 2) --> resulting
into syntax error
Should I be using a different value separator character ?
TIA.
MacI am not the one producing the values with ',' in place of decimal points.
It is SQL Server of European version that returns the data I am collecting
with embedded comma. So, when I submit a query of "Select a from T"
( a is defined to be a real type number), it returns 2,476 instead of
2.476. So, my question is how do I take these returned value with
embedded comma and insert them back into say another field in a table ? I
do not have such SQL version in my site to see what is going on and how to
accomplish such inserts.
- Mac
""Bill Cheng [MSFT]"" <billchng@.online.microsoft.com> wrote in message
news:PyBEKO#aDHA.2108@.cpmsftngxa06.phx.gbl...
> Hi Mac,
> Please do not use comma as decimal separator. It will cause problems. Use
> period as decimal point.
> Character expressions being converted to an exact numeric data type must
> consist of digits, a decimal point, and an optional plus (+) or minus (-).
> Leading blanks are ignored. Comma separators (such as the thousands
> separator in 123,456.00) are not allowed in the string.
>
> Bill Cheng
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> --
> | From: "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com>
> | Newsgroups: microsoft.public.sqlserver.server
> | Subject: A Simple Insert statement in European version of SQL
> | Date: Mon, 25 Aug 2003 16:49:15 -0700
> | Organization: Unisys - Roseville, MN
> | Lines: 20
> | Message-ID: <bie79r$1rmm$1@.si05.rsvl.unisys.com>
> | NNTP-Posting-Host: 192.59.171.175
> | X-Trace: si05.rsvl.unisys.com 1061855355 61142 192.59.171.175 (25 Aug
> 2003 23:49:15 GMT)
> | X-Complaints-To: news@.rsvl.unisys.com
> | NNTP-Posting-Date: 25 Aug 2003 23:49:15 GMT
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> | Path:
>
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
>
m!feed2.news.rcn.net!rcn!news-out.visi.com!petbe.visi.com!ash.uu.net!bbnews1
> .unisys.com!trsvr.tr.unisys.com!si05!not-for-mail
> | Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:303093
> | X-Tomcat-NG: microsoft.public.sqlserver.server
> |
> | I have a client that uses my utility program to insert a record into a
> | table. Once my program receives the values, creates an insert
statement
> | with comma separated values. Ie:
> | Insert into T (a,b) values (1.578, 2)
> |
> | I now understand that those numeric values could have ',' in place of
> | decimal point for European version. So, the above values would look
> like
> | 1,578 and 2.
> |
> | How does the insert statement would know ',' is not a separator in this
> | case ? Ie:
> | Insert into T (a,b) values (1,578, 2) --> resulting
> | into syntax error
> |
> | Should I be using a different value separator character ?
> |
> | TIA.
> | Mac
> |
> |
> |
>|||Are you using Visual basic ?
VB does use the client-settings to format numbers, dates,...
You'll have to use a format function to convert to a propre string.
e.g. strsql = "insert into table1 (col1) values (" & Format(numcol,
"###0.00") & ")"
jobi
"Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
news:big51p$5vu$1@.si05.rsvl.unisys.com...
> I am not the one producing the values with ',' in place of decimal points.
> It is SQL Server of European version that returns the data I am collecting
> with embedded comma. So, when I submit a query of "Select a from T"
> ( a is defined to be a real type number), it returns 2,476 instead of
> 2.476. So, my question is how do I take these returned value with
> embedded comma and insert them back into say another field in a table ?
I
> do not have such SQL version in my site to see what is going on and how to
> accomplish such inserts.
> - Mac
>
> ""Bill Cheng [MSFT]"" <billchng@.online.microsoft.com> wrote in message
> news:PyBEKO#aDHA.2108@.cpmsftngxa06.phx.gbl...
> > Hi Mac,
> >
> > Please do not use comma as decimal separator. It will cause problems.
Use
> > period as decimal point.
> >
> > Character expressions being converted to an exact numeric data type must
> > consist of digits, a decimal point, and an optional plus (+) or minus
(-).
> > Leading blanks are ignored. Comma separators (such as the thousands
> > separator in 123,456.00) are not allowed in the string.
> >
> >
> >
> > Bill Cheng
> > Microsoft Online Partner Support
> >
> > Get Secure! - www.microsoft.com/security
> > This posting is provided "as is" with no warranties and confers no
rights.
> > --
> > | From: "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com>
> > | Newsgroups: microsoft.public.sqlserver.server
> > | Subject: A Simple Insert statement in European version of SQL
> > | Date: Mon, 25 Aug 2003 16:49:15 -0700
> > | Organization: Unisys - Roseville, MN
> > | Lines: 20
> > | Message-ID: <bie79r$1rmm$1@.si05.rsvl.unisys.com>
> > | NNTP-Posting-Host: 192.59.171.175
> > | X-Trace: si05.rsvl.unisys.com 1061855355 61142 192.59.171.175 (25 Aug
> > 2003 23:49:15 GMT)
> > | X-Complaints-To: news@.rsvl.unisys.com
> > | NNTP-Posting-Date: 25 Aug 2003 23:49:15 GMT
> > | X-Priority: 3
> > | X-MSMail-Priority: Normal
> > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> > | Path:
> >
>
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
> >
>
m!feed2.news.rcn.net!rcn!news-out.visi.com!petbe.visi.com!ash.uu.net!bbnews1
> > .unisys.com!trsvr.tr.unisys.com!si05!not-for-mail
> > | Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:303093
> > | X-Tomcat-NG: microsoft.public.sqlserver.server
> > |
> > | I have a client that uses my utility program to insert a record into a
> > | table. Once my program receives the values, creates an insert
> statement
> > | with comma separated values. Ie:
> > | Insert into T (a,b) values (1.578, 2)
> > |
> > | I now understand that those numeric values could have ',' in place of
> > | decimal point for European version. So, the above values would look
> > like
> > | 1,578 and 2.
> > |
> > | How does the insert statement would know ',' is not a separator in
this
> > | case ? Ie:
> > | Insert into T (a,b) values (1,578, 2) -->
resulting
> > | into syntax error
> > |
> > | Should I be using a different value separator character ?
> > |
> > | TIA.
> > | Mac
> > |
> > |
> > |
> >
>|||As jobi point out: You have to differentiate between input and output. Just because a client tool
formats something that SQL Server outputs with a comma doesn't mean that SQL Server accepts that as
a valid input format.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"jobi" <jobi@.reply2.group> wrote in message news:bihkck$boq$1@.reader08.wxs.nl...
> Are you using Visual basic ?
> VB does use the client-settings to format numbers, dates,...
> You'll have to use a format function to convert to a propre string.
> e.g. strsql = "insert into table1 (col1) values (" & Format(numcol,
> "###0.00") & ")"
> jobi
> "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
> news:big51p$5vu$1@.si05.rsvl.unisys.com...
> > I am not the one producing the values with ',' in place of decimal points.
> > It is SQL Server of European version that returns the data I am collecting
> > with embedded comma. So, when I submit a query of "Select a from T"
> > ( a is defined to be a real type number), it returns 2,476 instead of
> > 2.476. So, my question is how do I take these returned value with
> > embedded comma and insert them back into say another field in a table ?
> I
> > do not have such SQL version in my site to see what is going on and how to
> > accomplish such inserts.
> >
> > - Mac
> >
> >
> > ""Bill Cheng [MSFT]"" <billchng@.online.microsoft.com> wrote in message
> > news:PyBEKO#aDHA.2108@.cpmsftngxa06.phx.gbl...
> > > Hi Mac,
> > >
> > > Please do not use comma as decimal separator. It will cause problems.
> Use
> > > period as decimal point.
> > >
> > > Character expressions being converted to an exact numeric data type must
> > > consist of digits, a decimal point, and an optional plus (+) or minus
> (-).
> > > Leading blanks are ignored. Comma separators (such as the thousands
> > > separator in 123,456.00) are not allowed in the string.
> > >
> > >
> > >
> > > Bill Cheng
> > > Microsoft Online Partner Support
> > >
> > > Get Secure! - www.microsoft.com/security
> > > This posting is provided "as is" with no warranties and confers no
> rights.
> > > --
> > > | From: "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com>
> > > | Newsgroups: microsoft.public.sqlserver.server
> > > | Subject: A Simple Insert statement in European version of SQL
> > > | Date: Mon, 25 Aug 2003 16:49:15 -0700
> > > | Organization: Unisys - Roseville, MN
> > > | Lines: 20
> > > | Message-ID: <bie79r$1rmm$1@.si05.rsvl.unisys.com>
> > > | NNTP-Posting-Host: 192.59.171.175
> > > | X-Trace: si05.rsvl.unisys.com 1061855355 61142 192.59.171.175 (25 Aug
> > > 2003 23:49:15 GMT)
> > > | X-Complaints-To: news@.rsvl.unisys.com
> > > | NNTP-Posting-Date: 25 Aug 2003 23:49:15 GMT
> > > | X-Priority: 3
> > > | X-MSMail-Priority: Normal
> > > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> > > | Path:
> > >
> >
> cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
> > >
> >
> m!feed2.news.rcn.net!rcn!news-out.visi.com!petbe.visi.com!ash.uu.net!bbnews1
> > > .unisys.com!trsvr.tr.unisys.com!si05!not-for-mail
> > > | Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:303093
> > > | X-Tomcat-NG: microsoft.public.sqlserver.server
> > > |
> > > | I have a client that uses my utility program to insert a record into a
> > > | table. Once my program receives the values, creates an insert
> > statement
> > > | with comma separated values. Ie:
> > > | Insert into T (a,b) values (1.578, 2)
> > > |
> > > | I now understand that those numeric values could have ',' in place of
> > > | decimal point for European version. So, the above values would look
> > > like
> > > | 1,578 and 2.
> > > |
> > > | How does the insert statement would know ',' is not a separator in
> this
> > > | case ? Ie:
> > > | Insert into T (a,b) values (1,578, 2) -->
> resulting
> > > | into syntax error
> > > |
> > > | Should I be using a different value separator character ?
> > > |
> > > | TIA.
> > > | Mac
> > > |
> > > |
> > > |
> > >
> >
> >
>|||Mac,
I've checked my vb-code again, and found this extra.
'Aparently the format still uses the client-setting for decimal point !!!
replace$(string, ",",".")
so you'll have to come up to this :
e.g. strsql = "insert into table1 (col1) values (" &
Replace$(Format(numcol, "###0.00"),",",".") & ")"
I guess you don't need the ###-part, in fact, you only need the format if
you want control of the format, else you can use the cstr-function.
Replace$(CStr(numcol), ",", ".")
jobi
"Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
news:bijdkf$2fsd$1@.si05.rsvl.unisys.com...
> Jobi,
> Yes. I am using VB. Also when I am collecting the data, I use Format
> function to make sure I only get 2 digits decimal point. The format
> sysntax I use is following:
> Format(numValue, "0.00").
> Is this not correct ? Do I need the ### in front of them ? More like
aVB
> question...
> By using the Format function I thought I am also forcing the decimal point
> to show up as decimal point despite the local setting of the computer.
This
> way then I can turn around and use the result in another insert statement
> without further formatting.
> Thanks for the input.
> Mac
> "jobi" <jobi@.reply2.group> wrote in message
> news:bihkck$boq$1@.reader08.wxs.nl...
> > Are you using Visual basic ?
> >
> > VB does use the client-settings to format numbers, dates,...
> > You'll have to use a format function to convert to a propre string.
> >
> > e.g. strsql = "insert into table1 (col1) values (" & Format(numcol,
> > "###0.00") & ")"
> >
> > jobi
> > "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
> > news:big51p$5vu$1@.si05.rsvl.unisys.com...
> > > I am not the one producing the values with ',' in place of decimal
> points.
> > > It is SQL Server of European version that returns the data I am
> collecting
> > > with embedded comma. So, when I submit a query of "Select a from
T"
> > > ( a is defined to be a real type number), it returns 2,476 instead
of
> > > 2.476. So, my question is how do I take these returned value with
> > > embedded comma and insert them back into say another field in a table
?
> > I
> > > do not have such SQL version in my site to see what is going on and
how
> to
> > > accomplish such inserts.
> > >
> > > - Mac
> > >
> > >
> > > ""Bill Cheng [MSFT]"" <billchng@.online.microsoft.com> wrote in message
> > > news:PyBEKO#aDHA.2108@.cpmsftngxa06.phx.gbl...
> > > > Hi Mac,
> > > >
> > > > Please do not use comma as decimal separator. It will cause
problems.
> > Use
> > > > period as decimal point.
> > > >
> > > > Character expressions being converted to an exact numeric data type
> must
> > > > consist of digits, a decimal point, and an optional plus (+) or
minus
> > (-).
> > > > Leading blanks are ignored. Comma separators (such as the thousands
> > > > separator in 123,456.00) are not allowed in the string.
> > > >
> > > >
> > > >
> > > > Bill Cheng
> > > > Microsoft Online Partner Support
> > > >
> > > > Get Secure! - www.microsoft.com/security
> > > > This posting is provided "as is" with no warranties and confers no
> > rights.
> > > > --
> > > > | From: "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com>
> > > > | Newsgroups: microsoft.public.sqlserver.server
> > > > | Subject: A Simple Insert statement in European version of SQL
> > > > | Date: Mon, 25 Aug 2003 16:49:15 -0700
> > > > | Organization: Unisys - Roseville, MN
> > > > | Lines: 20
> > > > | Message-ID: <bie79r$1rmm$1@.si05.rsvl.unisys.com>
> > > > | NNTP-Posting-Host: 192.59.171.175
> > > > | X-Trace: si05.rsvl.unisys.com 1061855355 61142 192.59.171.175 (25
> Aug
> > > > 2003 23:49:15 GMT)
> > > > | X-Complaints-To: news@.rsvl.unisys.com
> > > > | NNTP-Posting-Date: 25 Aug 2003 23:49:15 GMT
> > > > | X-Priority: 3
> > > > | X-MSMail-Priority: Normal
> > > > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> > > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> > > > | Path:
> > > >
> > >
> >
>
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
> > > >
> > >
> >
>
m!feed2.news.rcn.net!rcn!news-out.visi.com!petbe.visi.com!ash.uu.net!bbnews1
> > > > .unisys.com!trsvr.tr.unisys.com!si05!not-for-mail
> > > > | Xref: cpmsftngxa06.phx.gbl
microsoft.public.sqlserver.server:303093
> > > > | X-Tomcat-NG: microsoft.public.sqlserver.server
> > > > |
> > > > | I have a client that uses my utility program to insert a record
into
> a
> > > > | table. Once my program receives the values, creates an insert
> > > statement
> > > > | with comma separated values. Ie:
> > > > | Insert into T (a,b) values (1.578, 2)
> > > > |
> > > > | I now understand that those numeric values could have ',' in
place
> of
> > > > | decimal point for European version. So, the above values would
> look
> > > > like
> > > > | 1,578 and 2.
> > > > |
> > > > | How does the insert statement would know ',' is not a separator
in
> > this
> > > > | case ? Ie:
> > > > | Insert into T (a,b) values (1,578, 2) -->
> > resulting
> > > > | into syntax error
> > > > |
> > > > | Should I be using a different value separator character ?
> > > > |
> > > > | TIA.
> > > > | Mac
> > > > |
> > > > |
> > > > |
> > > >
> > >
> > >
> >
> >
>
Tuesday, March 6, 2012
'A required privilege is not held by the client' when re-initalization
Hi all,
the sys admin has changed the service a/c to another admin. id. But now, i can't start the replication jobs even re-created the publication and subscription with the new admin. id. Any advise? Thanks in advance!
'Executed as user: test.com\admin. A required privilege is not held by the client. The step failed.'
Hi Stephaine,
How do your admin change the service account? He/she might use Windows Service Control Manager to change account. To solve the issue, please refer to this KB article (http://support.microsoft.com/kb/911305/en-us).
Thanks,
Peng
|||an issue i found was that sql server agent and ssis had been changed to not use the local system account. this caused me to continually get the dreaded --> "A required privilege is not held by the client" error. i fought with it all afternoon and eventually updated the services to use the local system account and it worked. perhaps this will save some other as much time as i wasted.'A required privilege is not held by the client' when re-initalization
Hi all,
the sys admin has changed the service a/c to another admin. id. But now, i can't start the replication jobs even re-created the publication and subscription with the new admin. id. Any advise? Thanks in advance!
'Executed as user: test.com\admin. A required privilege is not held by the client. The step failed.'
Hi Stephaine,
How do your admin change the service account? He/she might use Windows Service Control Manager to change account. To solve the issue, please refer to this KB article (http://support.microsoft.com/kb/911305/en-us).
Thanks,
Peng
|||an issue i found was that sql server agent and ssis had been changed to not use the local system account. this caused me to continually get the dreaded --> "A required privilege is not held by the client" error. i fought with it all afternoon and eventually updated the services to use the local system account and it worked. perhaps this will save some other as much time as i wasted.Monday, February 13, 2012
a minus b, how?
data extracted via select statements i.e.
select client from tableA
minus
select client from tableB
But how do ytou do this in sql?
I tried two methods:
method 1:
select a.client from tableA a where a.client not in (select b.client from
tableB b)
... this doesnt return any results
method 2:
select a.client, b.client from tableA a left join tableB b on a.client =
b.client
.. those results with b.client= null are the ones im interested in
I've noticed that method 1 and method 2 dont give the same results. method 1
gives no results, method 2 gives > 0 results. Whats the difference between
method 1 and 2, and my objective of setA - setB ?
any help most appreciated!
cheers, johnjohn r wrote:
> Hi, I know that under oracle you can do simple minus calculations of set
> data extracted via select statements i.e.
> select client from tableA
> minus
> select client from tableB
> But how do ytou do this in sql?
> I tried two methods:
> method 1:
> select a.client from tableA a where a.client not in (select b.client from
> tableB b)
> ... this doesnt return any results
> method 2:
> select a.client, b.client from tableA a left join tableB b on a.client =
> b.client
> .. those results with b.client= null are the ones im interested in
> I've noticed that method 1 and method 2 dont give the same results. method
1
> gives no results, method 2 gives > 0 results. Whats the difference between
> method 1 and 2, and my objective of setA - setB ?
> any help most appreciated!
> cheers, john
In SQL Server 2005 use EXCEPT instead of Oracle's MINUS.
In SQL Server 2000 use either the NOT IN method or your LEFT JOIN
method (add WHERE b.client IS NULL) or use NOT EXISTS.
The difference between your NOT IN query and your LEFT JOIN query is
almost certainly to do with NULLs in TableB. If a client in the
subquery is NULL then the result of NOT IN is always false or unknown
so no rows will be returned. Change your first query to:
SELECT A.client
FROM tableA A
WHERE A.client NOT IN
(SELECT B.client
FROM tableB AS B
WHERE B.client IS NOT NULL) ;
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1132222310.964234.264250@.o13g2000cwo.googlegroups.com...
> john r wrote:
> In SQL Server 2005 use EXCEPT instead of Oracle's MINUS.
> In SQL Server 2000 use either the NOT IN method or your LEFT JOIN
> method (add WHERE b.client IS NULL) or use NOT EXISTS.
> The difference between your NOT IN query and your LEFT JOIN query is
> almost certainly to do with NULLs in TableB. If a client in the
> subquery is NULL then the result of NOT IN is always false or unknown
> so no rows will be returned. Change your first query to:
> SELECT A.client
> FROM tableA A
> WHERE A.client NOT IN
> (SELECT B.client
> FROM tableB AS B
> WHERE B.client IS NOT NULL) ;
> --
> David Portas
> SQL Server MVP
> --
>
thanks for the reply, all the info is much appreciated!
cheers, john
A little help with clustered SQL server setup.
I keep getting errors while trying to install SQL 2K5 server on Win2K3 x64
R2 SP2 cluster.
The setup sequence was
1. Install SQL client/tools on all nodes
2. Install first instance of SQL server
3. Install SQL SP2 for client/tools on all nodes
4. Install SQL server SP2 for instance
5. Install second instance of SQL server
This step keeps failing no matter what I tried.
I did similar setup before in “slightly” different order and it works fine:
1. Install SQL client/tools on all nodes
2. Install first instance of SQL server
3. Install second instance of SQL server
4. Install third instance of SQL server
5. Install SQL SP2 for client/tools on all nodes
6. Install SQL server SP2 for all instances
With my current setup I don’t want (actually I can not) follow same order.
What if the first instance is already in production AND SP2 is applied
already, and then I need to install a new instance?
Anyway, setup keeps failing on remote nodes with this error:
(I tried both, GUI and command line with exact same result)
Running: LoadResourcesAction at: 2007/4/22 22:22:59
Complete: LoadResourcesAction at: 2007/4/22 22:22:59, returned true
Running: ParseBootstrapOptionsAction at: 2007/4/22 22:22:59
Loaded DLL:\\NYSQL01\C$\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\xmlrw.dll Version:2.0.3609.0
Error :Read private data failed 2
Complete: ParseBootstrapOptionsAction at: 2007/4/22 22:22:59, returned false
Error: Action "ParseBootstrapOptionsAction" failed during execution. Error
information reported during run:
Could not decrypt command line due to WinException.
Error Code: 0x80070002 (2)
Windows Error Text: The system cannot find the file specified.
Source File Name: cryptohelper\lsasecret.cpp
Compiler Timestamp: Sat Oct 7 09:43:52 2006
Function Name: sqls::LsaSecret::Read
Source Line Number: 107
Is the Cluster service account the same on all nodes?
Ayad Shammout
"OK" <OK@.discussions.microsoft.com> wrote in message
news:05D675D0-39FC-4621-AAFA-CD4E4FFD1B18@.microsoft.com...
> Guys,
> I keep getting errors while trying to install SQL 2K5 server on Win2K3 x64
> R2 SP2 cluster.
> The setup sequence was
> 1. Install SQL client/tools on all nodes
> 2. Install first instance of SQL server
> 3. Install SQL SP2 for client/tools on all nodes
> 4. Install SQL server SP2 for instance
> 5. Install second instance of SQL server
> This step keeps failing no matter what I tried.
> I did similar setup before in "slightly" different order and it works
> fine:
> 1. Install SQL client/tools on all nodes
> 2. Install first instance of SQL server
> 3. Install second instance of SQL server
> 4. Install third instance of SQL server
> 5. Install SQL SP2 for client/tools on all nodes
> 6. Install SQL server SP2 for all instances
> With my current setup I don't want (actually I can not) follow same order.
> What if the first instance is already in production AND SP2 is applied
> already, and then I need to install a new instance?
> Anyway, setup keeps failing on remote nodes with this error:
> (I tried both, GUI and command line with exact same result)
> Running: LoadResourcesAction at: 2007/4/22 22:22:59
> Complete: LoadResourcesAction at: 2007/4/22 22:22:59, returned true
> Running: ParseBootstrapOptionsAction at: 2007/4/22 22:22:59
> Loaded DLL:\\NYSQL01\C$\Program Files\Microsoft SQL Server\90\Setup
> Bootstrap\xmlrw.dll Version:2.0.3609.0
> Error :Read private data failed 2
> Complete: ParseBootstrapOptionsAction at: 2007/4/22 22:22:59, returned
> false
> Error: Action "ParseBootstrapOptionsAction" failed during execution.
> Error
> information reported during run:
> Could not decrypt command line due to WinException.
> Error Code: 0x80070002 (2)
> Windows Error Text: The system cannot find the file specified.
> Source File Name: cryptohelper\lsasecret.cpp
> Compiler Timestamp: Sat Oct 7 09:43:52 2006
> Function Name: sqls::LsaSecret::Read
> Source Line Number: 107
>
|||LOL :-)
Exactly the same of course!
OK
"Ayad Shammout" wrote:
> Is the Cluster service account the same on all nodes?
> Ayad Shammout
>
> "OK" <OK@.discussions.microsoft.com> wrote in message
> news:05D675D0-39FC-4621-AAFA-CD4E4FFD1B18@.microsoft.com...
>
>