Thursday, March 29, 2012

Does SSAS allow implementation of SCD?

Can I implement a slowly changing dimension type 2 in SSAS. I am looking at creating an SSAS cube which can pull data directly from an operational OLTP database. The source database does not maitain history of changes for the dimensions, and I wanted to know if SSAS will help me keep that history by defining certain dimensions as a SCD. If so how do I define that rule. All tutorials I have read only skim on that topic and don't describe the steps/ways to define it in SSAS. Any help would be appreciated.

While you can use type 2 SCDs (and any other implementation of an SCD) in SSAS, it is not the thing that implements them.

You need to implement them in a Datamart/Datawarehouse and SSAS will then read them from there. What might be of interest to you is the Slowly Changing Dimension task in SSIS. It's not the quickest of components, but it does allow you to use a GUI to define the columns that you want to tracking history on.

Does SRS sql engine break things that used to work?

I've noticed that when I take stable SQL 2000 engines that are at SP3A where
the sqlservr executable is at build 8.00.760 and install SRS I get a new
build of the sql engine.
SQLServr.EXE build is 8.00.859 in SRS and things that used to work don't.
For example, stored procedure debug doesn't work at all on an SRS SQL Server.
I know I have seen a few other things that are now broke.
Does anyone know of any hotfixes that repair features that SRS breaks?RS doesn't do anything to the SQL Engine. If you are talkin about the 859
hotfix that we require in certain situations, there is a newer hotfix that
resolves the problem. You need to request it from product support. See
http://support.microsoft.com/default.aspx?scid=kb;en-us;831997.
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:22305D8C-975B-4283-BC11-8264CDDEEB1E@.microsoft.com...
> I've noticed that when I take stable SQL 2000 engines that are at SP3A
> where
> the sqlservr executable is at build 8.00.760 and install SRS I get a new
> build of the sql engine.
> SQLServr.EXE build is 8.00.859 in SRS and things that used to work don't.
> For example, stored procedure debug doesn't work at all on an SRS SQL
> Server.
> I know I have seen a few other things that are now broke.
> Does anyone know of any hotfixes that repair features that SRS breaks?|||Thank-you for the quick reponse Brian.
I think maybe I wasn't too clear on my question.
If I install SQL Server 2000 Standard and then take it up to SP3A the build
level of my SQL engine is 760.
However, if I then apply SQL Reporting Services on top of this installation
my SQL engine gets taken up to build 859. Maybe this is not directly related
to SRS, but it certainly takes place upon installation of SRS.
At that point I no longer have the capability to debug stored procs (I
believe thru the sp_dbidbg xp).
So the downside is that I have to make a choice between having SRS and then
losing the capability of stored proc debug or not having SRS.
If there is a hotfix that addresses that I would love to have it.
thanks,
dan
"Brian Welcker [MS]" wrote:
> RS doesn't do anything to the SQL Engine. If you are talkin about the 859
> hotfix that we require in certain situations, there is a newer hotfix that
> resolves the problem. You need to request it from product support. See
> http://support.microsoft.com/default.aspx?scid=kb;en-us;831997.
>
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan" <Dan@.discussions.microsoft.com> wrote in message
> news:22305D8C-975B-4283-BC11-8264CDDEEB1E@.microsoft.com...
> > I've noticed that when I take stable SQL 2000 engines that are at SP3A
> > where
> > the sqlservr executable is at build 8.00.760 and install SRS I get a new
> > build of the sql engine.
> >
> > SQLServr.EXE build is 8.00.859 in SRS and things that used to work don't.
> >
> > For example, stored procedure debug doesn't work at all on an SRS SQL
> > Server.
> >
> > I know I have seen a few other things that are now broke.
> >
> > Does anyone know of any hotfixes that repair features that SRS breaks?
>
>|||The RS setup proces does not touch the version of the SQL engine. We really
don't. We recommend a specific SQL engine hotfix during the installation
process that does do this. You would need to call product support for the
hotfix. I don't think it is generally downloadable.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:DA304849-A7E9-4A92-A39D-5E338227EF52@.microsoft.com...
> Thank-you for the quick reponse Brian.
> I think maybe I wasn't too clear on my question.
> If I install SQL Server 2000 Standard and then take it up to SP3A the
> build
> level of my SQL engine is 760.
> However, if I then apply SQL Reporting Services on top of this
> installation
> my SQL engine gets taken up to build 859. Maybe this is not directly
> related
> to SRS, but it certainly takes place upon installation of SRS.
> At that point I no longer have the capability to debug stored procs (I
> believe thru the sp_dbidbg xp).
> So the downside is that I have to make a choice between having SRS and
> then
> losing the capability of stored proc debug or not having SRS.
> If there is a hotfix that addresses that I would love to have it.
> thanks,
> dan
>
> "Brian Welcker [MS]" wrote:
>> RS doesn't do anything to the SQL Engine. If you are talkin about the 859
>> hotfix that we require in certain situations, there is a newer hotfix
>> that
>> resolves the problem. You need to request it from product support. See
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;831997.
>>
>> --
>> Brian Welcker
>> Group Program Manager
>> Microsoft SQL Server
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Dan" <Dan@.discussions.microsoft.com> wrote in message
>> news:22305D8C-975B-4283-BC11-8264CDDEEB1E@.microsoft.com...
>> > I've noticed that when I take stable SQL 2000 engines that are at SP3A
>> > where
>> > the sqlservr executable is at build 8.00.760 and install SRS I get a
>> > new
>> > build of the sql engine.
>> >
>> > SQLServr.EXE build is 8.00.859 in SRS and things that used to work
>> > don't.
>> >
>> > For example, stored procedure debug doesn't work at all on an SRS SQL
>> > Server.
>> >
>> > I know I have seen a few other things that are now broke.
>> >
>> > Does anyone know of any hotfixes that repair features that SRS breaks?
>>sql

Does SQLSERVER support fuzzy text searching(like the function of agrep).

