Showing posts with label fail. Show all posts
Showing posts with label fail. Show all posts

Thursday, March 22, 2012

Data Driven Subscription Help

Hello all,

I am trying to schedule an MDX report to run once a week and it only works if I pass one parameter per field.It would fail every time I try to pass multiple parameters.Do you know if there is way to pass multiple MDX parameters?

The parameter field is set as multi-value field.

This worked –

'[Dim Travel Product].[Dim Travel Product].&[67]'

This failed –

'[Dim Travel Product].[Dim Travel Product].&[67], [Dim Travel Product].[Dim Travel Product].&[70], [Dim Travel Product].[Dim Travel Product].&[69]'

This failed -

'[Dim Travel Product].[Dim Travel Product].&[67]&[69]&[70]'

Could you post the MDX statement into which the parameters are being passed?

Thanks,
Bryan

|||

The parameter is passed to @.TravelProduct:

SET [Dim Travel Product Set] AS StrToSet(@.TravelProduct)

MEMBER [Dim Travel Product].[Dim Travel Product].[Travel Product Subset] AS 'Aggregate([Dim Travel Product Set])'

Thanks in advance!

|||It also works if i were to run this manually and select multiple parameters. The problem is I don't know the proper syntax of what's being passed when there are multiple selections.

|||

Enclose the list of members inside { } when passing multiple members.

|||

None of the below syntax works:

'{[Dim Travel Product].[Dim Travel Product].&[4]&[5]&[7]}'

'{[Dim Travel Product].[Dim Travel Product].&[4], [Dim Travel Product].[Dim Travel Product].&[5], [Dim Travel Product].[Dim Travel Product].&[7]}'

This is the method that I am using to pass the parameter:

So this is still working:

SELECT CONVERT(char(10),DateAdd(dd, -1 - (DatePart(dw, getdate()) - 2), getdate()),101) as Sunday,
'[Dim Travel Product].[Dim Travel Product].&[4]' as TravProd,
'[Dim Car Vendor].[Car Vendor Desc].[All]' as Vendor

This does not work:

SELECT CONVERT(char(10),DateAdd(dd, -1 - (DatePart(dw, getdate()) - 2), getdate()),101) as Sunday,
'{[Dim Travel Product].[Dim Travel Product].&[4], [Dim Travel Product].[Dim Travel Product].&[5], [Dim Travel Product].[Dim Travel Product].&[7]}' as TravProd,
'[Dim Car Vendor].[Car Vendor Desc].[All]' as Vendor

This does not work:

SELECT CONVERT(char(10),DateAdd(dd, -1 - (DatePart(dw, getdate()) - 2), getdate()),101) as Sunday,
'{[Dim Travel Product].[Dim Travel Product].&[4]&[5]&[7]}' as TravProd,
'[Dim Car Vendor].[Car Vendor Desc].[All]' as Vendor

|||

Take a look at this. It works against Adventure Works:

Code Snippet

select

[Date].[Date].[July 1, 2003] on 0,

strtoset("{[Product].[Category].[Bikes],[Product].[Category].[Clothing]}") on 1

from [Adventure Works]

B.|||

What I am trying to do is pass the @.TravelProduct from a Data Driven Subscription in Reporting Services and schedule it to run once a week. The select statement that I built contains all my filters, but when I add more than one filter for a particular field, it errors.

Thanks!

|||

What my code illustrates is how the MDX must be constructed to support multiple values from a parameter. You need to use STRTOSET, you need to wrap that comma delimited list of set members in curly braces, and that set string needs to be wrapped in double-quotes. If you've got all that in place, you can use a parameter in SSRS supply the set of members. The trick is getting your MDX in order to be able to work with the value from the parameter.

B.

|||

Thanks! I'll try that later today and report back.

|||

