Sunday, March 25, 2012
Calling remote Stored Procedure's
I am experiencing some difficulties when it comes to executing a SQL
Stored procedure on a remote SQL server.
I have two SQL servers.
1st Server: Named 'SQLServer' running on Win2k Server (SP4)
2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
When I try to execute the Stored Procedure 'Ten Most Expensive
Products' (from the Northwind database), from my client machine
(SQLClient), on the server machine (SQLServer).
For example.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=sa;PWD=;').[Northwind].[dbo].[Ten
Most Expensive Products]
I get the following error.
Server: Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'Ten Most Expensive Products' on remote
server 'SQLOLEDB'.
However if I simply query a table directly (from the remote machine
'SQLClient'), all works fine. For example, the Customers table from
the Northwind database.
select * from OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=sa;PWD=;').[Northwind].[dbo].Customers
I also tried executing the stored procedure from 'SQLServer', and that
worked fine too. eg.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQL;UID=sa;PWD=;').[Northwind].[dbo].[Ten
Most Expensive Products]
I think the problem may have something to do with RPC permissions. Can
anyone shed some light on why this doesn't work, and/or how to fix it.
Thanks in advance.
Rick 8-)Rick
EXEC sp_serveroption SERVER, 'data access' , 'true'
select *
from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products]')
Note: I assume you have already created linked server.
"Rick Knight" <knight_rjb@.yahoo.com.au> wrote in message
news:4b3eabf7.0411071804.6933fe62@.posting.google.com...
> Hi,
> I am experiencing some difficulties when it comes to executing a SQL
> Stored procedure on a remote SQL server.
> I have two SQL servers.
> 1st Server: Named 'SQLServer' running on Win2k Server (SP4)
> 2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
> When I try to execute the Stored Procedure 'Ten Most Expensive
> Products' (from the Northwind database), from my client machine
> (SQLClient), on the server machine (SQLServer).
> For example.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=sa;PWD=;').[Northwind].[dbo
].[Ten
> Most Expensive Products]
> I get the following error.
> Server: Msg 7212, Level 17, State 1, Line 1
> Could not execute procedure 'Ten Most Expensive Products' on remote
> server 'SQLOLEDB'.
> However if I simply query a table directly (from the remote machine
> 'SQLClient'), all works fine. For example, the Customers table from
> the Northwind database.
> select * from
OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=sa;PWD=;').[Northwind].[dbo
].Customers
> I also tried executing the stored procedure from 'SQLServer', and that
> worked fine too. eg.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQL;UID=sa;PWD=;').[Northwind].[dbo].[Ten
> Most Expensive Products]
> I think the problem may have something to do with RPC permissions. Can
> anyone shed some light on why this doesn't work, and/or how to fix it.
> Thanks in advance.
> Rick 8-)|||Hi,
Maybe I should give some background on the problem. I discovered a
problem when trying to get data to replicate from the Subscriber back
to the Publisher. I was able to determine that the Subscribers update
trigger (trg_MSsync_upd_<tablename>) was failing to execute the Update
Stored Procedure (sp_MSsync_upd_<tablename>_1) on the Publisher.
I used the Profiler, and determined that the trigger was failing when
executing the command;
exec @.retcode = OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=sa;PWD=;').[<databasename>].[dbo].[sp_MSsync_del_<tablename>_1]'
...
And since I didn't want to re-code the triggers automatically created
by SQL, I tried to figure out why the execution of the remote stored
procedure wasn't working.
BTW: With regard to my original post, I found out that if I try and
execute a Stored Procedure from Server (SQLServer) to the client
(SQLClient), it worked fine. So the only problem is going from Client
to Server!
I hope this sheds more light on the problem.
Thanks in advance.
Rick 8-)
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:<#l31CxVxEHA.1392@.tk2msftngp13.phx.gbl>...
> Rick
> EXEC sp_serveroption SERVER, 'data access' , 'true'
> select *
> from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products]')
> Note: I assume you have already created linked server.
>
Calling remote Stored Procedure's
I am experiencing some difficulties when it comes to executing a SQL
Stored procedure on a remote SQL server.
I have two SQL servers.
1st Server: Named 'SQLServer' running on Win2k Server (SP4)
2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
When I try to execute the Stored Procedure 'Ten Most Expensive
Products' (from the Northwind database), from my client machine
(SQLClient), on the server machine (SQLServer).
For example.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQLSe
rver;UID=sa;PWD=;').[Nor
thwind].[dbo].[Ten
Most Expensive Products]
I get the following error.
Server: Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'Ten Most Expensive Products' on remote
server 'SQLOLEDB'.
However if I simply query a table directly (from the remote machine
'SQLClient'), all works fine. For example, the Customers table from
the Northwind database.
select * from OpenDataSource('SQLOLEDB',N'SERVER=SQLSe
rver;UID=sa;PWD=;').
91;Northwind].[dbo].Customers
I also tried executing the stored procedure from 'SQLServer', and that
worked fine too. eg.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQL;U
ID=sa;PWD=;').[Northwind
].[dbo].[Ten
Most Expensive Products]
I think the problem may have something to do with RPC permissions. Can
anyone shed some light on why this doesn't work, and/or how to fix it.
Thanks in advance.
Rick 8-)Rick
EXEC sp_serveroption SERVER, 'data access' , 'true'
select *
from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products]'
)
Note: I assume you have already created linked server.
"Rick Knight" <knight_rjb@.yahoo.com.au> wrote in message
news:4b3eabf7.0411071804.6933fe62@.posting.google.com...
> Hi,
> I am experiencing some difficulties when it comes to executing a SQL
> Stored procedure on a remote SQL server.
> I have two SQL servers.
> 1st Server: Named 'SQLServer' running on Win2k Server (SP4)
> 2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
> When I try to execute the Stored Procedure 'Ten Most Expensive
> Products' (from the Northwind database), from my client machine
> (SQLClient), on the server machine (SQLServer).
> For example.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQLSe
rver;UID=sa;PWD=;').[Northwind].
[dbo
].[Ten
> Most Expensive Products]
> I get the following error.
> Server: Msg 7212, Level 17, State 1, Line 1
> Could not execute procedure 'Ten Most Expensive Products' on remote
> server 'SQLOLEDB'.
> However if I simply query a table directly (from the remote machine
> 'SQLClient'), all works fine. For example, the Customers table from
> the Northwind database.
> select * from
OpenDataSource('SQLOLEDB',N'SERVER=SQLSe
rver;UID=sa;PWD=;').[Northwind].
[dbo
].Customers
> I also tried executing the stored procedure from 'SQLServer', and that
> worked fine too. eg.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQL;U
ID=sa;PWD=;').[Northwind].[dbo].[Ten[vbc
ol=seagreen]
> Most Expensive Products]
> I think the problem may have something to do with RPC permissions. Can
> anyone shed some light on why this doesn't work, and/or how to fix it.
> Thanks in advance.
> Rick 8-)[/vbcol]|||Hi,
Maybe I should give some background on the problem. I discovered a
problem when trying to get data to replicate from the Subscriber back
to the Publisher. I was able to determine that the Subscribers update
trigger (trg_MSsync_upd_<tablename> ) was failing to execute the Update
Stored Procedure (sp_MSsync_upd_<tablename>_1) on the Publisher.
I used the Profiler, and determined that the trigger was failing when
executing the command;
exec @.retcode = OpenDataSource('SQLOLEDB',N'SERVER=SQLSe
rver;UID=sa;PWD=;').
[<databasename>].[dbo].[sp_MSsync_del_<tablename>_1]'
...
And since I didn't want to re-code the triggers automatically created
by SQL, I tried to figure out why the execution of the remote stored
procedure wasn't working.
BTW: With regard to my original post, I found out that if I try and
execute a Stored Procedure from Server (SQLServer) to the client
(SQLClient), it worked fine. So the only problem is going from Client
to Server!
I hope this sheds more light on the problem.
Thanks in advance.
Rick 8-)
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:<#l31CxVxEHA.1392@.tk2msftngp13.phx.gbl
>...
> Rick
> EXEC sp_serveroption SERVER, 'data access' , 'true'
> select *
> from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products
]')
> Note: I assume you have already created linked server.
>sql
Calling remote Stored Procedure's
I am experiencing some difficulties when it comes to executing a SQL
Stored procedure on a remote SQL server.
I have two SQL servers.
1st Server: Named 'SQLServer' running on Win2k Server (SP4)
2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
When I try to execute the Stored Procedure 'Ten Most Expensive
Products' (from the Northwind database), from my client machine
(SQLClient), on the server machine (SQLServer).
For example.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=s a;PWD=;').[Northwind].[dbo].[Ten
Most Expensive Products]
I get the following error.
Server: Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'Ten Most Expensive Products' on remote
server 'SQLOLEDB'.
However if I simply query a table directly (from the remote machine
'SQLClient'), all works fine. For example, the Customers table from
the Northwind database.
select * from OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=s a;PWD=;').[Northwind].[dbo].Customers
I also tried executing the stored procedure from 'SQLServer', and that
worked fine too. eg.
execute OpenDataSource('SQLOLEDB',N'SERVER=SQL;UID=sa;PWD= ;').[Northwind].[dbo].[Ten
Most Expensive Products]
I think the problem may have something to do with RPC permissions. Can
anyone shed some light on why this doesn't work, and/or how to fix it.
Thanks in advance.
Rick 8-)
Rick
EXEC sp_serveroption SERVER, 'data access' , 'true'
select *
from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products]')
Note: I assume you have already created linked server.
"Rick Knight" <knight_rjb@.yahoo.com.au> wrote in message
news:4b3eabf7.0411071804.6933fe62@.posting.google.c om...
> Hi,
> I am experiencing some difficulties when it comes to executing a SQL
> Stored procedure on a remote SQL server.
> I have two SQL servers.
> 1st Server: Named 'SQLServer' running on Win2k Server (SP4)
> 2nd Server: Named 'SQLClient' running on Win2k Profession (SP4)
> When I try to execute the Stored Procedure 'Ten Most Expensive
> Products' (from the Northwind database), from my client machine
> (SQLClient), on the server machine (SQLServer).
> For example.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=s a;PWD=;').[Northwind].[dbo
].[Ten
> Most Expensive Products]
> I get the following error.
> Server: Msg 7212, Level 17, State 1, Line 1
> Could not execute procedure 'Ten Most Expensive Products' on remote
> server 'SQLOLEDB'.
> However if I simply query a table directly (from the remote machine
> 'SQLClient'), all works fine. For example, the Customers table from
> the Northwind database.
> select * from
OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=s a;PWD=;').[Northwind].[dbo
].Customers
> I also tried executing the stored procedure from 'SQLServer', and that
> worked fine too. eg.
> execute
OpenDataSource('SQLOLEDB',N'SERVER=SQL;UID=sa;PWD= ;').[Northwind].[dbo].[Ten
> Most Expensive Products]
> I think the problem may have something to do with RPC permissions. Can
> anyone shed some light on why this doesn't work, and/or how to fix it.
> Thanks in advance.
> Rick 8-)
|||Hi,
Maybe I should give some background on the problem. I discovered a
problem when trying to get data to replicate from the Subscriber back
to the Publisher. I was able to determine that the Subscribers update
trigger (trg_MSsync_upd_<tablename>) was failing to execute the Update
Stored Procedure (sp_MSsync_upd_<tablename>_1) on the Publisher.
I used the Profiler, and determined that the trigger was failing when
executing the command;
exec @.retcode = OpenDataSource('SQLOLEDB',N'SERVER=SQLServer;UID=s a;PWD=;').[<databasename>].[dbo].[sp_MSsync_del_<tablename>_1]'
...
And since I didn't want to re-code the triggers automatically created
by SQL, I tried to figure out why the execution of the remote stored
procedure wasn't working.
BTW: With regard to my original post, I found out that if I try and
execute a Stored Procedure from Server (SQLServer) to the client
(SQLClient), it worked fine. So the only problem is going from Client
to Server!
I hope this sheds more light on the problem.
Thanks in advance.
Rick 8-)
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:<#l31CxVxEHA.1392@.tk2msftngp13.phx.gbl>...
> Rick
> EXEC sp_serveroption SERVER, 'data access' , 'true'
> select *
> from OPENQUERY(SERVER,'exec Northwind.dbo.[Ten Most Expensive Products]')
> Note: I assume you have already created linked server.
>
Saturday, February 25, 2012
Calendar slow to load
Is anyone else experiencing performance problems with reports that use the calendar control for date parameters? Whenever we load a report that uses a calendar it takes several seconds to fully load the form (you can see something like this in the status bar:"...ReportViewerWebControl.axd?OpType=Calendar..."). This is not a serious problem, but if the user tries to use the control before it fully loads then the page throws javascript errors. I am wondering if this is a issue with the report itself or the server configuration, or if it is just something we have to live with.
The calendar control works by loading a years worth of dates to allow you to browse through the months more quickly. This is not a overly large amount of data and I have not seen it take a significant amount of time myself. The is, however, no way to change the behavior of this control. Things that might cause this behavior are a slow network connection or a slow server, however you would notice everything having longer load times then.
-Daniel
|||I have a new RS2005 server in production and the speed at which the calendar control loads is also painfully slow.
On the initial rounds of testing it was so slow that my Business Analysts / QA person reported *bugs* with the calendar control refreshing the page or displaying blank and so forth.
Is there a way to limit how much date information it pulls down initially or to possibly build a custom control based on the out of the box control and then limit the date range loaded by default?
For my users at least the date range is going to be from minus 3 months to present for about 95% of the runs.
|||Just to add to this, I have the same problem, I thought it was a bug too but there doesnt seem to be a way of fixing this....at least none that I know of.|||We have the same problem with calendar control. I have a filter with a date that should be greater than a value given by the user in the report. If I have a default value on the date the report loads very slow, in about 10 seconds. When I change the value in the report and click view report it still load slow.
On the other hand if I dont give a default value in the filter the report loads within 2 seconds. It also loads within seconds if I change the value in the report?
Any suggestions?
/Stefan
|||I wonder if this isn't related to bugs in the control?
The two behaviors I notice are an incredible amount of sluggishness associated with having a default value and that each time you change the value it makes a server round-trip even though you haven't clicked on the View Report button.
|||Can you file a bug on this issue along with your report definition that makes this happen? When you do so, please include infomration on the SQL Server Reporting Services version you're using and what browser and it's version you're using.
You can file the bug here: http://lab.msdn.microsoft.com/productfeedback/
When you have an expression based default value, we need to do a round trip to the server to determine the new value for the parameter. If the parameter depends on a previous parameter, whenever you change the upstream parameter we'll do a round trip. What I'd like to know is if the slowness persists if you were to substitute a string parameter for your datatime parameter. If it does, it is probably that the server is taking a long time to process your request - is it adequately resourced for the work load? Otherwise it might be specific to the data picker control.
Hope that helps,
-Lukasz
Calendar slow to load
Is anyone else experiencing performance problems with reports that use the calendar control for date parameters? Whenever we load a report that uses a calendar it takes several seconds to fully load the form (you can see something like this in the status bar:"...ReportViewerWebControl.axd?OpType=Calendar..."). This is not a serious problem, but if the user tries to use the control before it fully loads then the page throws javascript errors. I am wondering if this is a issue with the report itself or the server configuration, or if it is just something we have to live with.
The calendar control works by loading a years worth of dates to allow you to browse through the months more quickly. This is not a overly large amount of data and I have not seen it take a significant amount of time myself. The is, however, no way to change the behavior of this control. Things that might cause this behavior are a slow network connection or a slow server, however you would notice everything having longer load times then.
-Daniel
|||I have a new RS2005 server in production and the speed at which the calendar control loads is also painfully slow.
On the initial rounds of testing it was so slow that my Business Analysts / QA person reported *bugs* with the calendar control refreshing the page or displaying blank and so forth.
Is there a way to limit how much date information it pulls down initially or to possibly build a custom control based on the out of the box control and then limit the date range loaded by default?
For my users at least the date range is going to be from minus 3 months to present for about 95% of the runs.
|||Just to add to this, I have the same problem, I thought it was a bug too but there doesnt seem to be a way of fixing this....at least none that I know of.|||We have the same problem with calendar control. I have a filter with a date that should be greater than a value given by the user in the report. If I have a default value on the date the report loads very slow, in about 10 seconds. When I change the value in the report and click view report it still load slow.
On the other hand if I dont give a default value in the filter the report loads within 2 seconds. It also loads within seconds if I change the value in the report?
Any suggestions?
/Stefan
|||I wonder if this isn't related to bugs in the control?
The two behaviors I notice are an incredible amount of sluggishness associated with having a default value and that each time you change the value it makes a server round-trip even though you haven't clicked on the View Report button.
|||Can you file a bug on this issue along with your report definition that makes this happen? When you do so, please include infomration on the SQL Server Reporting Services version you're using and what browser and it's version you're using.
You can file the bug here: http://lab.msdn.microsoft.com/productfeedback/
When you have an expression based default value, we need to do a round trip to the server to determine the new value for the parameter. If the parameter depends on a previous parameter, whenever you change the upstream parameter we'll do a round trip. What I'd like to know is if the slowness persists if you were to substitute a string parameter for your datatime parameter. If it does, it is probably that the server is taking a long time to process your request - is it adequately resourced for the work load? Otherwise it might be specific to the data picker control.
Hope that helps,
-Lukasz
Calendar slow to load
Is anyone else experiencing performance problems with reports that use the calendar control for date parameters? Whenever we load a report that uses a calendar it takes several seconds to fully load the form (you can see something like this in the status bar:"...ReportViewerWebControl.axd?OpType=Calendar..."). This is not a serious problem, but if the user tries to use the control before it fully loads then the page throws javascript errors. I am wondering if this is a issue with the report itself or the server configuration, or if it is just something we have to live with.
The calendar control works by loading a years worth of dates to allow you to browse through the months more quickly. This is not a overly large amount of data and I have not seen it take a significant amount of time myself. The is, however, no way to change the behavior of this control. Things that might cause this behavior are a slow network connection or a slow server, however you would notice everything having longer load times then.
-Daniel
|||I have a new RS2005 server in production and the speed at which the calendar control loads is also painfully slow.
On the initial rounds of testing it was so slow that my Business Analysts / QA person reported *bugs* with the calendar control refreshing the page or displaying blank and so forth.
Is there a way to limit how much date information it pulls down initially or to possibly build a custom control based on the out of the box control and then limit the date range loaded by default?
For my users at least the date range is going to be from minus 3 months to present for about 95% of the runs.
|||Just to add to this, I have the same problem, I thought it was a bug too but there doesnt seem to be a way of fixing this....at least none that I know of.|||We have the same problem with calendar control. I have a filter with a date that should be greater than a value given by the user in the report. If I have a default value on the date the report loads very slow, in about 10 seconds. When I change the value in the report and click view report it still load slow.
On the other hand if I dont give a default value in the filter the report loads within 2 seconds. It also loads within seconds if I change the value in the report?
Any suggestions?
/Stefan
|||I wonder if this isn't related to bugs in the control?
The two behaviors I notice are an incredible amount of sluggishness associated with having a default value and that each time you change the value it makes a server round-trip even though you haven't clicked on the View Report button.
|||Can you file a bug on this issue along with your report definition that makes this happen? When you do so, please include infomration on the SQL Server Reporting Services version you're using and what browser and it's version you're using.
You can file the bug here: http://lab.msdn.microsoft.com/productfeedback/
When you have an expression based default value, we need to do a round trip to the server to determine the new value for the parameter. If the parameter depends on a previous parameter, whenever you change the upstream parameter we'll do a round trip. What I'd like to know is if the slowness persists if you were to substitute a string parameter for your datatime parameter. If it does, it is probably that the server is taking a long time to process your request - is it adequately resourced for the work load? Otherwise it might be specific to the data picker control.
Hope that helps,
-Lukasz