Does SQLSERVER support fuzzy text searching(like the function of agrep).
For example, given the input keyword [homogenos] and similarity
parameter [2 characters], the function will find out valid result from
datasource by either replacing,inserting or deleting upto two different
characters from word [homogenos].
Both homogenooos(homogeno[+oo]s) and homogeos(homoge[-n]os are valid
result.
thx.No, not directly. You need to build a function that does Levenstein Edit
distance. You will find an implementation of this in the Fuzzy functions
which ship with SSIS in SQL 2005.
You can also use the expansion options in the thesaurus capabilities in
FullText search so a search on homogenos could be expanded to search on
homogenos homogenoos, homogeneous or homogeos, but you have to know in
advance what all the expansions might be and hard code them into your
thesaurus file.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"zlf" <zlfcn@.hotmail.com> wrote in message
news:uGyRG55YGHA.4944@.TK2MSFTNGP02.phx.gbl...
> Does SQLSERVER support fuzzy text searching(like the function of agrep).
> For example, given the input keyword [homogenos] and similarity
> parameter [2 characters], the function will find out valid result from
> datasource by either replacing,inserting or deleting upto two different
> characters from word [homogenos].
> Both homogenooos(homogeno[+oo]s) and homogeos(homoge[-n]os are valid
> result.
> thx.
>

Does SQLSERVER support fuzzy text searching(like the function of a

functions are
SOUNDEX
DIFFERENCE
For freetext, try contains clause,
check CONTAINS in BOL
I hope this was what u were asking forThank you for your reply.
However, as I know, CONTAINS does not support the kind of fuzzy searching
described in my post.
And it is very likely that it does support it and I do not know how to use
it.
Can u show my a sample? Thank you again.
-- Original Message --
From: "Omnibuzz" <Omnibuzz@.discussions.microsoft.com>
Newsgroups: microsoft.public.sqlserver.programming
Sent: Wednesday, April 19, 2006 7:00 PM
Subject: RE: Does SQLSERVER support fuzzy text searching(like the function
of a
"Omnibuzz" <Omnibuzz@.discussions.microsoft.com> д?:43C1F9E4-4CA3-478D-9064-82AA8D
9DA35D@.microsoft.com...
> functions are
> SOUNDEX
> DIFFERENCE
> For freetext, try contains clause,
> check CONTAINS in BOL
> I hope this was what u were asking for|||Thank you for your reply.
However, as I know, CONTAINS does not support the kind of fuzzy searching
described in my post.
And it is very likely that it does support it and I do not know how to use
it.
Can u show my a sample? Thank you again.
-- Original Message --
From: "Omnibuzz" <Omnibuzz@.discussions.microsoft.com>
Newsgroups: microsoft.public.sqlserver.programming
Sent: Wednesday, April 19, 2006 7:00 PM
Subject: RE: Does SQLSERVER support fuzzy text searching(like the function
of a
"Omnibuzz" <Omnibuzz@.discussions.microsoft.com> д?:43C1F9E4-4CA3-478D-9064-82AA8D
9DA35D@.microsoft.com...
> functions are
> SOUNDEX
> DIFFERENCE
> For freetext, try contains clause,
> check CONTAINS in BOL
> I hope this was what u were asking for

does sqlserver install auto w/Small Bus Srv 2003

Does SQL server install automatically with SBS?
I did an install last night for a client, not at server
at this time.
Did this install auto?I do not believe that it is part of the automated setup.
Rand
This posting is provided "as is" with no warranties and confers no rights.

does sqlserver install auto w/Small Bus Srv 2003

Does SQL server install automatically with SBS?
I did an install last night for a client, not at server
at this time.
Did this install auto?I do not believe that it is part of the automated setup.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Does SQLMail require a mail account on the Exchange Server?

I just read that if you use an exchange server...the account that you
start SQL with needs a mail on the exchange box.

Is this true?

I know I didn't need an account when I've set it up before...but I
might have been using a POP3 server.

I have Outlook 2003 installed on the server. Windows 2003 Enterprise.

Thanks.Hi

If you are using SQL Mail you will need a MAPI profile, and if you are
connectng to an exchange server you will need an account on that server. You
could connect to a POP3 server or alternatively you could check out
http://www.sqldev.net/xp/xpsmtp.htm.

For more information check out
http://msdn.microsoft.com/library/d...erverE-mail.asp
http://support.microsoft.com/kb/281293
http://support.microsoft.com/kb/263556/
You may want to use an older version of Outlook, if you are POP3.

John

<mchi55@.yahoo.comwrote in message
news:1157150726.360290.48890@.i42g2000cwa.googlegro ups.com...

Quote:

Originally Posted by

>I just read that if you use an exchange server...the account that you
start SQL with needs a mail on the exchange box.
>
Is this true?
>
I know I didn't need an account when I've set it up before...but I
might have been using a POP3 server.
>
I have Outlook 2003 installed on the server. Windows 2003 Enterprise.
>
Thanks.
>

sql

Does SqlDataSource hold the connection ?

If we bind a GridView to a SQLDataSource, is it not a connected usage, which locks up one connection thread ?I don't think so. Once it's databound the connection should be closed. Any sorting or paging will open a new connection.|||No, the connection will be closed. However, you may tie up a connection on the server for a little while if you have connection pooling turned on.

Does SQL2005 still require all FTI keywords to match in the same column?

Hello,
My understanding of full-text index searching is that CONTAINS()
requires that all the keywords supplied (separated by AND) must match
in the same column in order for the record to be considered a match and
returned. So if we have a situation where we need keywords to match in
multiple columns, we either need to use multiple CONTAINS() statements,
use FREETEXT() and allow it to manipulate our keywords, or create a
single column containing all the text we want indexed for a row and
search that unified column.
Is this correct? If so, is this shortcoming fixed in SQL2005?
Thanks,
Thomas
Hi Thomas,
I am afraid SQL 2005 shows the same behavior. FTS is designed to search for text/documents, which normally are stored in the same column. Can you please explain a bit more why you need to have queries that involve several word matches for several columns?
Thanks!
Fernando Azpeitia Lopez,
Program Manager
SQL Server FTS team
--Original Message--
From: Thomas
Posted At: Wednesday, February 15, 2006 9:33 AM
Posted To: microsoft.public.sqlserver.fulltext
Conversation: Does SQL2005 still require all FTI keywords to match in the same column?
Subject: Does SQL2005 still require all FTI keywords to match in the same column?
Hello,
My understanding of full-text index searching is that CONTAINS()
requires that all the keywords supplied (separated by AND) must match
in the same column in order for the record to be considered a match and
returned. So if we have a situation where we need keywords to match in
multiple columns, we either need to use multiple CONTAINS() statements,
use FREETEXT() and allow it to manipulate our keywords, or create a
single column containing all the text we want indexed for a row and
search that unified column.
Is this correct? If so, is this shortcoming fixed in SQL2005?
Thanks,
Thomas
|||Hi Fernando,
I'm not sure exactly how to respond... SQL Server excels at storing all
kinds of data. Our records are hybrids of large text fields, numbers,
dates, etc. We have multiple text columns. Just as one example, let's
say we have an email database where we have the headers stored in
different fields, at the very least, subject and body in different
fields. A person enters multiple keywords, and even if some are in the
subject and some are in the body, the record should match. That's just
a basic example.
We were really blown away when we found out this does not behave in
this fashion. It makes no sense, from our perspective as a user, to
query * (all columns) for some keywords, and require they all match in
only a single column.
Another problem we are fighting that lends itself to being allowed to
find the keywords across columns: tagging. We have found that we can
really speed up our searches if the entire search is performed on the
FTS side of the equation.
Contrived Example: You want to find all records that contain the word
"house" and were created in September 2005. Your table holds 100,000
records. Let's say 50,000 of those records contain the word "house."
But only 1000 were created in September 2005. You could do a search
like this:
SELECT * FROM ourtable WHERE CONTAINS(*, '"house"') AND createdate
BETWEEN '09/01/2005 00:00:00' AND '09/30/2005 23:59:59'
But we have found this search is really slow. The slowdown is in the
number of records being returned that contain "house" even though most
of them are not going to pass our SQL Server filter of the date. So we
want to create a tag column of textual things that we can search on the
FTS. Then our query would be:
SELECT * FROM ourtable WHERE CONTAINS(*, '"house" and "DT200509"')
Now we've shifted the date requirement over to the FTS side of the
search. Admittedly, a hack, but it should work. As you know, it
doesn't, because the two keywords will be found in two different
columns.
So what we are forced to do now is the ultimate hack: create a single,
new text field where we are duplicating all of our data from multiple
columns, adding our "tags" for constraining the searches, and then
full-text indexing this single column in order to get fast searches.
It seems weird that FTS is designed to search documents when SQL Server
is designed to hold all kinds of data. Shouldn't FTS be designed to
efficiently search what SQL Server can hold?
Thanks for your time.
Regards,
Thomas
|||Hi Thomas,
I see your problem. Let me think about the best solutions.
Most of FTS users are focus in get great functionality to efficiently search inside a document, rather than to search parts in different documents stored in different columns. Anyway, for these cases like yours, we support multiple CONTAINS. Is true that
the performance is not as good as with one single CONTAINS but if we would allow from the beginning to have several columns look ups in a single CONTAINS, we would probably finish with similar performance even if you are just writing one clause.
The good news is the following.
-For next FTS release we have several architecture improvements that will improve dramatically the joined queries. This means that mix relational (date for instance) with FTS search will be efficient. Following your example, before look the FTS side, the
optimizer will get the few ones that pass the date filter and then these ones will be FT searched.
This improvement also will improve multiple CONTAINS queries, so you will not longer experiment pain.
-For now, the best you can do is to use computed columns. These columns will contain virtually the same data than the original columns and you can create a FT index on that column. The indexing time will take longer as you are merging 2 or more columns bu
t at query time you will be able to query efficiently and find what you look for.
Does this help?
Regards,
Fernando Azpeitia Lopez,
Program Manager
SQL Server FTS team
--Original Message--
From: Thomas
Posted At: Wednesday, February 15, 2006 9:34 PM
Posted To: microsoft.public.sqlserver.fulltext
Conversation: Does SQL2005 still require all FTI keywords to match in the same column?
Subject: Re: Does SQL2005 still require all FTI keywords to match in the same column?
Hi Fernando,
I'm not sure exactly how to respond... SQL Server excels at storing all
kinds of data. Our records are hybrids of large text fields, numbers,
dates, etc. We have multiple text columns. Just as one example, let's
say we have an email database where we have the headers stored in
different fields, at the very least, subject and body in different
fields. A person enters multiple keywords, and even if some are in the
subject and some are in the body, the record should match. That's just
a basic example.
We were really blown away when we found out this does not behave in
this fashion. It makes no sense, from our perspective as a user, to
query * (all columns) for some keywords, and require they all match in
only a single column.
Another problem we are fighting that lends itself to being allowed to
find the keywords across columns: tagging. We have found that we can
really speed up our searches if the entire search is performed on the
FTS side of the equation.
Contrived Example: You want to find all records that contain the word
"house" and were created in September 2005. Your table holds 100,000
records. Let's say 50,000 of those records contain the word "house."
But only 1000 were created in September 2005. You could do a search
like this:
SELECT * FROM ourtable WHERE CONTAINS(*, '"house"') AND createdate
BETWEEN '09/01/2005 00:00:00' AND '09/30/2005 23:59:59'
But we have found this search is really slow. The slowdown is in the
number of records being returned that contain "house" even though most
of them are not going to pass our SQL Server filter of the date. So we
want to create a tag column of textual things that we can search on the
FTS. Then our query would be:
SELECT * FROM ourtable WHERE CONTAINS(*, '"house" and "DT200509"')
Now we've shifted the date requirement over to the FTS side of the
search. Admittedly, a hack, but it should work. As you know, it
doesn't, because the two keywords will be found in two different
columns.
So what we are forced to do now is the ultimate hack: create a single,
new text field where we are duplicating all of our data from multiple
columns, adding our "tags" for constraining the searches, and then
full-text indexing this single column in order to get fast searches.
It seems weird that FTS is designed to search documents when SQL Server
is designed to hold all kinds of data. Shouldn't FTS be designed to
efficiently search what SQL Server can hold?
Thanks for your time.
Regards,
Thomas
|||Fernando Azpeitia Lopez wrote:

> The good news is the following.
> -For next FTS release we have several architecture improvements that will improve
>dramatically the joined queries. This means that mix relational (date for instance) with
>FTS search will be efficient. Following your example, before look the FTS side, the
>optimizer will get the few ones that pass the date filter and then these ones will be FT
>searched. This improvement also will improve multiple CONTAINS queries, so you will
>not longer experiment pain.
When you say the "next FTS release," does this mean an upgrade to SQL
2005's FTS, or do you mean the FTS that is released in whatever version
comes after SQL Server 2005 (i.e. SQL Server 2010 ;-)

> -For now, the best you can do is to use computed columns. These columns will
>contain virtually the same data than the original columns and you can create a FT index
> on that column. The indexing time will take longer as you are merging 2 or more
>columns but at query time you will be able to query efficiently and find what you look
>for.
Can you give me an example of how to do a FTI on a computed column? We
are currently using SQL Server 2000, and only preparing our move to
2005, so are not yet familiar with 2005 completely.
Thanks,
Thomas
|||Hi Thomas,
When I say next FTS release I mean the next release, not any upgrade. And don’t worry, the next version should be no longer than 2007
In a following post I will let you know the steps to work with computed columns in SQL 2005.
Regards,
Fernando Azpeitia Lopez,
Program Manager
SQL Server FTS team
--Original Message--
From: Thomas [mailto:tomwinzig@.gmail.com]
Posted At: Friday, February 17, 2006 10:50 AM
Posted To: microsoft.public.sqlserver.fulltext
Conversation: Does SQL2005 still require all FTI keywords to match in the same column?
Subject: Re: Does SQL2005 still require all FTI keywords to match in the same column?
Fernando Azpeitia Lopez wrote:

> The good news is the following.
> -For next FTS release we have several architecture improvements that will improve
>dramatically the joined queries. This means that mix relational (date for instance) with
>FTS search will be efficient. Following your example, before look the FTS side, the
>optimizer will get the few ones that pass the date filter and then these ones will be FT
>searched. This improvement also will improve multiple CONTAINS queries, so you will
>not longer experiment pain.
When you say the "next FTS release," does this mean an upgrade to SQL
2005's FTS, or do you mean the FTS that is released in whatever version
comes after SQL Server 2005 (i.e. SQL Server 2010 ;-)

> -For now, the best you can do is to use computed columns. These columns will
>contain virtually the same data than the original columns and you can create a FT index
> on that column. The indexing time will take longer as you are merging 2 or more
>columns but at query time you will be able to query efficiently and find what you look
>for.
Can you give me an example of how to do a FTI on a computed column? We
are currently using SQL Server 2000, and only preparing our move to
2005, so are not yet familiar with 2005 completely.
Thanks,
Thomas

Does SQL2000/MSDE run on XP Tablet?

Hello there,

i have a great doubt: does MSDE run on XP Tablet Edition? I bought a beautiful notebook but didn't notice that it runs XP tablet...

Thanks in advance

Yes it does

Does SQL uses index in the following select statement

I have the following table structure:
PK_Column1
PK_Column2
IndexedColumn
Column_ABC
Column_XYZ
Does SQL Server 2005 uses the IndexedColumn index to find the MIN and MAX
values in the following select statement:
SELECT MIN(IndexedColumn), MAX(IndexedColumn) FROM MyTable WHERE
PK_Column1=@.MyParam
When I run this statement it works too slow and I see alot of reads in SQL
Server Profiler.
Is there any way to improve the performance in this case?
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200512/1Hi
If Indexed column is clustered, it probably would as it can do a clustered
index range scan.
Else, it may not. It all depends on how up to date the statistics are, the
data types of the columns, how selective the indexes are and the number of
rows.
Show the query plan and we can tell.
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/
"Alex via webservertalk.com" <no@.spam.pls> wrote in message
news:58e799d08a0ce@.uwe...
>I have the following table structure:
> PK_Column1
> PK_Column2
> IndexedColumn
> Column_ABC
> Column_XYZ
> Does SQL Server 2005 uses the IndexedColumn index to find the MIN and MAX
> values in the following select statement:
> SELECT MIN(IndexedColumn), MAX(IndexedColumn) FROM MyTable WHERE
> PK_Column1=@.MyParam
> When I run this statement it works too slow and I see alot of reads in SQL
> Server Profiler.
> Is there any way to improve the performance in this case?
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200512/1|||Thank you for your answer.
Here are more details:
PK_Column1 smallint
PK_Column2 int
IndexedColumn DateTime (NON-CLUSTERED and not unique)
Column_ABC varchar
Column_XYZ varbinary(BLOB)
The table has about 4M rows.

>Show the query plan and we can tell.
How can I get it? I am using the Standard edition of SQL Server 2005.
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200512/1|||If there is a clustered index on PK_Column1, then it might do an index
scan on the index of IndexedColumn. However, the query would benefit
more from an index on (PK_Column1, IndexedColumn).
I am not running SQL2K5, but I guess that SET SHOWPLAN_TEXT ON will
probably still work...
HTH,
Gert-Jaqn
"Alex via webservertalk.com" wrote:
> I have the following table structure:
> PK_Column1
> PK_Column2
> IndexedColumn
> Column_ABC
> Column_XYZ
> Does SQL Server 2005 uses the IndexedColumn index to find the MIN and MAX
> values in the following select statement:
> SELECT MIN(IndexedColumn), MAX(IndexedColumn) FROM MyTable WHERE
> PK_Column1=@.MyParam
> When I run this statement it works too slow and I see alot of reads in SQL
> Server Profiler.
> Is there any way to improve the performance in this case?
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200512/1

does SQL use AWE memory whenever possible?

I've got a 32-bit server with 16GB memory. In SQL Server, AWE is enabled. Does SQL use AWE memory for everything possible? I've also got SSAS installed on that same box, and SSAS can't use AWE memory. So I want SQL to use AWE memory as much as possible to leave as much free for SSAS as possible.

As I understand it, when you set the max server memory setting for SQL Server, it prevents the sum of normal and AWE memory from going over that limit you've set. Is there any way to tell SQL server to use as much AWE memory as it wants, but be use as little normal memory as it can?

SQL Server uses AWEonly for data cache pages in the buffer pool. As far as I know this can't be changed (in any supported fashion).

Also, I could be wrong here, but I believe the 3 GB limit is per process, meaning you could have two individual processes that don't support AWE each using 3 GB on a 16 GB system - they wouldn't be limited to a grand total of 3 GB between them. Where AWE comes in is allowing a single process to use more than 3 GB by itself. I'm sure the OS guys can correct me if my assumptions about AWE are incorrect.
|||

We're on the right track to answering my question. Do all pages that it caches use AWE memory exclusively? (Does it use AWE whenever possible?) Will it ever cache pages using normal memory if AWE is on and there is still AWE memory available?

I've put a 1GB limit on SQL so as to leave plenty of room for SSAS. I'm wondering if removing that limit on SQL will cause it to use more normal memory, or just more AWE memory.

I'm pretty sure it's 3GB total across all processes, not per process.

|||Well, there's the buffer cache and the procedure cache. The buffer cache, which holds actual data, will use AWE if it's enabled. The procedure cache doesn't use that, but I don't believe it'll end up nearly as large as the buffer cache under normal circumstances.

As for whether or not non-AWE applications are limited to 3 GB each, or 3 GB total, I think we'll need a more authoritative answer from someone on that, since it has a significant effect on how to handle the situation. This KB article makes me think it's 3 GB each, but I'm not 100% certain: http://support.microsoft.com/default.aspx/kb/283037

To get an idea of how memory is being allocated, compare the Performance Monitor counter SQLServer:Memory Manager\Total Server Memory (KB) to the amount of memory that Task Manager reports (which doesn't include AWE allocations).
|||

If you set max server memory, it limits how much memory, total that the database engine can use, whether it is AWE or not. I have not heard of any way to try to force SQL Server to use AWE memory first.

If you are concerned about memory, and have 16GB of RAM, you should seriously consider running 64-bit, with the "Lock Pages in Memory" right granted to the SQL Server service account. That is assuming your processors are 64-bit capable (which they should be if they are less than about two years old). I have some good DMV queries here:

http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!526.entry

sql

Does SQL substitute float = 0 with DBNull.Value?

Hi
I have only been coding in .Net for about six months, and am not sure if this is a C# problem or an SQL one. I use the Data Access Application Block in my program.

I have two optional fields on my form (RangeFrom and RangeTo). If the user chooses not to enter data into these textboxes(textbox = ""), an entry on the db is created with null values. It works.

But sometimes the user wants to enter 0 as either an upper or lower end of a range. This is where my problem comes in. My program saves 0 as null too.

In my program I do a test on the textboxes and populate two float values in a business object (objQuestion) accordingly, like this:


if (txtrangefrom.Text != "") {
objQuestion.RangeFrom=float.Parse(txtrangefrom.Text);
objQuestion.RangeTo=float.Parse(txtrangeto.Text);
}
else {
objQuestion.RangeFrom=Convert.ToSingle(null);
objQuestion.RangeTo=Convert.ToSingle(null);
}

And this is what my Business object look like. It sets up the parameters and calls the Data Access Application Block to create an entry in my table:


// fieldslist
float cvintRangeFrom;
float cvintRangeTo;

//properties
public float RangeFrom {
get {
return cvintRangeFrom;
}
set {
cvintRangeFrom = value;
}
}

public float RangeTo {
get {
return cvintRangeTo;
}
set {
cvintRangeTo = value;
}
}

// some code deleted for readability...

public int AddOption() {
string cvstrSpName = "addOption";
SqlParameter [] cvstrStoredParams = SqlHelperParameterCache.GetSpParameterSet(gcstrConnectionString, cvstrSpName, true);
//lines deleted for readability...
//check if the optional fields have a value associated with them. if not, assign dbnull.value.
cvstrStoredParams[4].Value=(cvintRangeFrom != Convert.ToSingle(null) ? cvintRangeFrom : (object)DBNull.Value);
cvstrStoredParams[5].Value=(cvintRangeTo != Convert.ToSingle(null) ? cvintRangeTo : (object)DBNull.Value);
//lines deleted for readability...
SqlHelper.ExecuteNonQuery(gcstrConnectionString, CommandType.StoredProcedure, cvstrSpName, cvstrStoredParams);
return(cvintOptionID = Convert.ToInt32(cvstrStoredParams[0].Value));
}

I use Convert.ToSingle when working with nulls (or possible nulls) because I get an error when I use float.parse for this.

The thing is, after this method AddOption has been executed, I test the value if the business object's rangefrom (that is where I entered 0) and display it on my form. I still shows a 0, but on my database table it is null!


objQuestion.AddOption();
//txtrangefrom.Text=""; on the next line I test the value in the business object...
txtrangefrom.Text=objQuestion.RangeFrom.ToString(); // and this displays 0!!!
//txtrangeto.Text="";
txtrangeto.Text=objQuestion.RangeTo.ToString();

So to me it seems the problem seems to be either the DAAB or on the SQL side, but hopefully somebody can prove me wrong! I was thinking that it could also be float.parse/Convert.ToSingle methods and have done various tests, but I am none the wiser...
Any help or ideas will be greatly appreciated...I had this same problem with a VB project.

Just change the value of the floats to something that is not within the valid range (-1 or something) instead of null. It's not pretty or elegant, but it's better than fiddling with nulls ;)

SQLServer (I think) does implicitly convert 0 to null in some occasions, but I don't know the full details.

HTH|||You're right, it's not pretty, but I'll give it a go.
Thanks.

Does Sql server2005 standard edition support Sql server integration services and SSRS

Does Sql server 2005 standard edition support Sql server integration services and SSRS. i saw two conflicting information.

And what is the difference between Integration services with basic transforms and integration services advanced transforms.

Please recommend.

Yes.

The following advanced transformations are available only in Enterprise edition related on SSIS:

Analysis Services Partition Processing Destination - with it you can perform incremental, full, or update processing of a AS partition.

Analysis Services Dimension Processing Destination for loading and processing a dimension.

Data Mining Training and Data Mining Query Component

Fuzzy Grouping, Fuzzy Lookup

Term Extraction and Term Lookup -used for "Text Mining"(Text Data Mining that work good for english texts)

So if you want to use SSIS package to process a cube, data mining structure and crossroad of bad data(Fuzzy Grouping, Fuzzy Lookup) you need Enterprise Edition.

|||

Can we use

SSIS
SSRS
ONLINE PROCESSING USING .NET
BATCH PROCESSING USING .NET

all in the same server. is there any performance issue related to standard 2005 vs enterprise 2005

Thanking you.

|||

In terms of comparing standard and enterprise on same machine , sure no, but you have limits on Standard:

-hardware level : max 4 CPU on server

-software level :NO partitioning, indexed views, and more

An article of this comparison

|||Thankyou

does SQL Server take advantage of bind variables

Using prepared statements like Oracle does? This way in a high transaction
system you do not have to recompile queries every time?
Ryan wrote:

> Using prepared statements like Oracle does? This way in a high transaction
> system you do not have to recompile queries every time?

Yes it does have this capability.
Joe Weinstein at BEA|||"Ryan" <rgaffuri@.cox.net> wrote in message news:<ZVlPb.5755$_H5.281@.lakeread06>...
> Using prepared statements like Oracle does? This way in a high transaction
> system you do not have to recompile queries every time?

In general, query plans are cached (unless they're very simple), but
may be aged out of the cache if they're not used. Stored procedures
are generally the most efficient way to code, although they may be
recompiled in some situations. Profiler can show cache hits, misses
and recompilations for stored procs.

Simon|||Hi Ryan

Yes every database i know of including sql server will make use of
bind varaiables..bind varaiables are not the exclusive doamin of
oracle.

regards
Hrishy

"Ryan" <rgaffuri@.cox.net> wrote in message news:<ZVlPb.5755$_H5.281@.lakeread06>...
> Using prepared statements like Oracle does? This way in a high transaction
> system you do not have to recompile queries every time?

Does SQL server supports Cable Redundancy ?

Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
redundancy.
Thanks
AnilG
Hi
As long as both are connected to different segments, yes. That is a windows
limitation.
SQL server will listen on all NICs by default so it does not care. The Os
provides the functionality. The bigger challenge is to get your DNS to
change quick enough otherwise some users will hit the dead IP.
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/
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
> redundancy.
> --
> Thanks
> AnilG
|||Can I know what is meant by different segements. I am basically a VC++
programmer.
Thanks
AnilG
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> As long as both are connected to different segments, yes. That is a windows
> limitation.
> SQL server will listen on all NICs by default so it does not care. The Os
> provides the functionality. The bigger challenge is to get your DNS to
> change quick enough otherwise some users will hit the dead IP.
> 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/
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
>
>
|||Hi,
Segments are networks or part of. You might have one segment with a
192.168.1 ip address and the other with 192.168.2 ip address. If you have
two network card in a machine they can be connected to two network segments.
The issue you raised is a Windows issue and depends on how you setup the
cards
kind regards
Greg O
Need to document your databases. Use the first and still the best AGS SQL
Scribe
http://www.ag-software.com
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...[vbcol=seagreen]
> Can I know what is meant by different segements. I am basically a VC++
> programmer.
> --
> Thanks
> AnilG
>
> "Mike Epprecht (SQL MVP)" wrote:
|||Cable redundancy is working for Win 2003 server when applied a hotfix as
given in KB : http://support.microsoft.com/default...;en-us;817690.
But we facing the same problem in Win XP SP2. Any clues.
Thanks
AnilG
"GregO" wrote:

> Hi,
> Segments are networks or part of. You might have one segment with a
> 192.168.1 ip address and the other with 192.168.2 ip address. If you have
> two network card in a machine they can be connected to two network segments.
> The issue you raised is a Windows issue and depends on how you setup the
> cards
>
> --
> kind regards
> Greg O
> Need to document your databases. Use the first and still the best AGS SQL
> Scribe
> http://www.ag-software.com
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...
>
>

Does SQL server supports Cable Redundancy ?

Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
redundancy.
Thanks
AnilGHi
As long as both are connected to different segments, yes. That is a windows
limitation.
SQL server will listen on all NICs by default so it does not care. The Os
provides the functionality. The bigger challenge is to get your DNS to
change quick enough otherwise some users will hit the dead IP.
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/
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
> redundancy.
> --
> Thanks
> AnilG|||Can I know what is meant by different segements. I am basically a VC++
programmer.
Thanks
AnilG
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> As long as both are connected to different segments, yes. That is a window
s
> limitation.
> SQL server will listen on all NICs by default so it does not care. The Os
> provides the functionality. The bigger challenge is to get your DNS to
> change quick enough otherwise some users will hit the dead IP.
> 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/
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
>
>|||Hi,
Segments are networks or part of. You might have one segment with a
192.168.1 ip address and the other with 192.168.2 ip address. If you have
two network card in a machine they can be connected to two network segments.
The issue you raised is a Windows issue and depends on how you setup the
cards
kind regards
Greg O
Need to document your databases. Use the first and still the best AGS SQL
Scribe
http://www.ag-software.com
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...[vbcol=seagreen]
> Can I know what is meant by different segements. I am basically a VC++
> programmer.
> --
> Thanks
> AnilG
>
> "Mike Epprecht (SQL MVP)" wrote:
>|||Cable redundancy is working for Win 2003 server when applied a hotfix as
given in KB : [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;817690.[/url
]
But we facing the same problem in Win XP SP2. Any clues.
--
Thanks
AnilG
"GregO" wrote:

> Hi,
> Segments are networks or part of. You might have one segment with a
> 192.168.1 ip address and the other with 192.168.2 ip address. If you have
> two network card in a machine they can be connected to two network segment
s.
> The issue you raised is a Windows issue and depends on how you setup the
> cards
>
> --
> kind regards
> Greg O
> Need to document your databases. Use the first and still the best AGS SQL
> Scribe
> http://www.ag-software.com
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...
>
>|||I am also having this same problem. How do you get the DNS to change quick
enough, so that the SQL db Admin's don't call me everytime they can not
connect? I have unchecked the "register this connections address in DNS" an
d
it still registers the address in DNS. The server that I am having problems
with is also a DNS server. Any suggestions?
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> As long as both are connected to different segments, yes. That is a window
s
> limitation.
> SQL server will listen on all NICs by default so it does not care. The Os
> provides the functionality. The bigger challenge is to get your DNS to
> change quick enough otherwise some users will hit the dead IP.
> 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/
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
>
>sql

Does SQL server supports Cable Redundancy ?

Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
redundancy.
--
Thanks
AnilGHi
As long as both are connected to different segments, yes. That is a windows
limitation.
SQL server will listen on all NICs by default so it does not care. The Os
provides the functionality. The bigger challenge is to get your DNS to
change quick enough otherwise some users will hit the dead IP.
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/
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
> redundancy.
> --
> Thanks
> AnilG|||Can I know what is meant by different segements. I am basically a VC++
programmer.
--
Thanks
AnilG
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> As long as both are connected to different segments, yes. That is a windows
> limitation.
> SQL server will listen on all NICs by default so it does not care. The Os
> provides the functionality. The bigger challenge is to get your DNS to
> change quick enough otherwise some users will hit the dead IP.
> 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/
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> > Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
> > redundancy.
> >
> > --
> > Thanks
> > AnilG
>
>|||Hi,
Segments are networks or part of. You might have one segment with a
192.168.1 ip address and the other with 192.168.2 ip address. If you have
two network card in a machine they can be connected to two network segments.
The issue you raised is a Windows issue and depends on how you setup the
cards
kind regards
Greg O
Need to document your databases. Use the first and still the best AGS SQL
Scribe
http://www.ag-software.com
"Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...
> Can I know what is meant by different segements. I am basically a VC++
> programmer.
> --
> Thanks
> AnilG
>
> "Mike Epprecht (SQL MVP)" wrote:
>> Hi
>> As long as both are connected to different segments, yes. That is a
>> windows
>> limitation.
>> SQL server will listen on all NICs by default so it does not care. The Os
>> provides the functionality. The bigger challenge is to get your DNS to
>> change quick enough otherwise some users will hit the dead IP.
>> 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/
>> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
>> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
>> > Does SQL server supports Cable Redundancy. A system having 2 NIC's for
>> > LAN
>> > redundancy.
>> >
>> > --
>> > Thanks
>> > AnilG
>>|||Cable redundancy is working for Win 2003 server when applied a hotfix as
given in KB : http://support.microsoft.com/default.aspx?scid=kb;en-us;817690.
But we facing the same problem in Win XP SP2. Any clues.
--
Thanks
AnilG
"GregO" wrote:
> Hi,
> Segments are networks or part of. You might have one segment with a
> 192.168.1 ip address and the other with 192.168.2 ip address. If you have
> two network card in a machine they can be connected to two network segments.
> The issue you raised is a Windows issue and depends on how you setup the
> cards
>
> --
> kind regards
> Greg O
> Need to document your databases. Use the first and still the best AGS SQL
> Scribe
> http://www.ag-software.com
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:AE540719-6953-44B3-9DD5-75099EC2D9FB@.microsoft.com...
> > Can I know what is meant by different segements. I am basically a VC++
> > programmer.
> >
> > --
> > Thanks
> > AnilG
> >
> >
> > "Mike Epprecht (SQL MVP)" wrote:
> >
> >> Hi
> >>
> >> As long as both are connected to different segments, yes. That is a
> >> windows
> >> limitation.
> >> SQL server will listen on all NICs by default so it does not care. The Os
> >> provides the functionality. The bigger challenge is to get your DNS to
> >> change quick enough otherwise some users will hit the dead IP.
> >>
> >> 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/
> >>
> >> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> >> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> >> > Does SQL server supports Cable Redundancy. A system having 2 NIC's for
> >> > LAN
> >> > redundancy.
> >> >
> >> > --
> >> > Thanks
> >> > AnilG
> >>
> >>
> >>
>
>|||I am also having this same problem. How do you get the DNS to change quick
enough, so that the SQL db Admin's don't call me everytime they can not
connect? I have unchecked the "register this connections address in DNS" and
it still registers the address in DNS. The server that I am having problems
with is also a DNS server. Any suggestions?
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> As long as both are connected to different segments, yes. That is a windows
> limitation.
> SQL server will listen on all NICs by default so it does not care. The Os
> provides the functionality. The bigger challenge is to get your DNS to
> change quick enough otherwise some users will hit the dead IP.
> 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/
> "Anil Gopu" <AnilGopu@.discussions.microsoft.com> wrote in message
> news:1682BC47-4E22-4F24-BEAA-2D8C6A771074@.microsoft.com...
> > Does SQL server supports Cable Redundancy. A system having 2 NIC's for LAN
> > redundancy.
> >
> > --
> > Thanks
> > AnilG
>
>

Does SQL Server support XML Functions

Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
sNot sure about Oracle counterparts, but have you checked out the FOR XML
clause in SQL Server 2000 Books Online?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s|||See BOL for OPENXML and FOR XML
--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s|||In addition, SQL 2005 will make XML a first-class citizen in the server, XML
data types, XQUERY, the full ride!
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s|||Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>|||FOR XML is SQL Server's T-SQL specific.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408022328.464b6cae@.posting.google.com...
Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>|||These functions are part of the ANSI/ISO SQL-2003 standard and are not
supported in SQLServer 2005 for a variety of reasons (ISO spec was released
too late for us to add them, they are less performing and more verbose than
a rowset mapping approach such as FOR XML).
We may consider them in the next release, if enough users request them. So
please let me know if I should count you :-).
Best regards
Michael
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s

Does SQL Server support XML Functions

Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s
Not sure about Oracle counterparts, but have you checked out the FOR XML
clause in SQL Server 2000 Books Online?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s
|||See BOL for OPENXML and FOR XML
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s
|||In addition, SQL 2005 will make XML a first-class citizen in the server, XML
data types, XQUERY, the full ride!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s
|||Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
|||FOR XML is SQL Server's T-SQL specific.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408022328.464b6cae@.posting.google.c om...
Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
|||These functions are part of the ANSI/ISO SQL-2003 standard and are not
supported in SQLServer 2005 for a variety of reasons (ISO spec was released
too late for us to add them, they are less performing and more verbose than
a rowset mapping approach such as FOR XML).
We may consider them in the next release, if enough users request them. So
please let me know if I should count you :-).
Best regards
Michael
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s

Does SQL Server support XML Functions

Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s
Not sure about Oracle counterparts, but have you checked out the FOR XML
clause in SQL Server 2000 Books Online?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s
|||See BOL for OPENXML and FOR XML
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s
|||In addition, SQL 2005 will make XML a first-class citizen in the server, XML
data types, XQUERY, the full ride!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s
|||Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
|||FOR XML is SQL Server's T-SQL specific.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408022328.464b6cae@.posting.google.c om...
Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
|||These functions are part of the ANSI/ISO SQL-2003 standard and are not
supported in SQLServer 2005 for a variety of reasons (ISO spec was released
too late for us to add them, they are less performing and more verbose than
a rowset mapping approach such as FOR XML).
We may consider them in the next release, if enough users request them. So
please let me know if I should count you :-).
Best regards
Michael
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.c om...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s

Does SQL Server support XML Functions

Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
sNot sure about Oracle counterparts, but have you checked out the FOR XML
clause in SQL Server 2000 Books Online?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
s|||See BOL for OPENXML and FOR XML
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s|||In addition, SQL 2005 will make XML a first-class citizen in the server, XML
data types, XQUERY, the full ride!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> s|||Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message news:<uldgTsGeEHA.1764@.TK
2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>|||FOR XML is SQL Server's T-SQL specific.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408022328.464b6cae@.posting.google.com...
Hi,
Yep the SQL Server supports the FOR XML clause which returns the
Records/Rows as XML. However Oracle does not support FOR XML clause.
(oracle 9i). To get the output in XML format the functions that i have
mentioned have to be used.
Now before I end up using the above mentioned functions, i wanted
to know whether these functions are supported by other Databases also
or not.
Bye
Amardeep Verma
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:<uldgTsGeEHA.1764@.TK2MSFTNGP10.phx.gbl>...
> Not sure about Oracle counterparts, but have you checked out the FOR XML
> clause in SQL Server 2000 Books Online?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>|||These functions are part of the ANSI/ISO SQL-2003 standard and are not
supported in SQLServer 2005 for a variety of reasons (ISO spec was released
too late for us to add them, they are less performing and more verbose than
a rowset mapping approach such as FOR XML).
We may consider them in the next release, if enough users request them. So
please let me know if I should count you :-).
Best regards
Michael
"Amardeep Verma" <addverma@.netscape.net> wrote in message
news:45d3f402.0408012353.49b1ab71@.posting.google.com...
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply
> ssql

Does SQL Server support XML Functions

Hi,
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-

1) XMLElement
2) XMLAttributes
3) XMLForest