I tried what Bryan did above but it is still not working. ;(

sql

Wednesday, March 21, 2012

Data Directory In Network location?

Is it possible to set DATADIR=\\<company_network_somedirectory>\? When I
try it, set-up seems to fail.
Also, if I were to create a new database on a default instance of MSDE, I am
not able to pick mapped network directories.
Appreciate any insight.
Thanks,
Sha.
hi Sha,
"Sha S." <shajihans@.ttnus.com> ha scritto nel messaggio
news:OajGz8D7EHA.3836@.tk2msftngp13.phx.gbl
> Is it possible to set DATADIR=\\<company_network_somedirectory>\?
> When I try it, set-up seems to fail.
>
it is possible, using a trace flag, but strongly not suggested... SQL Server
requires a strong, reliant and trusted, verified path (and enough permission
must be granted to the Windows account running it's services) in order
perform (possibly as fast as possible) disk IO operations...
as Network share usually are not that secure and robust, nor fast, it is
strongly advised only to use "local" storag subsystem and not remote...
as regard the setup.exe parameter, I actually do not know if it's possible
to specify remote paths...
please keep you data on your local disk(s) :D

> Also, if I were to create a new database on a default instance of
> MSDE, I am not able to pick mapped network directories.
>
again, enough permission(s) [on the network shares] must be granted to the
Windows account running MSDE SQL Server and SQL Server Agent services..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thank you, Andrea, for your reply. I shall follow it.
Andrea Montanari wrote:
> hi Sha,
> "Sha S." <shajihans@.ttnus.com> ha scritto nel messaggio
> news:OajGz8D7EHA.3836@.tk2msftngp13.phx.gbl
>
> it is possible, using a trace flag, but strongly not suggested... SQL Server
> requires a strong, reliant and trusted, verified path (and enough permission
> must be granted to the Windows account running it's services) in order
> perform (possibly as fast as possible) disk IO operations...
> as Network share usually are not that secure and robust, nor fast, it is
> strongly advised only to use "local" storag subsystem and not remote...
> as regard the setup.exe parameter, I actually do not know if it's possible
> to specify remote paths...
> please keep you data on your local disk(s) :D
>
>
> again, enough permission(s) [on the network shares] must be granted to the
> Windows account running MSDE SQL Server and SQL Server Agent services..
>
|||hi Sha,
"Sha S." <pilgrim216@.gmail.com> ha scritto nel messaggio
news:e8MrtIP7EHA.3616@.TK2MSFTNGP11.phx.gbl
> Thank you, Andrea, for your reply. I shall follow it.
>
:D
just a consideratio I had after posting... for sure it's not possible to
specify remote folders for <DATA_DIR> parameter as you can not install MSDE
specifying the trace flag required for that kind of feature
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Wednesday, March 7, 2012

Data base mirroring fail over clients redirects

Hello,
I have recently installed and configured SQL 2005 SE with database mirroring
configured with high safety with automatic failover synchronous mode.
My question is (I probably missed the principle idea) in case of failover
occurred how do the clients redirect to the second node transparently.
Thanks in advanced.
Tal shalom
You must specify the initial principal server and database in the
connection string and the failover partner server.
Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
Catalog=myDataBase;Integrated Security=True;
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
> Hello,
> I have recently installed and configured SQL 2005 SE with database
> mirroring
> configured with high safety with automatic failover synchronous mode.
> My question is (I probably missed the principle idea) in case of failover
> occurred how do the clients redirect to the second node transparently.
> Thanks in advanced.
|||Shalom Uri
Thanks for the answer, will it be the right option to use also Microsoft SQL
Server Native Client and choosing mirror server will it achieve the same
results.
Thanks
"Uri Dimant" wrote:

> Tal shalom
> You must specify the initial principal server and database in the
> connection string and the failover partner server.
> Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
> Catalog=myDataBase;Integrated Security=True;
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
>
>
|||Hi Tal
Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
Client .
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...[vbcol=seagreen]
> Shalom Uri
> Thanks for the answer, will it be the right option to use also Microsoft
> SQL
> Server Native Client and choosing mirror server will it achieve the same
> results.
> Thanks
>
> "Uri Dimant" wrote:
|||thanks
cheers
"Uri Dimant" wrote:

> Hi Tal
> Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
> Client .
>
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...
>
>