Showing posts with label window. Show all posts
Showing posts with label window. Show all posts

Friday, March 23, 2012

Help on error trying to migrate cube AS2000 to AS2005

Hi, all.
I'm using Migrate Database wizard to migrate my cubes from AS2000 to SSAS2005.
It begin to work and I see in the processing window Data sources, Dimensions, Cubes but it finish with the error:

"My OLAP Server;............ Cannot parse the FromClause property."

Someone can help me?
thanks.

Hi,

In AS2000, the FromClause and JoinClause string properties (and sometime an additional filter) were used to specify the SQL source for objects. In AS2005 the DataSourceView object was introduced (with the System.Data.DataSet that has DataTables, DataColumns, DataRelations).

The migration wizard is parsing the FromClause and JoinClause properties, to generate the DataSourceView. Sometimes the parsing of those SQL strings fails and this is the error you have.

Some reasons for parsing failures are legitimate (for example you can manually create an object with DSO and set invalid FromClause and/or JoinClause properties), other reasons are defects in the migration wizard (for example a certain valid SQL syntax was overlooked in the parser).

To find out what is happening in your case, we'll need to see the FromClause. If the FromClause doesn't contain any private information, you can either post it here or send it to me at adumitrascu at hotmail dot com, so I can take a look.

I'll post a message in a bit with a sample DSO code on how to get the FromClause.

Adrian Dumitrascu

|||Dim s As New DSO.Server
Dim db As DSO.Database
Dim c As DSO.Cube

s.Connect "localhost"
Set db = s.MDStores("the name of the database")
Set c = db.Cubes("the name of the cube")

'print out these properties:
' c.FromClause
' c.JoinClause
' c.SourceTable
' c.SourceTableAlias
' c.SourceTableFilter

s.CloseServer
|||

Thank you, Adrian.

I will try to use your sample.

But my database has about 10 cubes; how I can identify on which cube fails the migration wizard ?

by

|||