Thanks in Advance for your reply
Bye
Amardeep VermaAmardeep Verma (addverma@.netscape.net) writes:
> Do any versions of SQL Server support the following functions, as
> they appear in the Oracle Database:-
> 1) XMLElement
> 2) XMLAttributes
> 3) XMLForest
> Thanks in Advance for your reply

Since I don't know Oracle, I don't know what these functions do. It is
not likely that SQL Server supports these functions directly, but it
may support the same functionality. You would need to explain what these
functions do to get answer.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi,
Thanks Erland for your Response. These Functions take simple
SELECT statement and return the result in a XML format. With each
Column name as a tag and the value in that column as the data.
For Example the Employee Table of NorthWind Database has 3
columns:-
1) EmpNo
2) EmpLastName
3) EmpFirstName
Then using the below mentioned functions we can get the output
<EMP>
<EMPNo>1</EMPNo>
<EMPFirstName>ABC</EMPFirstName>
<EMPLastName>XYZ</EMPLastName>
</EMP
Hope this helps
Amardeep Verma

Erland Sommarskog <esquel@.sommarskog.se> wrote in message news:<Xns9536EC50E4C4FYazorman@.127.0.0.1>...
> Since I don't know Oracle, I don't know what these functions do. It is
> not likely that SQL Server supports these functions directly, but it
> may support the same functionality. You would need to explain what these
> functions do to get answer.|||Amardeep Verma (addverma@.netscape.net) writes:
> Thanks Erland for your Response. These Functions take simple
> SELECT statement and return the result in a XML format. With each
> Column name as a tag and the value in that column as the data.
> For Example the Employee Table of NorthWind Database has 3
> columns:-
> 1) EmpNo
> 2) EmpLastName
> 3) EmpFirstName
> Then using the below mentioned functions we can get the output
><EMP>
> <EMPNo>1</EMPNo>
> <EMPFirstName>ABC</EMPFirstName>
> <EMPLastName>XYZ</EMPLastName>
></EMP
It looks like you should study the FOR XML clause in the SELECT statement.
It gives you several possibilities. Rather than typing examples here,
I refer you to Books Online myself, since I am no XML wizard myself.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||SQL sever has a few ways to generate xml. An example below that
conforms to your spec(ie columns as elements) can be viewed in QA

