Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Monday, March 12, 2012

multiple databases vs single db ASP model

I'm looking for more opinions on a single vs many database option for our ne
w
architecture.
Background:
We are an ASP. We host website portals for organizations around the world.
We don't own the data we store and security is a large concern. Currently w
e
maintain separate databases for each client. Most of the schemas are
different, however we customize some tables based on individual client needs
.
All of our websites are currently maintained as separate webisites, with
distinct html/asp code, but a shared set of isapi dlls.
We are in the beginning stages of designing a new architecture to reduce our
adminstrative nightmare of maintenance specifically with the multiple
html/asp code bases, but would like to simplify everywhere possible.
There are 3 scenarios we are considering.
1. Combine all databases in to one.
2. Combining all trivial/similar data into one db, but keeping the most
confidential data in separate databases.
3. Continuing the same as we are now with each client in separate databases
.
#1 would be ideal, but i have the following concerns:
Security.
Problems are all or nothing, if all clients users info is in one table, all
sites would be unavailable
Restoring a table information for one specific client becomes a nightmare.
Possible locking/blocking. We do large scale updates of 100,000s rows at a
time to insert/update one client's data. I would think this would cause
performance issues for all sites during that period.
#2 seems like a good approach, because it allows specific customizations and
constraints to client tables and lessens the administrative issues with
applying changes to structures and sp's across multiple databases.
I'm guessing we can overcome some of the issues with #1 but it will require
more work in the long run. I'm looking for any thoughts on the subject.
Thanks,
SteveJust a few random thoughts... remember they're worth exactly what you paid
for them
Most of the ASPs I've dealt with run one or more SQL Servers, but maintain a
separate database for each client. I've even written back-end applications
that automate the process of creating and securing databases for new
customers. I personally think that would probably be your best bet, since
your clients tend to have different schemas anyway. This gives your clients
access to the SQL Server, but only in their limited database. They don't
even have to know your other customers' databases exist.
Also, from a legal standpoint, this may be a requirement in some industries
that your clients may be in. I know that in some financial services,
insurance and other industries, laws for maintaining data integrity are
pretty strict. In some industries I've even seen where different
subsidiaries of the same corporation (really big in the insurance industry)
can't legally store data in the same databases, due to restrictions imposed
by law.
Obviously you can create a master database with information pertaining to
each client, such as billing info, space used, statistics, etc. But other
than that, intermingling customer data can cause legal and other problems.|||> Also, from a legal standpoint, this may be a requirement in some
industries
> that your clients may be in. I know that in some financial services,
> insurance and other industries, laws for maintaining data integrity are
> pretty strict. In some industries I've even seen where different
> subsidiaries of the same corporation (really big in the insurance
industry)
> can't legally store data in the same databases, due to restrictions
imposed
> by law.
In fact, it is often the case in this extreme, that the customer's data must
live on a different *server* than your other customers' data, not just in a
different database.
A|||Thanks for the information. Would you happen to have links with references
to such laws? We aren't in a finacial or health care industry, but do deal
with goverment funded institutions. And none of our RFC's have referenced
this, but I'd like to see some instances where this comes into play.
Thanks again,
Steve
"Aaron [SQL Server MVP]" wrote:

> industries
> industry)
> imposed
> In fact, it is often the case in this extreme, that the customer's data mu
st
> live on a different *server* than your other customers' data, not just in
a
> different database.
> A
>
>|||> Thanks for the information. Would you happen to have links with
references
> to such laws?
Personally, I don't know that there are laws per se, but I know that if a
client wants that (e.g. Fidelity is a prime example), they're going to
demand it, and you will lose the business if you don't provide it, because
it is part of their requirement for every vendor.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||I know it's big in the Insurance Industry, although I don't know what the
specific laws are. It might be part of Sarbanes-Oxley. I would use that as
a starting point to find out more. Specifically, as far as I know it tends
to affect the Financial Services sector (including banks, credit unions,
brokerages, etc.) and it mostly gets into anti-trust law, although I
wouldn't doubt that other industries like Health Care, etc., might have
similar laws and regulations.
"Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...[vbcol=seagreen]
> Thanks for the information. Would you happen to have links with
> references
> to such laws? We aren't in a finacial or health care industry, but do
> deal
> with goverment funded institutions. And none of our RFC's have referenced
> this, but I'd like to see some instances where this comes into play.
> Thanks again,
> Steve
> "Aaron [SQL Server MVP]" wrote:
>|||Actually there are laws in place I had a heckuva time setting up
software for a client because their data had to be completely separate from
their parent company, due to laws/regulations in financial services. Even
though one was the parent company of the other, they were considered to be
"in competition" with one another, and therefore couldn't share data.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23cbaz2OKFHA.1392@.TK2MSFTNGP10.phx.gbl...
> references
> Personally, I don't know that there are laws per se, but I know that if a
> client wants that (e.g. Fidelity is a prime example), they're going to
> demand it, and you will lose the business if you don't provide it, because
> it is part of their requirement for every vendor.
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>|||Thanks. I'm very pro on the multiple databases, I'm trying to come up with
solid reasons to argue against an outside consultant that is insisting that
a
single database solution is the only right solution.
"Michael C#" wrote:

> I know it's big in the Insurance Industry, although I don't know what the
> specific laws are. It might be part of Sarbanes-Oxley. I would use that
as
> a starting point to find out more. Specifically, as far as I know it tend
s
> to affect the Financial Services sector (including banks, credit unions,
> brokerages, etc.) and it mostly gets into anti-trust law, although I
> wouldn't doubt that other industries like Health Care, etc., might have
> similar laws and regulations.
> "Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
> news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...
>
>

multiple databases vs single db ASP model