The error message should specify the object path for which the FromClause could not be parsed. It might be a Dimension, Cube, Partition, MiningModel or MiningColumn. Also, in migration wizard, the error should appear associated with the object (if not, then we'll need to discover it from the path string).

|||

the message "Cannot parse the FromClause property." is preceded from

"My OLAP Server;xxxxx;zzzzz:"

where "xxxxx" is the name of the database that contains my cubes and "zzzzz" is one of the dimensions.

Is "zzzzz" the object to which you refer ?

thank.

|||

Yes, the "zzzzz" is the object; the fragment "My OLAP Server;xxxxx;zzzzz" is a path for an object, starting with the server name, then database name.

|||

Analyzing the "FromClause property" it is emerged that the table to which the dimension refers has a name like:

"£tablename".

The parser in the migration wizard doesn't support the '£' character at the start of the table name in dbo"."£tablename". It would support it in the table name, but not as the start.

Migration wizard will need to be fixed, but meanwhile, a work-around is to create a renamed view on top of "dbo"."£tablename" and use that view in AS2000.

Thank you Adrian.

Help on error trying to migrate cube AS2000 to AS2005

Hi, all.
I'm using Migrate Database wizard to migrate my cubes from AS2000 to SSAS2005.
It begin to work and I see in the processing window Data sources, Dimensions, Cubes but it finish with the error:

"My OLAP Server;............ Cannot parse the FromClause property."

Someone can help me?
thanks.

Hi,

In AS2000, the FromClause and JoinClause string properties (and sometime an additional filter) were used to specify the SQL source for objects. In AS2005 the DataSourceView object was introduced (with the System.Data.DataSet that has DataTables, DataColumns, DataRelations).

The migration wizard is parsing the FromClause and JoinClause properties, to generate the DataSourceView. Sometimes the parsing of those SQL strings fails and this is the error you have.

Some reasons for parsing failures are legitimate (for example you can manually create an object with DSO and set invalid FromClause and/or JoinClause properties), other reasons are defects in the migration wizard (for example a certain valid SQL syntax was overlooked in the parser).

To find out what is happening in your case, we'll need to see the FromClause. If the FromClause doesn't contain any private information, you can either post it here or send it to me at adumitrascu at hotmail dot com, so I can take a look.

I'll post a message in a bit with a sample DSO code on how to get the FromClause.

Adrian Dumitrascu

|||Dim s As New DSO.Server
Dim db As DSO.Database
Dim c As DSO.Cube

s.Connect "localhost"
Set db = s.MDStores("the name of the database")
Set c = db.Cubes("the name of the cube")

'print out these properties:
' c.FromClause
' c.JoinClause
' c.SourceTable
' c.SourceTableAlias
' c.SourceTableFilter

s.CloseServer
|||

Thank you, Adrian.

I will try to use your sample.

But my database has about 10 cubes; how I can identify on which cube fails the migration wizard ?

by

|||

The error message should specify the object path for which the FromClause could not be parsed. It might be a Dimension, Cube, Partition, MiningModel or MiningColumn. Also, in migration wizard, the error should appear associated with the object (if not, then we'll need to discover it from the path string).

|||

the message "Cannot parse the FromClause property." is preceded from

"My OLAP Server;xxxxx;zzzzz:"

where "xxxxx" is the name of the database that contains my cubes and "zzzzz" is one of the dimensions.

Is "zzzzz" the object to which you refer ?

thank.

|||

Yes, the "zzzzz" is the object; the fragment "My OLAP Server;xxxxx;zzzzz" is a path for an object, starting with the server name, then database name.

|||

Analyzing the "FromClause property" it is emerged that the table to which the dimension refers has a name like:

"£tablename".

The parser in the migration wizard doesn't support the '£' character at the start of the table name in dbo"."£tablename". It would support it in the table name, but not as the start.

Migration wizard will need to be fixed, but meanwhile, a work-around is to create a renamed view on top of "dbo"."£tablename" and use that view in AS2000.

Thank you Adrian.

sql

Wednesday, March 21, 2012

Help obtain a window of rows from a table

Hi,
I have a client program in vb.net that access a SQL server database. Each
time the client program need some data it retrieve the whole table, so it is
pretty slow.
I wonder if it is possible, for the client, to retrieve only a window of
rows around the actual value he is using. That is, if he is actually in row
4000 he will retrieve from row 3000 to 5000 but not the complete table. If
this is possible what I need is something like:
1) The client send SQL-Server a string with the actual ordering and the ID
of the actual row.
2) SQL-Server order the table following the order specified in the string
send by the client.
3) Using the ordered table SQL-Server "find" the ID of the actual row.
4) SQL-Server return a number of rows before and after the Id of the actual
row (no idea how to do this).
Any help.
Thanks,
JamesHi James,
Yes - its basically paging.
The basics are this...
declare @.results table (
idrow int not null identity,
yourresultcol1...
yourresultcol2...
)
insert @.results ( yourresultscol1, yourresultscol2 )
select yourresultscol1, yourresultscol2
from table...
where ...
order by ...
select *
from @.results
where idrow between @.start and @.finish
I know its not a complete working example but does that give you enough
idea?
Tony
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"James" <info@.pricetech.es> wrote in message
news:OTkWPANHGHA.1628@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have a client program in vb.net that access a SQL server database. Each
> time the client program need some data it retrieve the whole table, so it
> is pretty slow.
> I wonder if it is possible, for the client, to retrieve only a window of
> rows around the actual value he is using. That is, if he is actually in
> row 4000 he will retrieve from row 3000 to 5000 but not the complete
> table. If this is possible what I need is something like:
> 1) The client send SQL-Server a string with the actual ordering and the ID
> of the actual row.
> 2) SQL-Server order the table following the order specified in the string
> send by the client.
> 3) Using the ordered table SQL-Server "find" the ID of the actual row.
> 4) SQL-Server return a number of rows before and after the Id of the
> actual row (no idea how to do this).
> Any help.
> Thanks,
> James
>
>|||Sorry, i forgot to mention, in SQL 2005 its a whole lot easier.
We have the rownumber() function and cte that does it all for us - there are
some really useful examples in bol.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Tony Rogerson" <tonyrogerson@.sqlserverfaq.com> wrote in message
news:uhnuUbNHGHA.1124@.TK2MSFTNGP10.phx.gbl...
> Hi James,
> Yes - its basically paging.
> The basics are this...
> declare @.results table (
> idrow int not null identity,
> yourresultcol1...
> yourresultcol2...
> )
> insert @.results ( yourresultscol1, yourresultscol2 )
> select yourresultscol1, yourresultscol2
> from table...
> where ...
> order by ...
> select *
> from @.results
> where idrow between @.start and @.finish
> I know its not a complete working example but does that give you enough
> idea?
> Tony
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
> "James" <info@.pricetech.es> wrote in message
> news:OTkWPANHGHA.1628@.TK2MSFTNGP12.phx.gbl...
>|||James
I think Tom Moreau had already answered the same or almost the same question
a few days ago. Pls search on internet
"James" <info@.pricetech.es> wrote in message
news:OTkWPANHGHA.1628@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have a client program in vb.net that access a SQL server database. Each
> time the client program need some data it retrieve the whole table, so it
> is pretty slow.
> I wonder if it is possible, for the client, to retrieve only a window of
> rows around the actual value he is using. That is, if he is actually in
> row 4000 he will retrieve from row 3000 to 5000 but not the complete
> table. If this is possible what I need is something like:
> 1) The client send SQL-Server a string with the actual ordering and the ID
> of the actual row.
> 2) SQL-Server order the table following the order specified in the string
> send by the client.
> 3) Using the ordered table SQL-Server "find" the ID of the actual row.
> 4) SQL-Server return a number of rows before and after the Id of the
> actual row (no idea how to do this).
> Any help.
> Thanks,
> James
>
>|||James wrote:
> Hi,
> I have a client program in vb.net that access a SQL server database. Each
> time the client program need some data it retrieve the whole table, so it
is
> pretty slow.
> I wonder if it is possible, for the client, to retrieve only a window of
> rows around the actual value he is using. That is, if he is actually in ro
w
> 4000 he will retrieve from row 3000 to 5000 but not the complete table. If
> this is possible what I need is something like:
> 1) The client send SQL-Server a string with the actual ordering and the ID
> of the actual row.
> 2) SQL-Server order the table following the order specified in the string
> send by the client.
> 3) Using the ordered table SQL-Server "find" the ID of the actual row.
> 4) SQL-Server return a number of rows before and after the Id of the actua
l
> row (no idea how to do this).
> Any help.
> Thanks,
> James
Take a look at:
http://www.aspfaq.com/show.asp?id=2120
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--