select * from employees
where employeeid=1 for xml auto, elements

NOTE: it is best run when the query is set to 'Results in text' and
also
'DBCC TRACEON(257)' has been run first

Does SQL Server Support the "MINUS" Keyword?

Maybe there's another better way to do this... Anyway, here's what I'm trying to do:

I have two tables CarType & Cars. Table CarType has a column CarTypeId which is the primary key (int, identity). Table Cars includes a column CarTypeId (int) which is a foreign key into the CarType table.

Now I am trying to build a list of all those CarTypeId entries (from the CarType table) for which there are no Cars (i.e. there is no corresponding entry in the Cars table).

I read that there is an SQL "MINUS" keyword that you can use like this:

SELECT CarTypeId FROM CarType
MINUS
SELECT CarTypeId FROM Cars

So if CarType contains records with the keys {1, 2, 3, 4, 5} and Cars contains records with the foreign keys {2, 4} (using set notation), your result should be the set {1, 3, 5}. (Note: I have tried alternate versions of this where I selected the DISTINCT CarTypeId entries from Cars, and where I sorted them; results same in both cases).

I tried it in SQL Server 2005 Express. The result is just {1, 2, 3, 4, 5}.

My questions:

    Is the MINUS capability supported by SQL Server? I know that there are all sorts of different SQL dialects & implementations and that SQL has evolved & transmutated over the years; perhaps they opted to leave this out of SQL Server... If not supported, well then I guess I have to throw myself at the feet of the real SQL gurus and ask if there's another way to accomplish this.

