I have a t-sql query that I need to execute weekly on three different
database servers. The same t-sql query will executed on all three database
servers.
I have created DTS package with the three different database servers.
Should I create database link to the different database servers with a user
account that has db_datareader privileges to the database that is linked?
Please help me with this process.
Thanks,
Hi
I preseume that in the DTS package you have a connection to the given
database server? What do you specify as the login? Whatever login is used,
the associated database user will need enough privileges to run your
query/procedure. This should be kept to a minimum so if you are only wanting
to return data from a give table select privilege on that table should be
enough; if you use a stored procedure then you would (hopefully) be able to
use ownership chains and therefore only execute permission on the given
procedure will be necessary.
HTH
John
"Joe K." wrote:
> I have a t-sql query that I need to execute weekly on three different
> database servers. The same t-sql query will executed on all three database
> servers.
> I have created DTS package with the three different database servers.
> Should I create database link to the different database servers with a user
> account that has db_datareader privileges to the database that is linked?
> Please help me with this process.
> Thanks,
Showing posts with label executed. Show all posts
Showing posts with label executed. Show all posts
Friday, March 23, 2012
Query From 3 Database Servers
I have a t-sql query that I need to execute weekly on three different
database servers. The same t-sql query will executed on all three database
servers.
I have created DTS package with the three different database servers.
Should I create database link to the different database servers with a user
account that has db_datareader privileges to the database that is linked?
Please help me with this process.
Thanks,Hi
I preseume that in the DTS package you have a connection to the given
database server? What do you specify as the login? Whatever login is used,
the associated database user will need enough privileges to run your
query/procedure. This should be kept to a minimum so if you are only wanting
to return data from a give table select privilege on that table should be
enough; if you use a stored procedure then you would (hopefully) be able to
use ownership chains and therefore only execute permission on the given
procedure will be necessary.
HTH
John
"Joe K." wrote:
> I have a t-sql query that I need to execute weekly on three different
> database servers. The same t-sql query will executed on all three databas
e
> servers.
> I have created DTS package with the three different database servers.
> Should I create database link to the different database servers with a use
r
> account that has db_datareader privileges to the database that is linked?
> Please help me with this process.
> Thanks,
database servers. The same t-sql query will executed on all three database
servers.
I have created DTS package with the three different database servers.
Should I create database link to the different database servers with a user
account that has db_datareader privileges to the database that is linked?
Please help me with this process.
Thanks,Hi
I preseume that in the DTS package you have a connection to the given
database server? What do you specify as the login? Whatever login is used,
the associated database user will need enough privileges to run your
query/procedure. This should be kept to a minimum so if you are only wanting
to return data from a give table select privilege on that table should be
enough; if you use a stored procedure then you would (hopefully) be able to
use ownership chains and therefore only execute permission on the given
procedure will be necessary.
HTH
John
"Joe K." wrote:
> I have a t-sql query that I need to execute weekly on three different
> database servers. The same t-sql query will executed on all three databas
e
> servers.
> I have created DTS package with the three different database servers.
> Should I create database link to the different database servers with a use
r
> account that has db_datareader privileges to the database that is linked?
> Please help me with this process.
> Thanks,
Wednesday, March 21, 2012
Query execution time using an ORMapper
Hello there!
I have a strange problem regarding the query execution time of a
parameterised query executed over sp_executesql. We use an ORMapper
(NHibernate) which generates the query, so it is not necessary to discuss the
use of sp_executesql. If I run the query in SQL Server Management Studio it
is much faster than executing it over the application. Looking at Profiler
the same query needs in MMS 6000 reads and 500 ms and over the application
nearly 200.000 reads and 30.000 ms.
I have no idea why this happens because the database doesnâ't change at all
and I profile on database level. So Iâ'm confused that it depends on the
execution source. The count of database sites in the data cache is constant
and the query plan cache is hit also in both executions.
Any ideas? Thanks
Rob"RobRoma" <RobRoma@.discussions.microsoft.com> wrote in message
news:EB7FF480-3C92-48AA-8867-FF2C30E55767@.microsoft.com...
> Hello there!
> I have a strange problem regarding the query execution time of a
> parameterised query executed over sp_executesql. We use an ORMapper
> (NHibernate) which generates the query, so it is not necessary to discuss
> the
> use of sp_executesql. If I run the query in SQL Server Management Studio
> it
> is much faster than executing it over the application. Looking at Profiler
> the same query needs in MMS 6000 reads and 500 ms and over the application
> nearly 200.000 reads and 30.000 ms.
> I have no idea why this happens because the database doesn't change at all
> and I profile on database level. So I'm confused that it depends on the
> execution source. The count of database sites in the data cache is
> constant
> and the query plan cache is hit also in both executions.
>
sp_executesql is fine, the issue is that a parameterized query is just
different than a non-parameterized one. You should expect a different plan
for expensive queries.
Test, analyze and optimize the query in Management Studio using
sp_executesql.
David
I have a strange problem regarding the query execution time of a
parameterised query executed over sp_executesql. We use an ORMapper
(NHibernate) which generates the query, so it is not necessary to discuss the
use of sp_executesql. If I run the query in SQL Server Management Studio it
is much faster than executing it over the application. Looking at Profiler
the same query needs in MMS 6000 reads and 500 ms and over the application
nearly 200.000 reads and 30.000 ms.
I have no idea why this happens because the database doesnâ't change at all
and I profile on database level. So Iâ'm confused that it depends on the
execution source. The count of database sites in the data cache is constant
and the query plan cache is hit also in both executions.
Any ideas? Thanks
Rob"RobRoma" <RobRoma@.discussions.microsoft.com> wrote in message
news:EB7FF480-3C92-48AA-8867-FF2C30E55767@.microsoft.com...
> Hello there!
> I have a strange problem regarding the query execution time of a
> parameterised query executed over sp_executesql. We use an ORMapper
> (NHibernate) which generates the query, so it is not necessary to discuss
> the
> use of sp_executesql. If I run the query in SQL Server Management Studio
> it
> is much faster than executing it over the application. Looking at Profiler
> the same query needs in MMS 6000 reads and 500 ms and over the application
> nearly 200.000 reads and 30.000 ms.
> I have no idea why this happens because the database doesn't change at all
> and I profile on database level. So I'm confused that it depends on the
> execution source. The count of database sites in the data cache is
> constant
> and the query plan cache is hit also in both executions.
>
sp_executesql is fine, the issue is that a parameterized query is just
different than a non-parameterized one. You should expect a different plan
for expensive queries.
Test, analyze and optimize the query in Management Studio using
sp_executesql.
David
Query execution time using an ORMapper
Hello there!
I have a strange problem regarding the query execution time of a
parameterised query executed over sp_executesql. We use an ORMapper
(NHibernate) which generates the query, so it is not necessary to discuss th
e
use of sp_executesql. If I run the query in SQL Server Management Studio it
is much faster than executing it over the application. Looking at Profiler
the same query needs in MMS 6000 reads and 500 ms and over the application
nearly 200.000 reads and 30.000 ms.
I have no idea why this happens because the database doesn’t change at all
and I profile on database level. So I’m confused that it depends on the
execution source. The count of database sites in the data cache is constant
and the query plan cache is hit also in both executions.
Any ideas? Thanks
Rob"RobRoma" <RobRoma@.discussions.microsoft.com> wrote in message
news:EB7FF480-3C92-48AA-8867-FF2C30E55767@.microsoft.com...
> Hello there!
> I have a strange problem regarding the query execution time of a
> parameterised query executed over sp_executesql. We use an ORMapper
> (NHibernate) which generates the query, so it is not necessary to discuss
> the
> use of sp_executesql. If I run the query in SQL Server Management Studio
> it
> is much faster than executing it over the application. Looking at Profiler
> the same query needs in MMS 6000 reads and 500 ms and over the application
> nearly 200.000 reads and 30.000 ms.
> I have no idea why this happens because the database doesn't change at all
> and I profile on database level. So I'm confused that it depends on the
> execution source. The count of database sites in the data cache is
> constant
> and the query plan cache is hit also in both executions.
>
sp_executesql is fine, the issue is that a parameterized query is just
different than a non-parameterized one. You should expect a different plan
for expensive queries.
Test, analyze and optimize the query in Management Studio using
sp_executesql.
David
I have a strange problem regarding the query execution time of a
parameterised query executed over sp_executesql. We use an ORMapper
(NHibernate) which generates the query, so it is not necessary to discuss th
e
use of sp_executesql. If I run the query in SQL Server Management Studio it
is much faster than executing it over the application. Looking at Profiler
the same query needs in MMS 6000 reads and 500 ms and over the application
nearly 200.000 reads and 30.000 ms.
I have no idea why this happens because the database doesn’t change at all
and I profile on database level. So I’m confused that it depends on the
execution source. The count of database sites in the data cache is constant
and the query plan cache is hit also in both executions.
Any ideas? Thanks
Rob"RobRoma" <RobRoma@.discussions.microsoft.com> wrote in message
news:EB7FF480-3C92-48AA-8867-FF2C30E55767@.microsoft.com...
> Hello there!
> I have a strange problem regarding the query execution time of a
> parameterised query executed over sp_executesql. We use an ORMapper
> (NHibernate) which generates the query, so it is not necessary to discuss
> the
> use of sp_executesql. If I run the query in SQL Server Management Studio
> it
> is much faster than executing it over the application. Looking at Profiler
> the same query needs in MMS 6000 reads and 500 ms and over the application
> nearly 200.000 reads and 30.000 ms.
> I have no idea why this happens because the database doesn't change at all
> and I profile on database level. So I'm confused that it depends on the
> execution source. The count of database sites in the data cache is
> constant
> and the query plan cache is hit also in both executions.
>
sp_executesql is fine, the issue is that a parameterized query is just
different than a non-parameterized one. You should expect a different plan
for expensive queries.
Test, analyze and optimize the query in Management Studio using
sp_executesql.
David
Wednesday, March 7, 2012
query cannot be executed
Hello. When I attempt to query a table I receive the
error from the SQL Enterprise Manager "The query cannot
be executed because some files are either missing or not
registered. Run setup again to make sure the required
files are regestered." This is the path that I use:
Enterprise Manager - sql server to attach to - select
database - select table - select to query all rows. Then
it looks like it is starting then the I get the error.
Please help!
I also have uninstalled & reinstalled the MDAC. Did not
correct it.
This is strange because it worked Friday & come back
Monday & it doesn't work?
I solved this problem by removing the registry key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Set up\ExceptionComponents
and reinstalling MDAC 2.8.
Egon.
"Pete Scalercio" <pscalercio@.3w-interactive.com> wrote in message news:<b67f01c47986$5d69f460$a601280a@.phx.gbl>...
> Hello. When I attempt to query a table I receive the
> error from the SQL Enterprise Manager "The query cannot
> be executed because some files are either missing or not
> registered. Run setup again to make sure the required
> files are regestered."
error from the SQL Enterprise Manager "The query cannot
be executed because some files are either missing or not
registered. Run setup again to make sure the required
files are regestered." This is the path that I use:
Enterprise Manager - sql server to attach to - select
database - select table - select to query all rows. Then
it looks like it is starting then the I get the error.
Please help!
I also have uninstalled & reinstalled the MDAC. Did not
correct it.
This is strange because it worked Friday & come back
Monday & it doesn't work?
I solved this problem by removing the registry key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Set up\ExceptionComponents
and reinstalling MDAC 2.8.
Egon.
"Pete Scalercio" <pscalercio@.3w-interactive.com> wrote in message news:<b67f01c47986$5d69f460$a601280a@.phx.gbl>...
> Hello. When I attempt to query a table I receive the
> error from the SQL Enterprise Manager "The query cannot
> be executed because some files are either missing or not
> registered. Run setup again to make sure the required
> files are regestered."
Subscribe to:
Posts (Atom)