I'm looking for more opinions on a single vs many database option for our new
architecture.
Background:
We are an ASP. We host website portals for organizations around the world.
We don't own the data we store and security is a large concern. Currently we
maintain separate databases for each client. Most of the schemas are
different, however we customize some tables based on individual client needs.
All of our websites are currently maintained as separate webisites, with
distinct html/asp code, but a shared set of isapi dlls.
We are in the beginning stages of designing a new architecture to reduce our
adminstrative nightmare of maintenance specifically with the multiple
html/asp code bases, but would like to simplify everywhere possible.
There are 3 scenarios we are considering.
1. Combine all databases in to one.
2. Combining all trivial/similar data into one db, but keeping the most
confidential data in separate databases.
3. Continuing the same as we are now with each client in separate databases.
#1 would be ideal, but i have the following concerns:
Security.
Problems are all or nothing, if all clients users info is in one table, all
sites would be unavailable
Restoring a table information for one specific client becomes a nightmare.
Possible locking/blocking. We do large scale updates of 100,000s rows at a
time to insert/update one client's data. I would think this would cause
performance issues for all sites during that period.
#2 seems like a good approach, because it allows specific customizations and
constraints to client tables and lessens the administrative issues with
applying changes to structures and sp's across multiple databases.
I'm guessing we can overcome some of the issues with #1 but it will require
more work in the long run. I'm looking for any thoughts on the subject.
Thanks,
Steve
Just a few random thoughts... remember they're worth exactly what you paid
for them
Most of the ASPs I've dealt with run one or more SQL Servers, but maintain a
separate database for each client. I've even written back-end applications
that automate the process of creating and securing databases for new
customers. I personally think that would probably be your best bet, since
your clients tend to have different schemas anyway. This gives your clients
access to the SQL Server, but only in their limited database. They don't
even have to know your other customers' databases exist.
Also, from a legal standpoint, this may be a requirement in some industries
that your clients may be in. I know that in some financial services,
insurance and other industries, laws for maintaining data integrity are
pretty strict. In some industries I've even seen where different
subsidiaries of the same corporation (really big in the insurance industry)
can't legally store data in the same databases, due to restrictions imposed
by law.
Obviously you can create a master database with information pertaining to
each client, such as billing info, space used, statistics, etc. But other
than that, intermingling customer data can cause legal and other problems.
|||> Also, from a legal standpoint, this may be a requirement in some
industries
> that your clients may be in. I know that in some financial services,
> insurance and other industries, laws for maintaining data integrity are
> pretty strict. In some industries I've even seen where different
> subsidiaries of the same corporation (really big in the insurance
industry)
> can't legally store data in the same databases, due to restrictions
imposed
> by law.
In fact, it is often the case in this extreme, that the customer's data must
live on a different *server* than your other customers' data, not just in a
different database.
A
|||Thanks for the information. Would you happen to have links with references
to such laws? We aren't in a finacial or health care industry, but do deal
with goverment funded institutions. And none of our RFC's have referenced
this, but I'd like to see some instances where this comes into play.
Thanks again,
Steve
"Aaron [SQL Server MVP]" wrote:

> industries
> industry)
> imposed
> In fact, it is often the case in this extreme, that the customer's data must
> live on a different *server* than your other customers' data, not just in a
> different database.
> A
>
>
|||> Thanks for the information. Would you happen to have links with
references
> to such laws?
Personally, I don't know that there are laws per se, but I know that if a
client wants that (e.g. Fidelity is a prime example), they're going to
demand it, and you will lose the business if you don't provide it, because
it is part of their requirement for every vendor.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
|||I know it's big in the Insurance Industry, although I don't know what the
specific laws are. It might be part of Sarbanes-Oxley. I would use that as
a starting point to find out more. Specifically, as far as I know it tends
to affect the Financial Services sector (including banks, credit unions,
brokerages, etc.) and it mostly gets into anti-trust law, although I
wouldn't doubt that other industries like Health Care, etc., might have
similar laws and regulations.
"Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...[vbcol=seagreen]
> Thanks for the information. Would you happen to have links with
> references
> to such laws? We aren't in a finacial or health care industry, but do
> deal
> with goverment funded institutions. And none of our RFC's have referenced
> this, but I'd like to see some instances where this comes into play.
> Thanks again,
> Steve
> "Aaron [SQL Server MVP]" wrote:
|||Actually there are laws in place I had a heckuva time setting up
software for a client because their data had to be completely separate from
their parent company, due to laws/regulations in financial services. Even
though one was the parent company of the other, they were considered to be
"in competition" with one another, and therefore couldn't share data.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23cbaz2OKFHA.1392@.TK2MSFTNGP10.phx.gbl...
> references
> Personally, I don't know that there are laws per se, but I know that if a
> client wants that (e.g. Fidelity is a prime example), they're going to
> demand it, and you will lose the business if you don't provide it, because
> it is part of their requirement for every vendor.
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
|||Thanks. I'm very pro on the multiple databases, I'm trying to come up with
solid reasons to argue against an outside consultant that is insisting that a
single database solution is the only right solution.
"Michael C#" wrote:

> I know it's big in the Insurance Industry, although I don't know what the
> specific laws are. It might be part of Sarbanes-Oxley. I would use that as
> a starting point to find out more. Specifically, as far as I know it tends
> to affect the Financial Services sector (including banks, credit unions,
> brokerages, etc.) and it mostly gets into anti-trust law, although I
> wouldn't doubt that other industries like Health Care, etc., might have
> similar laws and regulations.
> "Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
> news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...
>
>

multiple databases vs single db ASP model

