Showing posts with label generates. Show all posts
Showing posts with label generates. Show all posts

Friday, March 30, 2012

OPENQUERY problem with dynamic result set

I am having a problem with OPENQUERY in SQL2005.
SELECT * FROM OPENQUERY(MySQLServer, 'EXEC myProc')
This generates an error along the lines of:
The OLE DB provider "SQLNCLI" for linked server "MySQLServer" indicates
that either the object has no columns or the current user does not have
permissions on that object.
I am pretty sure this is becuase my procedure returns a dynamic
resultset with a dynamic number of columns.
I have tried prefacing the EXEC call with SET FMTONLY OFF as per some
other suggestions; however, I still get the same error. I am guessing
possibly, becuase my procedure in turn calls another dynamically
executed OPENQUERY MDX query against an OLAP data source.
The whole reason I am doing this is becuase I need to get the results
of the stored procedure into a table for further manipulation.
Modifying the underlying procedures is not really an option.
My procedure returns a dynamic number of columns so I can't create a
temp table ahead of time to stick the results into.
I have been going around in circles for a while on this one. Any
advice would be much appreciated.Hi
If you granted EXECUTE permission to stored procedure which performs dynamic
sql , it will not be enough , you'll have to grant permissions on the
object/ underlaying tables
However , in SQL Server 2005 you are be able to perfom EXECUTE AS ( If I
remember well) as more power user
<jalbenberg@.yahoo.com> wrote in message
news:1148426602.112398.67180@.i39g2000cwa.googlegroups.com...
>I am having a problem with OPENQUERY in SQL2005.
> SELECT * FROM OPENQUERY(MySQLServer, 'EXEC myProc')
> This generates an error along the lines of:
> The OLE DB provider "SQLNCLI" for linked server "MySQLServer" indicates
> that either the object has no columns or the current user does not have
> permissions on that object.
> I am pretty sure this is becuase my procedure returns a dynamic
> resultset with a dynamic number of columns.
> I have tried prefacing the EXEC call with SET FMTONLY OFF as per some
> other suggestions; however, I still get the same error. I am guessing
> possibly, becuase my procedure in turn calls another dynamically
> executed OPENQUERY MDX query against an OLAP data source.
> The whole reason I am doing this is becuase I need to get the results
> of the stored procedure into a table for further manipulation.
> Modifying the underlying procedures is not really an option.
> My procedure returns a dynamic number of columns so I can't create a
> temp table ahead of time to stick the results into.
> I have been going around in circles for a while on this one. Any
> advice would be much appreciated.
>|||Sorry if my post was misleading. This is not a permissions issue - the
queries run fine outside of the OPENQUERY context.
The problem is the dynamic recordset that comes back with an unknown
number of columns, so OPENQUERY cannot properly prepare the statement.

OPENQUERY problem with dynamic result set

I am having a problem with OPENQUERY in SQL2005.
SELECT * FROM OPENQUERY(MySQLServer, 'EXEC myProc')
This generates an error along the lines of:
The OLE DB provider "SQLNCLI" for linked server "MySQLServer" indicates
that either the object has no columns or the current user does not have
permissions on that object.
I am pretty sure this is becuase my procedure returns a dynamic
resultset with a dynamic number of columns.
I have tried prefacing the EXEC call with SET FMTONLY OFF as per some
other suggestions; however, I still get the same error. I am guessing
possibly, becuase my procedure in turn calls another dynamically
executed OPENQUERY MDX query against an OLAP data source.
The whole reason I am doing this is becuase I need to get the results
of the stored procedure into a table for further manipulation.
Modifying the underlying procedures is not really an option.
My procedure returns a dynamic number of columns so I can't create a
temp table ahead of time to stick the results into.
I have been going around in circles for a while on this one. Any
advice would be much appreciated.Hi
If you granted EXECUTE permission to stored procedure which performs dynamic
sql , it will not be enough , you'll have to grant permissions on the
object/ underlaying tables
However , in SQL Server 2005 you are be able to perfom EXECUTE AS ( If I
remember well) as more power user
<jalbenberg@.yahoo.com> wrote in message
news:1148426602.112398.67180@.i39g2000cwa.googlegroups.com...
>I am having a problem with OPENQUERY in SQL2005.
> SELECT * FROM OPENQUERY(MySQLServer, 'EXEC myProc')
> This generates an error along the lines of:
> The OLE DB provider "SQLNCLI" for linked server "MySQLServer" indicates
> that either the object has no columns or the current user does not have
> permissions on that object.
> I am pretty sure this is becuase my procedure returns a dynamic
> resultset with a dynamic number of columns.
> I have tried prefacing the EXEC call with SET FMTONLY OFF as per some
> other suggestions; however, I still get the same error. I am guessing
> possibly, becuase my procedure in turn calls another dynamically
> executed OPENQUERY MDX query against an OLAP data source.
> The whole reason I am doing this is becuase I need to get the results
> of the stored procedure into a table for further manipulation.
> Modifying the underlying procedures is not really an option.
> My procedure returns a dynamic number of columns so I can't create a
> temp table ahead of time to stick the results into.
> I have been going around in circles for a while on this one. Any
> advice would be much appreciated.
>|||Sorry if my post was misleading. This is not a permissions issue - the
queries run fine outside of the OPENQUERY context.
The problem is the dynamic recordset that comes back with an unknown
number of columns, so OPENQUERY cannot properly prepare the statement.sql

Wednesday, March 28, 2012

Opening up SQL 2005 Management studio generates Winmgmt error

I have been getting the following winmgmt error in my application event log
when I connect to a clustered SQL 2005 server using SQL Management Studio.
Has anyone ever encountered this and does anyone know how to stop this?
Event filter with query "select * from __InstanceModificationEvent within 10
where TargetInstance isa 'Win32_Service'" could not be (re)activated in
namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
0x80041010. Events may not be delivered through this filter until the
problem is corrected.
Thanks
I have the same error. It appears mmc cannot connect to wmi class.
"Steven" wrote:

> I have been getting the following winmgmt error in my application event log
> when I connect to a clustered SQL 2005 server using SQL Management Studio.
> Has anyone ever encountered this and does anyone know how to stop this?
> Event filter with query "select * from __InstanceModificationEvent within 10
> where TargetInstance isa 'Win32_Service'" could not be (re)activated in
> namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
> 0x80041010. Events may not be delivered through this filter until the
> problem is corrected.
> Thanks
>
>
>
>
>

Opening up SQL 2005 Management studio generates Winmgmt error

I have been getting the following winmgmt error in my application event log
when I connect to a clustered SQL 2005 server using SQL Management Studio.
Has anyone ever encountered this and does anyone know how to stop this?
Event filter with query "select * from __InstanceModificationEvent within 10
where TargetInstance isa 'Win32_Service'" could not be (re)activated in
namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
0x80041010. Events may not be delivered through this filter until the
problem is corrected.
ThanksI have the same error. It appears mmc cannot connect to wmi class.
"Steven" wrote:
> I have been getting the following winmgmt error in my application event log
> when I connect to a clustered SQL 2005 server using SQL Management Studio.
> Has anyone ever encountered this and does anyone know how to stop this?
> Event filter with query "select * from __InstanceModificationEvent within 10
> where TargetInstance isa 'Win32_Service'" could not be (re)activated in
> namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
> 0x80041010. Events may not be delivered through this filter until the
> problem is corrected.
> Thanks
>
>
>
>
>sql

Opening up SQL 2005 Management studio generates Winmgmt error

I have been getting the following winmgmt error in my application event log
when I connect to a clustered SQL 2005 server using SQL Management Studio.
Has anyone ever encountered this and does anyone know how to stop this?
Event filter with query "select * from __InstanceModificationEvent within 10
where TargetInstance ISA 'Win32_Service'" could not be (re)activated in
namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
0x80041010. Events may not be delivered through this filter until the
problem is corrected.
ThanksI have the same error. It appears mmc cannot connect to wmi class.
"Steven" wrote:

> I have been getting the following winmgmt error in my application event lo
g
> when I connect to a clustered SQL 2005 server using SQL Management Studio.
> Has anyone ever encountered this and does anyone know how to stop this?
> Event filter with query "select * from __InstanceModificationEvent within
10
> where TargetInstance ISA 'Win32_Service'" could not be (re)activated in
> namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of err
or
> 0x80041010. Events may not be delivered through this filter until the
> problem is corrected.
> Thanks
>
>
>
>
>

Opening up SQL 2005 Management studio generates Winmgmt erro

I have been getting the following winmgmt error in my application event log
when I connect to a clustered SQL 2005 server using SQL Management Studio.
Has anyone ever encountered this and does anyone know how to stop this?

Event filter with query "select * from __InstanceModificationEvent within 10
where TargetInstance isa 'Win32_Service'" could not be (re)activated in
namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
0x80041010. Events may not be delivered through this filter until the
problem is corrected.

ThanksI have the same problem any help would be appreciated :D
|||

We get the same "select *" error message and found that it was probably resulting from a unisys sentinel script; practically the exact verbage could be found in several such .vbs scripts. Certainly some event is triggered and the sentinel software attempts to run one of the scripts and fails. The failure may be due to the sentinel software trying to perform a sql2000 task on a sql2005 server. We're still hunting for an exact cause though.

I hope that this points you in the right direction for your particular case.

Opening up SQL 2005 Management studio generates Winmgmt erro

I have been getting the following winmgmt error in my application event log
when I connect to a clustered SQL 2005 server using SQL Management Studio.
Has anyone ever encountered this and does anyone know how to stop this?

Event filter with query "select * from __InstanceModificationEvent within 10
where TargetInstance isa 'Win32_Service'" could not be (re)activated in
namespace "//./root/Microsoft/SqlServer/ComputerManagement" because of error
0x80041010. Events may not be delivered through this filter until the
problem is corrected.

ThanksI have the same problem any help would be appreciated :D|||

We get the same "select *" error message and found that it was probably resulting from a unisys sentinel script; practically the exact verbage could be found in several such .vbs scripts. Certainly some event is triggered and the sentinel software attempts to run one of the scripts and fails. The failure may be due to the sentinel software trying to perform a sql2000 task on a sql2005 server. We're still hunting for an exact cause though.

I hope that this points you in the right direction for your particular case.

Tuesday, March 20, 2012

Open Report in PDF

How can I force ReportViewer to open a report as a PDF automatically? Using
the Format=PDF in the properties menu generates a PDF report, but it opens
in Acrobat causing an extra step for the user. In Crystal Reports there is
an ExportType function that allows the Viewer to open a PDF directly. Does
SRS offer a similar function?
ThanksWhat do you mean by "extra step"?|||Instead of asking me if I want to Open or Save the PDF file, I want it to
open directly in the Report Viewer.
"Sorcerdon" <sorcerdon@.gmail.com> wrote in message
news:1140011264.479730.172910@.g47g2000cwa.googlegroups.com...
> What do you mean by "extra step"?
>

Open PDF in Web Browser

Hi,
I've got a report that I invoke from within Javascript using a direct
URL hit to the report. When the report generates it asks to either
"Open" or "Save" the PDF file. When I click on Open it opens Acrobat
Reader to view the file.
I need the report to open within the same browser as the javascript
that kicked it off without any prompts.
Is this possible in Reporting Services?
Regards,
Graham Richter.Hi
Are you wanting it still to be pdf and just open with the plugin? Or
otherwise render it as html.