Here's a reference to the website where I initially found out about MINUS:
http://www.1keydata.com/sql/sql-minus.html

Thanks in advance for your time/comments.

I think you want EXCEPT

ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm

|||You can also use a NOT EXISTS to find records that don't exist in the other table|||

Thanks Simon for your comments and pointing me in the right direction.

This is what worked for me:

SELECT CarTypeId FROM CarType
WHERE (CarTypeId NOT IN
(SELECT DISTINCT CarTypeId FROM Cars)
)

Still interested to know what became of the MINUS keyword though, because I think that syntax is slicker...

Ian

|||

SQL Server has never supported MINUS.

in SQL 2005 it now has the EXCEPT clause which does the same thing

|||

Caution: Microsoft talks about this issue at https://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part2/c0761.mspx?mfr=true. However, it is incomplete in that it does not address a curveball.

That is, the = operator does not address nulls.

The Microsoft example is as follow:

Oracle Microsoft SQL Server

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASS
MINUS
SELECT C.CCODE, C.CNAME
FROM STUDENT_ADMIN.GRADE G,
DEPT_ADMIN.CLASS C
WHERE C.CCODE = G.CCODE

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASSC
WHERE NOT EXISTS
(SELECT 'X' FROM
STUDENT_ADMIN.GRADE G
WHERE C.CCODE = G.CCODE)