I'm looking for more opinions on a single vs many database option for our new
architecture.
Background:
We are an ASP. We host website portals for organizations around the world.
We don't own the data we store and security is a large concern. Currently we
maintain separate databases for each client. Most of the schemas are
different, however we customize some tables based on individual client needs.
All of our websites are currently maintained as separate webisites, with
distinct html/asp code, but a shared set of isapi dlls.
We are in the beginning stages of designing a new architecture to reduce our
adminstrative nightmare of maintenance specifically with the multiple
html/asp code bases, but would like to simplify everywhere possible.
There are 3 scenarios we are considering.
1. Combine all databases in to one.
2. Combining all trivial/similar data into one db, but keeping the most
confidential data in separate databases.
3. Continuing the same as we are now with each client in separate databases.
#1 would be ideal, but i have the following concerns:
Security.
Problems are all or nothing, if all clients users info is in one table, all
sites would be unavailable
Restoring a table information for one specific client becomes a nightmare.
Possible locking/blocking. We do large scale updates of 100,000s rows at a
time to insert/update one client's data. I would think this would cause
performance issues for all sites during that period.
#2 seems like a good approach, because it allows specific customizations and
constraints to client tables and lessens the administrative issues with
applying changes to structures and sp's across multiple databases.
I'm guessing we can overcome some of the issues with #1 but it will require
more work in the long run. I'm looking for any thoughts on the subject.
Thanks,
SteveJust a few random thoughts... remember they're worth exactly what you paid
for them :)
Most of the ASPs I've dealt with run one or more SQL Servers, but maintain a
separate database for each client. I've even written back-end applications
that automate the process of creating and securing databases for new
customers. I personally think that would probably be your best bet, since
your clients tend to have different schemas anyway. This gives your clients
access to the SQL Server, but only in their limited database. They don't
even have to know your other customers' databases exist.
Also, from a legal standpoint, this may be a requirement in some industries
that your clients may be in. I know that in some financial services,
insurance and other industries, laws for maintaining data integrity are
pretty strict. In some industries I've even seen where different
subsidiaries of the same corporation (really big in the insurance industry)
can't legally store data in the same databases, due to restrictions imposed
by law.
Obviously you can create a master database with information pertaining to
each client, such as billing info, space used, statistics, etc. But other
than that, intermingling customer data can cause legal and other problems.|||> Also, from a legal standpoint, this may be a requirement in some
industries
> that your clients may be in. I know that in some financial services,
> insurance and other industries, laws for maintaining data integrity are
> pretty strict. In some industries I've even seen where different
> subsidiaries of the same corporation (really big in the insurance
industry)
> can't legally store data in the same databases, due to restrictions
imposed
> by law.
In fact, it is often the case in this extreme, that the customer's data must
live on a different *server* than your other customers' data, not just in a
different database.
A|||Thanks for the information. Would you happen to have links with references
to such laws? We aren't in a finacial or health care industry, but do deal
with goverment funded institutions. And none of our RFC's have referenced
this, but I'd like to see some instances where this comes into play.
Thanks again,
Steve
"Aaron [SQL Server MVP]" wrote:
> > Also, from a legal standpoint, this may be a requirement in some
> industries
> > that your clients may be in. I know that in some financial services,
> > insurance and other industries, laws for maintaining data integrity are
> > pretty strict. In some industries I've even seen where different
> > subsidiaries of the same corporation (really big in the insurance
> industry)
> > can't legally store data in the same databases, due to restrictions
> imposed
> > by law.
> In fact, it is often the case in this extreme, that the customer's data must
> live on a different *server* than your other customers' data, not just in a
> different database.
> A
>
>|||> Thanks for the information. Would you happen to have links with
references
> to such laws?
Personally, I don't know that there are laws per se, but I know that if a
client wants that (e.g. Fidelity is a prime example), they're going to
demand it, and you will lose the business if you don't provide it, because
it is part of their requirement for every vendor.
--
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||I know it's big in the Insurance Industry, although I don't know what the
specific laws are. It might be part of Sarbanes-Oxley. I would use that as
a starting point to find out more. Specifically, as far as I know it tends
to affect the Financial Services sector (including banks, credit unions,
brokerages, etc.) and it mostly gets into anti-trust law, although I
wouldn't doubt that other industries like Health Care, etc., might have
similar laws and regulations.
"Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...
> Thanks for the information. Would you happen to have links with
> references
> to such laws? We aren't in a finacial or health care industry, but do
> deal
> with goverment funded institutions. And none of our RFC's have referenced
> this, but I'd like to see some instances where this comes into play.
> Thanks again,
> Steve
> "Aaron [SQL Server MVP]" wrote:
>> > Also, from a legal standpoint, this may be a requirement in some
>> industries
>> > that your clients may be in. I know that in some financial services,
>> > insurance and other industries, laws for maintaining data integrity are
>> > pretty strict. In some industries I've even seen where different
>> > subsidiaries of the same corporation (really big in the insurance
>> industry)
>> > can't legally store data in the same databases, due to restrictions
>> imposed
>> > by law.
>> In fact, it is often the case in this extreme, that the customer's data
>> must
>> live on a different *server* than your other customers' data, not just in
>> a
>> different database.
>> A
>>|||Actually there are laws in place :) I had a heckuva time setting up
software for a client because their data had to be completely separate from
their parent company, due to laws/regulations in financial services. Even
though one was the parent company of the other, they were considered to be
"in competition" with one another, and therefore couldn't share data.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23cbaz2OKFHA.1392@.TK2MSFTNGP10.phx.gbl...
>> Thanks for the information. Would you happen to have links with
> references
>> to such laws?
> Personally, I don't know that there are laws per se, but I know that if a
> client wants that (e.g. Fidelity is a prime example), they're going to
> demand it, and you will lose the business if you don't provide it, because
> it is part of their requirement for every vendor.
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>|||Thanks. I'm very pro on the multiple databases, I'm trying to come up with
solid reasons to argue against an outside consultant that is insisting that a
single database solution is the only right solution.
"Michael C#" wrote:
> I know it's big in the Insurance Industry, although I don't know what the
> specific laws are. It might be part of Sarbanes-Oxley. I would use that as
> a starting point to find out more. Specifically, as far as I know it tends
> to affect the Financial Services sector (including banks, credit unions,
> brokerages, etc.) and it mostly gets into anti-trust law, although I
> wouldn't doubt that other industries like Health Care, etc., might have
> similar laws and regulations.
> "Steve Zohn" <SteveZohn@.discussions.microsoft.com> wrote in message
> news:B68ED433-BB5C-4F2B-9758-524FBDEC1095@.microsoft.com...
> > Thanks for the information. Would you happen to have links with
> > references
> > to such laws? We aren't in a finacial or health care industry, but do
> > deal
> > with goverment funded institutions. And none of our RFC's have referenced
> > this, but I'd like to see some instances where this comes into play.
> >
> > Thanks again,
> > Steve
> >
> > "Aaron [SQL Server MVP]" wrote:
> >
> >> > Also, from a legal standpoint, this may be a requirement in some
> >> industries
> >> > that your clients may be in. I know that in some financial services,
> >> > insurance and other industries, laws for maintaining data integrity are
> >> > pretty strict. In some industries I've even seen where different
> >> > subsidiaries of the same corporation (really big in the insurance
> >> industry)
> >> > can't legally store data in the same databases, due to restrictions
> >> imposed
> >> > by law.
> >>
> >> In fact, it is often the case in this extreme, that the customer's data
> >> must
> >> live on a different *server* than your other customers' data, not just in
> >> a
> >> different database.
> >>
> >> A
> >>
> >>
> >>
>
>

