Wednesday, March 7, 2012
Another Deployment Question
works fine. However we often have to deploy to clients where there is a
firewall with no ports open. We do have Remote Desktop Connection access
and need to deploy reports and datasources by transfering files. (restoring
the entire ReportService database is not granular enough).
We can export and import .rdl files but we cannot find a way to do the same
with Datasources. I know that a datasource .rds file is a brief xml file
that looks like this...
<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>DataSource1</Name>
<DataSourceID>6aac99b7-1658-479f-be09-fbcb874dbe04</DataSourceID>
<ConnectionProperties>
<Extension>SQL</Extension>
<ConnectString>Data Source=(local);Initial
Catalog=MyApplication</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</RptDataSource>
So it's basically just a connection string with a GUID in it.
How can we deploy Datasources via file transfer? Or is there a better way
in which to deploy reports and datasources to other ReportServer instances
that are behind firewalls.
Thanks,
GaryHello Gary,
As for the ReportServer, currently it can only import report through file
uploading (by provide the report's rdl file). DataSource doesn't support
such importing. And the "rds" file is only used in development environment
(the BI studio or Visual Studio). However, we can use the "rs.exe" utility
to execute script to deploy SSRS report or datasource. The following BOL
reference has provided description and sample on scripting SSRS report and
datasource...
#Scripting Deployment and Administrative Tasks
http://msdn2.microsoft.com/en-us/library/ms159720.aspx
#Script Samples (Reporting Services)
http://msdn2.microsoft.com/en-us/library/ms160854.aspx
The following script block is the one used for creating datasource in the
sample script
=========Public Sub CreateSampleDataSource(name As String, extension As String,
connectionString As String)
'Define the data source definition.
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = connectionString
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = extension
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = True
'Use the default prompt string.
definition.Prompt = Nothing
definition.WindowsCredentials = False
Try
rs.CreateDataSource(name, parentPath, False, definition, Nothing)
Console.WriteLine("Data source {0} created successfully", name)
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
===========
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Steven
Now that I understand thet the "rds" is only used in the dev environment it
looks like export/import is the way to go when we are limited to file
transfer.
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:tHvKqMmqGHA.5740@.TK2MSFTNGXA01.phx.gbl...
> Hello Gary,
> As for the ReportServer, currently it can only import report through file
> uploading (by provide the report's rdl file). DataSource doesn't support
> such importing. And the "rds" file is only used in development environment
> (the BI studio or Visual Studio). However, we can use the "rs.exe"
> utility
> to execute script to deploy SSRS report or datasource. The following BOL
> reference has provided description and sample on scripting SSRS report and
> datasource...
>
> #Scripting Deployment and Administrative Tasks
> http://msdn2.microsoft.com/en-us/library/ms159720.aspx
> #Script Samples (Reporting Services)
> http://msdn2.microsoft.com/en-us/library/ms160854.aspx
> The following script block is the one used for creating datasource in the
> sample script
> =========> Public Sub CreateSampleDataSource(name As String, extension As String,
> connectionString As String)
> 'Define the data source definition.
> Dim definition As New DataSourceDefinition()
> definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
> definition.ConnectString = connectionString
> definition.Enabled = True
> definition.EnabledSpecified = True
> definition.Extension = extension
> definition.ImpersonateUser = False
> definition.ImpersonateUserSpecified = True
> 'Use the default prompt string.
> definition.Prompt = Nothing
> definition.WindowsCredentials = False
> Try
> rs.CreateDataSource(name, parentPath, False, definition, Nothing)
> Console.WriteLine("Data source {0} created successfully", name)
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
>
> End Sub
> ===========> Hope this helps.
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Thanks for your response Gary,
If you have any further question later, please feel free to post in the
newsgroup.
Have a good day!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Saturday, February 25, 2012
Anonymous access
Reports, but I've seen suggestions for work arounds. What are the best
options for allowing Users access to Reports Services from a different
domain, apart from requiring them to enter user credentials every time
they point their browser at the ReportsServer. There seems to be
suggestions that with some tweaking Anonymous users can run reports.
I'm invoking reports from a C# desktop app by building the url - is
there some way to pass the credentials in the url? I know how to
generate reports entirely from C# code(and pass credentials), but that
loses the interactive functionality of the browser interface...
brian smithThis doesn't completely answer your question but it does address "anonymous
access"
http://devguy.com/bb/viewtopic.php?p=1773
> I'm invoking reports from a C# desktop app by building the url - is there
> some way to pass the credentials in the url?
Not trivially.
"Brian Smith" <bsmith@.NO.SPAM.schemiotics.co.uk> wrote in message
news:O15zpaO8FHA.3636@.TK2MSFTNGP09.phx.gbl...
> Officially the line seems to be that only accredited users can access
> Reports, but I've seen suggestions for work arounds. What are the best
> options for allowing Users access to Reports Services from a different
> domain, apart from requiring them to enter user credentials every time
> they point their browser at the ReportsServer. There seems to be
> suggestions that with some tweaking Anonymous users can run reports.
> I'm invoking reports from a C# desktop app by building the url - is there
> some way to pass the credentials in the url? I know how to generate
> reports entirely from C# code(and pass credentials), but that loses the
> interactive functionality of the browser interface...
> brian smith
Sunday, February 19, 2012
Analyzing a Query in SQL Server
For each report I have a Stored Procedure and a View. The View's SQL code is identical to the Stored Procedure except that the two input parameters (startDate and endDate) are removed because Views don't allow parameters.
Some of the reports work perfectly right off the bat. But others are timing out. My initial test of the timing out is to just display the View. If it fails then I know that the the report engine will fail too.
So now I'm trying out the SQL Query Analyzer tool to execute the code in one of the Views. It's now at 29 minutes and still going - at least it hasn't timed out!
My question is this: Is there a way I could examine what's going on with the query to see why it's taking so long?
Robert WernerHave a look at the query execution plan in the query analyzer, do you see any bottlenecks there ? During execution you might encounter a deadlock. looking in the appropiate node in SQL Server Enterprise Manager (Current Activity) you might be able to find the blocking process.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||Jens,
Thank you for your suggestion. I've never used that Execution Plan before so just tried it out on one of the queries that's timing out. I took the liberty of taking a screen capture and posting it here:
http://pocketpollster.com/downloads/public/WBMCST11_Execution_Plan.jpg
Does this communicate anything to you?
Robert Werner
Vancouver, BC|||THe information which is sensitive while moving over the individual objects is missing for us, so its hard to tell. This is the estimated execution plan not the actual executed one, but as a rule of thumb you should have a look on the highest cost in the plan as well as actions like table scans. They are often costly if made for huge tables but are on the opposite cheaper then using indexes in smaller tables. There are some other thing you could check like setting the STATISTICS_IO to on or the SHOWPLAN to make the execution plan shippable to other peers with more information.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Thursday, February 16, 2012
Analysis Services Rolling Date reports
stumped on a date issue.
How can I run a report which selects the last 7 days worth of data and rolls
forward each week? I've tried using an MDX query with the Tail funtion.
This pulls the last date which has data in it. (Effectively yesterday's
date) When I run it in MDX builder it gives me the desired results. However
when I use it in VS.Net to build my report, it pulls the last 7 days over,
but it's static and doesn't roll forward.
I can make a report with a date drop down parameter which is described in
the AS and RS article on Technet, but I'd really like the parameter to be
automatically selected based off of the date when the report is run.
My date formats in my cube are [Year].[Quarter].[Month].[Day]
Can anybody help me with this?
Thanks, MattTry setting defaults for your start and end date parameters. For
example, you can set the end date to
DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") and the start date to
DateTime.Now.AddDays(-7).ToString("MM/dd/yyyy"). When you see the
parameters in subscription creation, it may look like they are
hard-coded, but they aren't as long as the default checkbox is selected.|||Thanks for the suggestion... I think I'm close...
The problem is that my date needs to be in a [Time].[FY Calendar].[All
Time].[Year].[Quarter].[Month].[Day] format.
As you probably can tell, I'm a newbie to VB Scripting. How can I convert
your suggestion "DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy")" to my cube
format? I think if I can do that, I can get it to work.
Thanks,
Matt
"Kenny" wrote:
> Try setting defaults for your start and end date parameters. For
> example, you can set the end date to
> DateTime.Now.AddDays(-1).ToString("MM/dd/yyyy") and the start date to
> DateTime.Now.AddDays(-7).ToString("MM/dd/yyyy"). When you see the
> parameters in subscription creation, it may look like they are
> hard-coded, but they aren't as long as the default checkbox is selected.
>