This will work to identify students in one table but not in another. However, it will not work like Oracle's MINUS command to spot differences between tables. So, say you want to see this -- between the 2 tables, find where students are missing AND students whose names have changed -- either from A to B or from not null to null or from null to not null.

Try this:

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASS C
WHERE NOT EXISTS
(SELECT 'X' FROM
STUDENT_ADMIN.GRADE G
WHERE C.CCODE = G.CCODE

and (C.CNAME = G.CNAME or (C.CNAME is null and G.NAME is null) )

That will mimic the full functionality of Oracle's MINUS command in SQL Server 2000 T-SQL.

|||

Hi Ian,

I havent come across the Minus in SQL server but to do what you want I would try the following

SELECT T.cartypeid

FROM cartype as T

LEFT OUTER JOIN cars C

ON T.cartypeID = C.cartypeID

WHERE c.caretypeID is null

This joins everything in the cartype table but the where clause restricts the result set to those records with a null car.cartypeID

i.e. no matching record

Does SQL Server Support the "MINUS" Keyword?

Maybe there's another better way to do this... Anyway, here's what I'm trying to do:

I have two tables CarType & Cars. Table CarType has a column CarTypeId which is the primary key (int, identity). Table Cars includes a column CarTypeId (int) which is a foreign key into the CarType table.

Now I am trying to build a list of all those CarTypeId entries (from the CarType table) for which there are no Cars (i.e. there is no corresponding entry in the Cars table).

I read that there is an SQL "MINUS" keyword that you can use like this:

SELECT CarTypeId FROM CarType
MINUS
SELECT CarTypeId FROM Cars

So if CarType contains records with the keys {1, 2, 3, 4, 5} and Cars contains records with the foreign keys {2, 4} (using set notation), your result should be the set {1, 3, 5}. (Note: I have tried alternate versions of this where I selected the DISTINCT CarTypeId entries from Cars, and where I sorted them; results same in both cases).

I tried it in SQL Server 2005 Express. The result is just {1, 2, 3, 4, 5}.

My questions:

    Is the MINUS capability supported by SQL Server? I know that there are all sorts of different SQL dialects & implementations and that SQL has evolved & transmutated over the years; perhaps they opted to leave this out of SQL Server... If not supported, well then I guess I have to throw myself at the feet of the real SQL gurus and ask if there's another way to accomplish this.

Here's a reference to the website where I initially found out about MINUS:
http://www.1keydata.com/sql/sql-minus.html

Thanks in advance for your time/comments.

I think you want EXCEPT

ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/tsqlref9/html/b1019300-171a-4a1a-854f-e1e751de3565.htm

|||You can also use a NOT EXISTS to find records that don't exist in the other table|||

Thanks Simon for your comments and pointing me in the right direction.

This is what worked for me:

SELECT CarTypeId FROM CarType
WHERE (CarTypeId NOT IN
(SELECT DISTINCT CarTypeId FROM Cars)
)

Still interested to know what became of the MINUS keyword though, because I think that syntax is slicker...

Ian

|||

SQL Server has never supported MINUS.

in SQL 2005 it now has the EXCEPT clause which does the same thing

|||

Caution: Microsoft talks about this issue at https://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part2/c0761.mspx?mfr=true. However, it is incomplete in that it does not address a curveball.

That is, the = operator does not address nulls.

The Microsoft example is as follow:

Oracle Microsoft SQL Server

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASS
MINUS
SELECT C.CCODE, C.CNAME
FROM STUDENT_ADMIN.GRADE G,
DEPT_ADMIN.CLASS C
WHERE C.CCODE = G.CCODE

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASSC
WHERE NOT EXISTS
(SELECT 'X' FROM
STUDENT_ADMIN.GRADE G
WHERE C.CCODE = G.CCODE)

This will work to identify students in one table but not in another. However, it will not work like Oracle's MINUS command to spot differences between tables. So, say you want to see this -- between the 2 tables, find where students are missing AND students whose names have changed -- either from A to B or from not null to null or from null to not null.

Try this:

SELECT CCODE, CNAME
FROM DEPT_ADMIN.CLASS C
WHERE NOT EXISTS
(SELECT 'X' FROM
STUDENT_ADMIN.GRADE G
WHERE C.CCODE = G.CCODE

and (C.CNAME = G.CNAME or (C.CNAME is null and G.NAME is null) )

That will mimic the full functionality of Oracle's MINUS command in SQL Server 2000 T-SQL.

|||

Hi Ian,

I havent come across the Minus in SQL server but to do what you want I would try the following

SELECT T.cartypeid

FROM cartype as T

LEFT OUTER JOIN cars C

ON T.cartypeID = C.cartypeID

WHERE c.caretypeID is null

This joins everything in the cartype table but the where clause restricts the result set to those records with a null car.cartypeID

i.e. no matching record

Does SQL server support failover without sahred disk or external storage

Hi fellow,
I'd like to know if is it possible to configure SQL Server in a cluster enviroment to provide failover, without using shared disks or external storages.
What I wish is setup and cluster to provide failover in case of a hardware malfuction only between servers A and B. The data "integrity" however will be guarantee by my application. I only wish to provide my clients an transparent and automatic way to c
onnect to server B in case of failure of server A, behaving just like the virtual server in a cluster enviroment.
Anyone knows if this is possible?
Cheers,
Eric.
SQL does not have such a feature. The SQL failover cluster model requires a
common dagta store that can be arbitrated between nodes so that a single
node failure is recoverable.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Eric" <anonymous@.discussions.microsoft.com> wrote in message
news:8F02A739-E588-4C27-9CF2-63999EFBE802@.microsoft.com...
> Hi fellow,
> I'd like to know if is it possible to configure SQL Server in a cluster
enviroment to provide failover, without using shared disks or external
storages.
> What I wish is setup and cluster to provide failover in case of a
hardware malfuction only between servers A and B. The data "integrity"
however will be guarantee by my application. I only wish to provide my
clients an transparent and automatic way to connect to server B in case of
failure of server A, behaving just like the virtual server in a cluster
enviroment.
> Anyone knows if this is possible?
> Cheers,
> Eric.
|||Yes, SQL Server does support failover in that situation. It will not
operate exactly like a virtual server in a cluster environment.
You can use either replication or log shipping to create the second copy of
the database on Server B. Each will have latency as far as what data
exists. Each one has different processes for failing over as well as
failing back. If you search back across this newsgroups and the replication
newsgroup for the last 2 months, there will be more than enough information
posted about that subject.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||Hi Michel,
The replication and log shipping solves the problem of keeping data between servers ok, but my point is related to the client.
Is there a way to make the client service start using the second server automatically in case of server A failure? For example, my apllication use ODBC to connect to DB_SERVER, wich will be directed to Server A only if it is availble. If not, then DB_SE
RVER will point automatically to Server B. The Client is unware of any change, just like a failover cluster.
Cheers,
Eric
|||Not in the current version of SQL Server. However, database mirroring in
Yukon may be of interest to you. Have a look here:
http://www.microsoft.com/technet/pro...n123121120120.
Of course, the downside is that Yukon won't be available until next year...
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
"Eric" <anonymous@.discussions.microsoft.com> wrote in message
news:32D7E78D-55B4-4B49-A1FE-2385D41E9BA0@.microsoft.com...
> Hi Michel,
> The replication and log shipping solves the problem of keeping data
between servers ok, but my point is related to the client.
> Is there a way to make the client service start using the second server
automatically in case of server A failure? For example, my apllication use
ODBC to connect to DB_SERVER, wich will be directed to Server A only if it
is availble. If not, then DB_SERVER will point automatically to Server B.
The Client is unware of any change, just like a failover cluster.
> Cheers,
> Eric
|||Nope to the original question and no even to database mirroring.
If using replication or log shipping, you will have to write code into you
application to detect it, redirect, and reconnect.
When Yukon ships and if database mirroring is in the product, when the
primary fails, you will be disconnected. You will then have to reinitiate
the connection. You just won't have to redirect to a different server name.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||From Lubor's presentation at the PASS Summit (public info here), there is
supposed to be client library awareness so that an automatic, transparent
shift happens with database mirroring.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Michael Hotek" <mhotek@.nomail.com> wrote in message
news:%23ukY8TiLEHA.3096@.TK2MSFTNGP11.phx.gbl...
> Nope to the original question and no even to database mirroring.
> If using replication or log shipping, you will have to write code into you
> application to detect it, redirect, and reconnect.
> When Yukon ships and if database mirroring is in the product, when the
> primary fails, you will be disconnected. You will then have to reinitiate
> the connection. You just won't have to redirect to a different server
name.
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>
|||Yes, there is supposed to be client library awareness. The feature is
currently called "transparent client redirect". The transparent redirect
part is that an application doesn't need to change names. It is called
"redirect". It is not called "reconnect". The information is in the PASS
session you refer to. The same basic information with a few extensions is
also contained in a database mirroring session I did in London at DevWeek as
well as in Vienna at XtremeSQL.
There is also a very big word of caution here since this has the potential
to head the wrong direction. Yukon is still in Beta 1. Beta 1 is still
NDA. The only thing allowed to be discussed is what is publicly released.
Outside of that, there are a small group of people authorized to talk about
it. At this point, it is best to not even discuss Yukon features or
functionality. If there are specific questions on Yukon, they can be asked
in "other venues".
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||I am very aware of my NDA obligations on Yukon. I only discuss items where
I can refer to a public statement by an authorized Microsoft representative,
such as the Beta 1 presentations at PASS.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Michael Hotek" <mhotek@.nomail.com> wrote in message
news:%23O$GGamLEHA.3324@.TK2MSFTNGP10.phx.gbl...
> Yes, there is supposed to be client library awareness. The feature is
> currently called "transparent client redirect". The transparent redirect
> part is that an application doesn't need to change names. It is called
> "redirect". It is not called "reconnect". The information is in the PASS
> session you refer to. The same basic information with a few extensions is
> also contained in a database mirroring session I did in London at DevWeek
as
> well as in Vienna at XtremeSQL.
> There is also a very big word of caution here since this has the potential
> to head the wrong direction. Yukon is still in Beta 1. Beta 1 is still
> NDA. The only thing allowed to be discussed is what is publicly released.
> Outside of that, there are a small group of people authorized to talk
about
> it. At this point, it is best to not even discuss Yukon features or
> functionality. If there are specific questions on Yukon, they can be
asked
> in "other venues".
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>

Does SQL Server support compressed drive?

Hi, all,

I try to start SQL Server, but I got the Error in "ERRORLOG":

Starting up database 'master'.

The file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.

Error: 5118, Severity: 16, State: 1.

That means, I have to decompress the file "mastlog.ldf", right?

How can I do this?

Thanks in advance!

it means somebody has changed the OS level setting of this folder or it parent folder... In property of the folder

in General Tab Press Advance button and see whether "Compress Contents to Save disk " option is choosed ... if it is there then remove that

Madhu

|||

Thank you! Madhu,

yes, I have done, It works

sql

Does SQL Server support all languages using Unicode

I have an international Internet business and I use SQL Server with the Unicode field types of nchar, nvarchar and ntext. I seem to have no problem with customers entering Slovakian, Slovenian, Romanian, English or German, but Hebrew and Japanese do not seem to work. The resulting data coming back from the database after adding a record is garbage.

I had the software email me the data immediately before adding the data to SQL Server. It was appearing correctly with respect to the foreign language character format. The software does the database add and then returns a list of records currently in that table. The information for Japanese or Hebrew entries is always a string of question marks, e.g. ?

I have been told that the only solution is individual databases for those languages. Is this true?SQL Server supports all languages using UNICODE. You don't need a separate database for each language.

There may be some issues with collation order if you have strings from different languages in the same column. You have to choose a particular collation for the column so indexing can work correctly. The collation you choose may give some unconventional ordering for sorted data in some languages because the conventional ordering differs from region to region. Sharp s, ?, is ordered the same as s in English, but not in German Phonebook, for example. You can specify a collation based on the UI locale for your result ordering in queries to overcome this.

The "?" problem generally happens when you convert UNICODE data to multi-byte using the incorrect locale. If your application must use multi-byte characters for some reason, make sure the locale matches the data's language. If your middle-tier and UI can use UNICODE data directly, its best to avoid the wide character to multi-byte and multi-byte to wide character conversions so this problem doesn't occur.|||You don't understand the problem

1.) The Internet is global in nature.

2.)I have 1 database