Saturday, February 25, 2012

Multiple Client Database Model

Does anyone have a sample of what a database would look like that would support multiple clients in a single ASP.net application?

Thank you,

Why would this be any different from any other database?
A database is meant to be shared amongst multiple clients. That'sone of the main reasons for using databases instead of storing data inflat files or other application-based structures. Databasessupport transactions and locking that keep clients from destroying eachothers' work. Perhaps I'm misunderstanding your question,though? Are you looking for an example of a specific type ofdatabase?

|||

Really what I was hoping was an example of a database that would be used on a web host that could maintain more than one client using it. For example two or more companies using the same hosted database. What is done to the data tables to allow for the separation of the companies and their clients, etc...

I hope this explains it better.

Thank you,

|||Okay, that makes a lot more senseBig Smile [:D]
This can be achieved using what's known as "row-based security". See this article:
http://vyaskn.tripod.com/row_level_security_in_sql_server_databases.htm
Note that there are some serious caveats in a row-based securityscheme, and if you really need heavy security it's probably better todo a seperate database per client. Steve Kass (SQL Server MVP)has posted some interesting ways he's found to hack row-based securityschemes -- unfortunately, the SQL Server engine doesn't realize you'redoing row-based security so it doesn't know not to show certain data inerrors/etc if you give it the right inputs.

|||Thank you, I will check it out.

Monday, February 20, 2012

Multiple Active Result Sets (MARS)

Two questions relating to this:
1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says
that I'm using 2.8 but I can't find where I can download an update from.
Thanks if you can help with either of these questions.
Griff
Sorry - need to be a bit more specific here.
I'm wanting to implement the ability to have asynchronous command
execution....
Griff
|||1. Yes for MARS you need Sql Server 2005
Your second question is not clear, please give more inputs...
Thanks,
Sree
|||> I'm wanting to implement the ability to have asynchronous command
> execution....
You can execute SQL commands asynchronously in ADO.NET 2.0 (Visual Studio
2005) using BeginExecute../EndExecute... methods of the command object
regardless of the provider. Each concurrent command will need a separate
connection. You can also accomplish the same result on your own using
delegates and multiple threads in any version of ADO.NET. Old fashioned ADO
can also execute command asynchronously if you specify the adAsynchExecute
ExecuteOption.
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>
|||MARS is part of SQL Native Client (SQLNCI) and is a SQL 2005-only feature.
SQLNCI provides features above and beyond MDAC.
You can still execute asynchronous queries without SQL 2005/SQLNCI. See my
response to your other question.
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>
|||"Griff" wrote:

> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
MARS is SQL Server 2005 only. Asynch communication can be done with either
SQL 2005 or 2000, but 2005 has better functionality built in. Note that most
of the functionality is included in SQL Server 2005 Express, which is a good
development option (may even be a good production option, depending on the
app); if you can find an ISP with SQL 2005 (I can suggest some), I would go
with SQL 2005 and use the newer model.

> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says
> that I'm using 2.8 but I can't find where I can download an update from.
2.8 is the latest MDAC:
http://msdn.microsoft.com/data/mdac/...s/default.aspx
I know the 9.x is important, but the reason skips my mind. If you have 2.8
with the proper .NET library installed, you are fine.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
|||Asynchronous command is not the same as MARS.
Asynch command exec should work on SQL2k also.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>
|||> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
All that you need comes bundled up with SQL Server 2005 libraries.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message news:AB190AE5-48A7-4604-B791-C85D4031F3EA@.microsoft.com...
> "Griff" wrote:
>
> MARS is SQL Server 2005 only. Asynch communication can be done with either
> SQL 2005 or 2000, but 2005 has better functionality built in. Note that
> most
> of the functionality is included in SQL Server 2005 Express, which is a
> good
> development option (may even be a good production option, depending on the
> app); if you can find an ISP with SQL 2005 (I can suggest some), I would
> go
> with SQL 2005 and use the newer model.
>
> 2.8 is the latest MDAC:
> http://msdn.microsoft.com/data/mdac/...s/default.aspx
> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************
|||Good answers all.
Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
ADO.NET only _executes_ the query async--the row-fetch operation is
synchronous unless you write your own backgroundworker thread routine to
handle it.
MARS? Just leave it alone--you won't need it for 90% of the things needed to
be done.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>
|||Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what it is that is
synchronous. Are you saying that I cannot read any rows until all rows has been returned? I.e., a
FAST hint in the SQL query would be of no advantage, but probably lead to higher resource
utilization and slower response time (depending on the plans of course)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
> Good answers all.
> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic. ADO.NET only _executes_ the
> query async--the row-fetch operation is synchronous unless you write your own backgroundworker
> thread routine to handle it.
> MARS? Just leave it alone--you won't need it for 90% of the things needed to be done.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> "Griff" <howling@.the.moon> wrote in message news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>

Multiple Active Result Sets (MARS)

