Showing posts with label queries. Show all posts
Showing posts with label queries. Show all posts

Saturday, February 25, 2012

AMO:How we can handle the transactions in AMO

HI All,

I am working with AMO and .Net i have few queries,

1) how to handle the transactions in AMO

2)if one user is processing the cube then how to prevent other user to access it.

Please let me know.

Your suggestions are valueable to me.

Thanks in advance.

vish.

AMO is inherently transactional. If an object is being processed changes that other users submit will not be committed until after the transaction has completed.

If you need to do a series of operations, like changing a cubes structure and then processing it, but you want either both or neither of these operations to suceed, then you can use explicit transactions. The server object has beginTransaction, commitTransaction and rollbackTransaction methods.

AMO:How we can handle the transactions in AMO

HI All,

I am working with AMO and .Net i have few queries,

1) how to handle the transactions in AMO

2)if one user is processing the cube then how to prevent other user to access it.

Please let me know.

Your suggestions are valueable to me.

Thanks in advance.

vish.

AMO is inherently transactional. If an object is being processed changes that other users submit will not be committed until after the transaction has completed.

If you need to do a series of operations, like changing a cubes structure and then processing it, but you want either both or neither of these operations to suceed, then you can use explicit transactions. The server object has beginTransaction, commitTransaction and rollbackTransaction methods.

Thursday, February 9, 2012

Alternative to Account Delegation?

Hello,
I want to run distributed queries via a linked server using a windows
autheniticated login. Talking with our AD/network admin about the steps in
http://msdn.microsoft.com/library/d...>
ity_2gmm.asp
they have a problem with setting up account delegation for service account
and sql server computer, mainly because this is a new precedent and they
don't want to go there unless absolutely necessary.
Are there any alternatives to doing the above that would enable distributed
queries using windows authenicated logins?
Thanks,
DanHi
No. The way the OS has to impersonate and delegate security across machine
boundaries requires this. If there was an easier way, we would all be using
it.
Your admins will need to get used to it. As security gets tightened inside
the OS, you will need to use it more and more.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Dan H" wrote:

> Hello,
> I want to run distributed queries via a linked server using a windows
> autheniticated login. Talking with our AD/network admin about the steps i
n
> http://msdn.microsoft.com/library/d...
urity_2gmm.asp
> they have a problem with setting up account delegation for service account
> and sql server computer, mainly because this is a new precedent and they
> don't want to go there unless absolutely necessary.
> Are there any alternatives to doing the above that would enable distribute
d
> queries using windows authenicated logins?
> Thanks,
> Dan

alternative for last()

Hi,
Does somebody knows an alternative for the function last() in access. I've a
lot queries which uses last, but there is no alternative in sql server.
I used min/max but that did not gave me the right results. I need to know
the last row in a 1-to-many table situation.
Is there something like a hidden rowid i can use?Jason
See MAX(),MIN() funtions in the BOL.
\
"Jason" <jasonlewis@.hotrmail.com> wrote in message
news:OXIlbqZGFHA.3648@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Does somebody knows an alternative for the function last() in access. I've
a
> lot queries which uses last, but there is no alternative in sql server.
> I used min/max but that did not gave me the right results. I need to know
> the last row in a 1-to-many table situation.
> Is there something like a hidden rowid i can use?
>|||Select top 1 * from table order by field desc
Madhivanan|||There is NO exact equivalent of the LAST function of Access in SQL server.
This is based on the relational concept that the rows in a table are not
ordered.
So anything like LAST, FIRST, NEXT etc are totally meaningless.
If you have a column that records data in any chronological order, you can
achieve the same by using the MAX function.

> Is there something like a hidden rowid I can use?
No, there is nothing like that exposed.
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Jason" <jasonlewis@.hotrmail.com> wrote in message
news:OXIlbqZGFHA.3648@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Does somebody knows an alternative for the function last() in access. I've
> a
> lot queries which uses last, but there is no alternative in sql server.
> I used min/max but that did not gave me the right results. I need to know
> the last row in a 1-to-many table situation.
> Is there something like a hidden rowid i can use?
>|||HI Mad,
How is sytax if i want it to join with another table (the 1 side of
1-to-many)?
<madhivanan2001@.gmail.com> wrote in message
news:1109158964.898453.171390@.f14g2000cwb.googlegroups.com...
> Select top 1 * from table order by field desc
> Madhivanan
>|||If you have the concept of last, then there is some ordering.... If for
example you want the last price ( with the ordering being the title_id),
then sort the rows in the reverse order, so the last row becomes the first
row returned, and select the top 1... ie
select top 1 price from titles order by title_id desc
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
"Jason" <jasonlewis@.hotrmail.com> wrote in message
news:OXIlbqZGFHA.3648@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Does somebody knows an alternative for the function last() in access. I've
> a
> lot queries which uses last, but there is no alternative in sql server.
> I used min/max but that did not gave me the right results. I need to know
> the last row in a 1-to-many table situation.
> Is there something like a hidden rowid i can use?
>|||Please post DDL and sample data so that we don't have to guess what
your table structure looks like:
http://www.aspfaq.com/etiquette.asp?id=5006
You'll aslo have to tell us what you mean by the "last row" there is no
fixed concept of first and last in a table because tables in SQL have
no inherent logical order.
David Portas
SQL Server MVP
--