3.) data is entered from the contents of a form in a program

4.) customers can come from anwhere in the world. They speak many languages. They fill out the form in their native language (Hebrew, Japanese, etc.) The form contents write to the database.

5.) The database field types are nchar, nvarchar and ntext.

6.) the table has 10 fields. There are 15 tables. If these fields have to be replicated for each unique language, and we assume about 10,000 different languages in the world, the database will not fit on any known hard drive. It will require hundreds of programming hours to determine what language the input data is in and what set of table elements they should go to or be retrieved from (once we figure out what language the viewer uses).

7.) If all of the above is true, any new languages can not be used without prior setup.

8.) Why does MySQL handle this and not SQL Server?

We're not looking to translate anything. What we want is something eminently simple. Whatever they write, in whatever language, goes into the database. When that record is retrieved, whatever is in the record, in any language, is returned as data, unaltered.

There's no sorting and no reporting. The database holds the data and it's delivered when asked for.

Surely there is a solution here that doesn't involve something almost as complex as cloning humans.|||

You don't need to replicate your data for each language. You just need to make sure your application stack is using UNICODE strings from end-to-end, including the web forms that are displaying the data. You've already got the SQL Server end covered if you are using nothing but nchar, nvarchar, and ntext.

I saw the ? problem many, many times back when I was working on international programs that used ANSI strings. The system function that does the UNICODE-to-multi-byte translation uses question-marks for the characters it can't translate into the specified multi-byte locale. In my applications, the problem was never in the server, it was always in my application. Invariably, my application was trying to convert UNICODE data from the server into multi-byte (ANSI) characters in my application, but the locale I had specified for the translation was incorrect for the data, so there was no mapping from the UNICODE data to the ANSI locale. (For example, there is no representation for Japanese characters in the ANSI Hebrew code page.) I stopped seeing this problem once the applications I was working on used nothing but UNICODE in the database, database access layer, middle-tier, and the UI.

The next things I would check are whether you've specified UNICODE strings as the data types in your data access layer (ADO automatically converts between UNICODE and ANSI strings if you tell it you want ANSI strings for example) and whether the UI is using UNICODE or ANSI display controls. Those have been the areas where I've had the most trouble with globalized applications in the past.
I hope this helps,
Steve