Two questions relating to this:
1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says
that I'm using 2.8 but I can't find where I can download an update from.
Thanks if you can help with either of these questions.
GriffSorry - need to be a bit more specific here.
I'm wanting to implement the ability to have asynchronous command
execution....
Griff|||1. Yes for MARS you need Sql Server 2005
Your second question is not clear, please give more inputs...
Thanks,
Sree|||> I'm wanting to implement the ability to have asynchronous command
> execution....
You can execute SQL commands asynchronously in ADO.NET 2.0 (Visual Studio
2005) using BeginExecute../EndExecute... methods of the command object
regardless of the provider. Each concurrent command will need a separate
connection. You can also accomplish the same result on your own using
delegates and multiple threads in any version of ADO.NET. Old fashioned ADO
can also execute command asynchronously if you specify the adAsynchExecute
ExecuteOption.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>|||MARS is part of SQL Native Client (SQLNCI) and is a SQL 2005-only feature.
SQLNCI provides features above and beyond MDAC.
You can still execute asynchronous queries without SQL 2005/SQLNCI. See my
response to your other question.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>|||"Griff" wrote:
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
MARS is SQL Server 2005 only. Asynch communication can be done with either
SQL 2005 or 2000, but 2005 has better functionality built in. Note that most
of the functionality is included in SQL Server 2005 Express, which is a good
development option (may even be a good production option, depending on the
app); if you can find an ISP with SQL 2005 (I can suggest some), I would go
with SQL 2005 and use the newer model.
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says
> that I'm using 2.8 but I can't find where I can download an update from.
2.8 is the latest MDAC:
http://msdn.microsoft.com/data/mdac/downloads/default.aspx
I know the 9.x is important, but the reason skips my mind. If you have 2.8
with the proper .NET library installed, you are fine.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************|||> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
All that you need comes bundled up with SQL Server 2005 libraries.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message news:AB190AE5-48A7-4604-B791-C85D4031F3EA@.microsoft.com...
> "Griff" wrote:
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> MARS is SQL Server 2005 only. Asynch communication can be done with either
> SQL 2005 or 2000, but 2005 has better functionality built in. Note that
> most
> of the functionality is included in SQL Server 2005 Express, which is a
> good
> development option (may even be a good production option, depending on the
> app); if you can find an ISP with SQL 2005 (I can suggest some), I would
> go
> with SQL 2005 and use the newer model.
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
>> says
>> that I'm using 2.8 but I can't find where I can download an update from.
> 2.8 is the latest MDAC:
> http://msdn.microsoft.com/data/mdac/downloads/default.aspx
> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************|||Asynchronous command is not the same as MARS.
Asynch command exec should work on SQL2k also.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>|||Good answers all.
Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
ADO.NET only _executes_ the query async--the row-fetch operation is
synchronous unless you write your own backgroundworker thread routine to
handle it.
MARS? Just leave it alone--you won't need it for 90% of the things needed to
be done.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>|||Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what it is that is
synchronous. Are you saying that I cannot read any rows until all rows has been returned? I.e., a
FAST hint in the SQL query would be of no advantage, but probably lead to higher resource
utilization and slower response time (depending on the plans of course)?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
> Good answers all.
> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic. ADO.NET only _executes_ the
> query async--the row-fetch operation is synchronous unless you write your own backgroundworker
> thread routine to handle it.
> MARS? Just leave it alone--you won't need it for 90% of the things needed to be done.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> "Griff" <howling@.the.moon> wrote in message news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says that I'm using 2.8
>> but I can't find where I can download an update from.
>> Thanks if you can help with either of these questions.
>> Griff
>|||Synchronous is the opposite of asynchronous. It means that when you execute
a synchronous operation (as most are) the application is blocked until the
operation is completed. When you execute BeginExecuteReader, only the
_query_ is executed asynchronously. Not a single row has been returned from
the query when ADO.NET signals that the asynchronous operation is complete.
You still have to execute Read or Load to return the rows. As you do, your
application is blocked until the last row is returned (Load method).
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eiN02bkKGHA.1192@.TK2MSFTNGP11.phx.gbl...
> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what
> it is that is synchronous. Are you saying that I cannot read any rows
> until all rows has been returned? I.e., a FAST hint in the SQL query would
> be of no advantage, but probably lead to higher resource utilization and
> slower response time (depending on the plans of course)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
> news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
>> Good answers all.
>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
>> ADO.NET only _executes_ the query async--the row-fetch operation is
>> synchronous unless you write your own backgroundworker thread routine to
>> handle it.
>> MARS? Just leave it alone--you won't need it for 90% of the things needed
>> to be done.
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>> "Griff" <howling@.the.moon> wrote in message
>> news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
>> says that I'm using 2.8 but I can't find where I can download an update
>> from.
>> Thanks if you can help with either of these questions.
>> Griff
>>
>|||> Synchronous is the opposite of asynchronous.
Yes, I wrote synchronous in the sense that you implied that the new "asynchronous" features of
ADO.NET 2.0 are not truly asynchronous. I.e., I was wondering which parts were still synchronous.
> You still have to execute Read or Load to return the rows. As you do, your application is blocked
> until the last row is returned (Load method).
Which answers my question :-). You cannot read the rows and present them "as they come". I.e., the
app behavior will be more like QA grid mode (synchronous behavior) compared to text mode (truly
asynchronous behavior).
I have a feeling that the SQL Server FAST hint is sometimes overused. The developer think that
he/she can gain something by using these hints: "I'll present the first few rows immediately", where
very few applications/API/programmers actually program in that sense. And when SQL Server receives a
FAST hint, the overall resource utilization can be significantly higher (using a non-clustered index
for an ORDER BY over a large set, for instance).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:%23mUrrioKGHA.1124@.TK2MSFTNGP10.phx.gbl...
> Synchronous is the opposite of asynchronous. It means that when you execute a synchronous
> operation (as most are) the application is blocked until the operation is completed. When you
> execute BeginExecuteReader, only the _query_ is executed asynchronously. Not a single row has
> been returned from the query when ADO.NET signals that the asynchronous operation is complete. You
> still have to execute Read or Load to return the rows. As you do, your application is blocked
> until the last row is returned (Load method).
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:eiN02bkKGHA.1192@.TK2MSFTNGP11.phx.gbl...
>> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what it is that is
>> synchronous. Are you saying that I cannot read any rows until all rows has been returned? I.e., a
>> FAST hint in the SQL query would be of no advantage, but probably lead to higher resource
>> utilization and slower response time (depending on the plans of course)?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
>> Good answers all.
>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic. ADO.NET only _executes_
>> the query async--the row-fetch operation is synchronous unless you write your own
>> backgroundworker thread routine to handle it.
>> MARS? Just leave it alone--you won't need it for 90% of the things needed to be done.
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no rights.
>> __________________________________
>> "Griff" <howling@.the.moon> wrote in message news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says that I'm using 2.8
>> but I can't find where I can download an update from.
>> Thanks if you can help with either of these questions.
>> Griff
>>
>>
>|||I'd like to put some clarification and to confirm some of the comments in
the thread, and then point to some resources. I'm assuming that since we're
in the ADO.NET newsgroup, this is about ADO.NET in particular :)
- As several folks pointed out, MARS and asynchronous command execution are
different, unrelated things (they can be used to together, but that's
another story)
- Asynchronous command execution works against all versions of SQL Server
that ADO.NET can talk to (7.0 and later). You get the same functionality
against all of them.
- Asynchronous command execution is *not* the same as old ADO's asynchronous
execution, and it's *not* the same as using an asynchronous delegate
(BegingInvoke) or the thread-pool.
- Asynchronous command execution is entirely implemented on the client
interfaces, not in the server. It's completely unrelated to OPTION(FAST x)
or FASTFIRSTROW
A few years ago, in the first beta of ADO.NET 2.0 and early pre-release
versions of SQL Server, there used to be something called MDAC 9.0. That
thing does not exist any more. ADO.NET is now self-contained, so you don't
need any external libraries in order to use asynchronous command execution,
MARS, or any other SQL Server feature from ADO.NET.
For more information about asynchronous command execution you can read:
http://msdn.microsoft.com/library/en-us/dnvs05/html/async2.asp
--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OUF5hLpKGHA.3732@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous.
> Yes, I wrote synchronous in the sense that you implied that the new
> "asynchronous" features of ADO.NET 2.0 are not truly asynchronous. I.e., I
> was wondering which parts were still synchronous.
>
>> You still have to execute Read or Load to return the rows. As you do,
>> your application is blocked until the last row is returned (Load method).
> Which answers my question :-). You cannot read the rows and present them
> "as they come". I.e., the app behavior will be more like QA grid mode
> (synchronous behavior) compared to text mode (truly asynchronous
> behavior).
> I have a feeling that the SQL Server FAST hint is sometimes overused. The
> developer think that he/she can gain something by using these hints: "I'll
> present the first few rows immediately", where very few
> applications/API/programmers actually program in that sense. And when SQL
> Server receives a FAST hint, the overall resource utilization can be
> significantly higher (using a non-clustered index for an ORDER BY over a
> large set, for instance).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
> news:%23mUrrioKGHA.1124@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous. It means that when you
>> execute a synchronous operation (as most are) the application is blocked
>> until the operation is completed. When you execute BeginExecuteReader,
>> only the _query_ is executed asynchronously. Not a single row has been
>> returned from the query when ADO.NET signals that the asynchronous
>> operation is complete. You still have to execute Read or Load to return
>> the rows. As you do, your application is blocked until the last row is
>> returned (Load method).
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:eiN02bkKGHA.1192@.TK2MSFTNGP11.phx.gbl...
>> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly
>> what it is that is synchronous. Are you saying that I cannot read any
>> rows until all rows has been returned? I.e., a FAST hint in the SQL
>> query would be of no advantage, but probably lead to higher resource
>> utilization and slower response time (depending on the plans of course)?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
>> Good answers all.
>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
>> ADO.NET only _executes_ the query async--the row-fetch operation is
>> synchronous unless you write your own backgroundworker thread routine
>> to handle it.
>> MARS? Just leave it alone--you won't need it for 90% of the things
>> needed to be done.
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>> "Griff" <howling@.the.moon> wrote in message
>> news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server
>> 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
>> says that I'm using 2.8 but I can't find where I can download an
>> update from.
>> Thanks if you can help with either of these questions.
>> Griff
>>
>>
>>
>|||Pablo, thanks a lot for adding these comments. Your article was especially
informative.
--
Dan Guzman
SQL Server MVP
"Pablo Castro [MS]" <pablocas@.online.microsoft.com> wrote in message
news:e$fR4z2KGHA.1312@.TK2MSFTNGP09.phx.gbl...
> I'd like to put some clarification and to confirm some of the comments in
> the thread, and then point to some resources. I'm assuming that since
> we're in the ADO.NET newsgroup, this is about ADO.NET in particular :)
> - As several folks pointed out, MARS and asynchronous command execution
> are different, unrelated things (they can be used to together, but that's
> another story)
> - Asynchronous command execution works against all versions of SQL Server
> that ADO.NET can talk to (7.0 and later). You get the same functionality
> against all of them.
> - Asynchronous command execution is *not* the same as old ADO's
> asynchronous execution, and it's *not* the same as using an asynchronous
> delegate (BegingInvoke) or the thread-pool.
> - Asynchronous command execution is entirely implemented on the client
> interfaces, not in the server. It's completely unrelated to OPTION(FAST x)
> or FASTFIRSTROW
> A few years ago, in the first beta of ADO.NET 2.0 and early pre-release
> versions of SQL Server, there used to be something called MDAC 9.0. That
> thing does not exist any more. ADO.NET is now self-contained, so you don't
> need any external libraries in order to use asynchronous command
> execution, MARS, or any other SQL Server feature from ADO.NET.
> For more information about asynchronous command execution you can read:
> http://msdn.microsoft.com/library/en-us/dnvs05/html/async2.asp
> --
> Pablo Castro
> Program Manager - ADO.NET Team
> Microsoft Corp.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OUF5hLpKGHA.3732@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous.
>> Yes, I wrote synchronous in the sense that you implied that the new
>> "asynchronous" features of ADO.NET 2.0 are not truly asynchronous. I.e.,
>> I was wondering which parts were still synchronous.
>>
>> You still have to execute Read or Load to return the rows. As you do,
>> your application is blocked until the last row is returned (Load
>> method).
>> Which answers my question :-). You cannot read the rows and present them
>> "as they come". I.e., the app behavior will be more like QA grid mode
>> (synchronous behavior) compared to text mode (truly asynchronous
>> behavior).
>> I have a feeling that the SQL Server FAST hint is sometimes overused. The
>> developer think that he/she can gain something by using these hints:
>> "I'll present the first few rows immediately", where very few
>> applications/API/programmers actually program in that sense. And when SQL
>> Server receives a FAST hint, the overall resource utilization can be
>> significantly higher (using a non-clustered index for an ORDER BY over a
>> large set, for instance).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:%23mUrrioKGHA.1124@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous. It means that when you
>> execute a synchronous operation (as most are) the application is blocked
>> until the operation is completed. When you execute BeginExecuteReader,
>> only the _query_ is executed asynchronously. Not a single row has been
>> returned from the query when ADO.NET signals that the asynchronous
>> operation is complete. You still have to execute Read or Load to return
>> the rows. As you do, your application is blocked until the last row is
>> returned (Load method).
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:eiN02bkKGHA.1192@.TK2MSFTNGP11.phx.gbl...
>> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly
>> what it is that is synchronous. Are you saying that I cannot read any
>> rows until all rows has been returned? I.e., a FAST hint in the SQL
>> query would be of no advantage, but probably lead to higher resource
>> utilization and slower response time (depending on the plans of
>> course)?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
>> Good answers all.
>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
>> ADO.NET only _executes_ the query async--the row-fetch operation is
>> synchronous unless you write your own backgroundworker thread routine
>> to handle it.
>> MARS? Just leave it alone--you won't need it for 90% of the things
>> needed to be done.
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>> "Griff" <howling@.the.moon> wrote in message
>> news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server
>> 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry
>> setting says that I'm using 2.8 but I can't find where I can download
>> an update from.
>> Thanks if you can help with either of these questions.
>> Griff
>>
>>
>>
>
>|||> - Asynchronous command execution is entirely implemented on the client interfaces, not in the
> server. It's completely unrelated to OPTION(FAST x) or FASTFIRSTROW
I think I having problems getting my point across. My point is that a developer might think:
"Asynchronous... Great. I can now submit my query using a FAST hint and read and present the rows to
the user as SQL Server output the rows in its out buffer. The user will see rows immediately and
doesn't have to wait for the whole set to be returned."
And this is not how ADO.NET asynchronous execution work. Unless there is some undocumented
AsyncGetRecord method.
So, the point is that the cost for the query can be *significant* higher using a FAST hint, and it
is sad if someone uses such hint and not only is the response time for that operation slower, the
resource consumption on the server is higher. In below example, the query with the FAST hint is uses
300 *times* more I/O:
USE AdventureWorks
SET STATISTICS IO ON
SELECT OrderQty, SalesOrderId, ProductID
FROM Sales.SalesOrderDetail
ORDER BY ProductID
--1241 I/O
SET STATISTICS IO ON
SELECT OrderQty, SalesOrderId, ProductID
FROM Sales.SalesOrderDetail
ORDER BY ProductID
OPTION(FAST 10)
--371771 I/O
This is not really an ADO.NET issue, it is only a caution of using the FAST hint, unless you program
in an environment which allow you to read the rows as they arrive in the input buffer (like ODBC
does). Oh, and btw, thanks for the info, enlightening. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pablo Castro [MS]" <pablocas@.online.microsoft.com> wrote in message
news:e$fR4z2KGHA.1312@.TK2MSFTNGP09.phx.gbl...
> I'd like to put some clarification and to confirm some of the comments in the thread, and then
> point to some resources. I'm assuming that since we're in the ADO.NET newsgroup, this is about
> ADO.NET in particular :)
> - As several folks pointed out, MARS and asynchronous command execution are different, unrelated
> things (they can be used to together, but that's another story)
> - Asynchronous command execution works against all versions of SQL Server that ADO.NET can talk to
> (7.0 and later). You get the same functionality against all of them.
> - Asynchronous command execution is *not* the same as old ADO's asynchronous execution, and it's
> *not* the same as using an asynchronous delegate (BegingInvoke) or the thread-pool.
> - Asynchronous command execution is entirely implemented on the client interfaces, not in the
> server. It's completely unrelated to OPTION(FAST x) or FASTFIRSTROW
> A few years ago, in the first beta of ADO.NET 2.0 and early pre-release versions of SQL Server,
> there used to be something called MDAC 9.0. That thing does not exist any more. ADO.NET is now
> self-contained, so you don't need any external libraries in order to use asynchronous command
> execution, MARS, or any other SQL Server feature from ADO.NET.
> For more information about asynchronous command execution you can read:
> http://msdn.microsoft.com/library/en-us/dnvs05/html/async2.asp
> --
> Pablo Castro
> Program Manager - ADO.NET Team
> Microsoft Corp.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:OUF5hLpKGHA.3732@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous.
>> Yes, I wrote synchronous in the sense that you implied that the new "asynchronous" features of
>> ADO.NET 2.0 are not truly asynchronous. I.e., I was wondering which parts were still synchronous.
>>
>> You still have to execute Read or Load to return the rows. As you do, your application is
>> blocked until the last row is returned (Load method).
>> Which answers my question :-). You cannot read the rows and present them "as they come". I.e.,
>> the app behavior will be more like QA grid mode (synchronous behavior) compared to text mode
>> (truly asynchronous behavior).
>> I have a feeling that the SQL Server FAST hint is sometimes overused. The developer think that
>> he/she can gain something by using these hints: "I'll present the first few rows immediately",
>> where very few applications/API/programmers actually program in that sense. And when SQL Server
>> receives a FAST hint, the overall resource utilization can be significantly higher (using a
>> non-clustered index for an ORDER BY over a large set, for instance).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:%23mUrrioKGHA.1124@.TK2MSFTNGP10.phx.gbl...
>> Synchronous is the opposite of asynchronous. It means that when you execute a synchronous
>> operation (as most are) the application is blocked until the operation is completed. When you
>> execute BeginExecuteReader, only the _query_ is executed asynchronously. Not a single row has
>> been returned from the query when ADO.NET signals that the asynchronous operation is complete.
>> You still have to execute Read or Load to return the rows. As you do, your application is
>> blocked until the last row is returned (Load method).
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no rights.
>> __________________________________
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
>> news:eiN02bkKGHA.1192@.TK2MSFTNGP11.phx.gbl...
>> Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what it is that is
>> synchronous. Are you saying that I cannot read any rows until all rows has been returned? I.e.,
>> a FAST hint in the SQL query would be of no advantage, but probably lead to higher resource
>> utilization and slower response time (depending on the plans of course)?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
>> news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
>> Good answers all.
>> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic. ADO.NET only _executes_
>> the query async--the row-fetch operation is synchronous unless you write your own
>> backgroundworker thread routine to handle it.
>> MARS? Just leave it alone--you won't need it for 90% of the things needed to be done.
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no rights.
>> __________________________________
>> "Griff" <howling@.the.moon> wrote in message news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
>> Two questions relating to this:
>> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
>> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says that I'm using
>> 2.8 but I can't find where I can download an update from.
>> Thanks if you can help with either of these questions.
>> Griff
>>
>>
>>
>

Multiple Active Result Sets (MARS)

Two questions relating to this:
1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
2 - My ASP.NET book says that I require MDAC 9.0. My registry setting says
that I'm using 2.8 but I can't find where I can download an update from.
Thanks if you can help with either of these questions.
GriffSorry - need to be a bit more specific here.
I'm wanting to implement the ability to have asynchronous command
execution....
Griff|||1. Yes for MARS you need Sql Server 2005
Your second question is not clear, please give more inputs...
Thanks,
Sree|||> I'm wanting to implement the ability to have asynchronous command
> execution....
You can execute SQL commands asynchronously in ADO.NET 2.0 (Visual Studio
2005) using BeginExecute../EndExecute... methods of the command object
regardless of the provider. Each concurrent command will need a separate
connection. You can also accomplish the same result on your own using
delegates and multiple threads in any version of ADO.NET. Old fashioned ADO
can also execute command asynchronously if you specify the adAsynchExecute
ExecuteOption.
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>|||MARS is part of SQL Native Client (SQLNCI) and is a SQL 2005-only feature.
SQLNCI provides features above and beyond MDAC.
You can still execute asynchronous queries without SQL 2005/SQLNCI. See my
response to your other question.
Hope this helps.
Dan Guzman
SQL Server MVP
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>|||"Griff" wrote:

> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
MARS is SQL Server 2005 only. Asynch communication can be done with either
SQL 2005 or 2000, but 2005 has better functionality built in. Note that most
of the functionality is included in SQL Server 2005 Express, which is a good
development option (may even be a good production option, depending on the
app); if you can find an ISP with SQL 2005 (I can suggest some), I would go
with SQL 2005 and use the newer model.

> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting say
s
> that I'm using 2.8 but I can't find where I can download an update from.
2.8 is the latest MDAC:
http://msdn.microsoft.com/data/mdac...ds/default.aspx
I know the 9.x is important, but the reason skips my mind. If you have 2.8
with the proper .NET library installed, you are fine.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************|||Asynchronous command is not the same as MARS.
Asynch command exec should work on SQL2k also.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.m...5/13/63199.aspx
________________________________________
__________________
"Griff" <howling@.the.moon> wrote in message
news:ejhcXwKKGHA.2900@.TK2MSFTNGP14.phx.gbl...
> Sorry - need to be a bit more specific here.
> I'm wanting to implement the ability to have asynchronous command
> execution....
> Griff
>|||> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
All that you need comes bundled up with SQL Server 2005 libraries.
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.m...5/13/63199.aspx
________________________________________
__________________
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message news:AB190AE5-48A7-4604-B791-C85D4031F3EA@.microsoft.com...
> "Griff" wrote:
>
> MARS is SQL Server 2005 only. Asynch communication can be done with either
> SQL 2005 or 2000, but 2005 has better functionality built in. Note that
> most
> of the functionality is included in SQL Server 2005 Express, which is a
> good
> development option (may even be a good production option, depending on the
> app); if you can find an ISP with SQL 2005 (I can suggest some), I would
> go
> with SQL 2005 and use the newer model.
>
> 2.8 is the latest MDAC:
> http://msdn.microsoft.com/data/mdac...ds/default.aspx
> I know the 9.x is important, but the reason skips my mind. If you have 2.8
> with the proper .NET library installed, you are fine.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************|||Good answers all.
Just be aware that ADO.NET 2.0 async ops don't work like ADO classic.
ADO.NET only _executes_ the query async--the row-fetch operation is
synchronous unless you write your own backgroundworker thread routine to
handle it.
MARS? Just leave it alone--you won't need it for 90% of the things needed to
be done.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Griff" <howling@.the.moon> wrote in message
news:%23lKiyuKKGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Two questions relating to this:
> 1 - Do I require SQL Server 2005 or can this work with SQL Server 2000?
> 2 - My ASP.NET book says that I require MDAC 9.0. My registry setting
> says that I'm using 2.8 but I can't find where I can download an update
> from.
> Thanks if you can help with either of these questions.
> Griff
>|||Hmm, regarding async in ADO.NET 2.0. I'm trying to understand exactly what i
t is that is
synchronous. Are you saying that I cannot read any rows until all rows has b
een returned? I.e., a
FAST hint in the SQL query would be of no advantage, but probably lead to hi
gher resource
utilization and slower response time (depending on the plans of course)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:OSG$1UcKGHA.3272@.tk2msftngp13.phx.gbl...
> Good answers all.
> Just be aware that ADO.NET 2.0 async ops don't work like ADO classic. ADO.
NET only _executes_ the
> query async--the row-fetch operation is synchronous unless you write your
own backgroundworker
> thread routine to handle it.
> MARS? Just leave it alone--you won't need it for 90% of the things needed
to be done.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> __________________________________
> "Griff" <howling@.the.moon> wrote in message news:%23lKiyuKKGHA.3936@.TK2MSF
TNGP12.phx.gbl...
>