Showing posts with label udfs. Show all posts
Showing posts with label udfs. Show all posts

Monday, March 12, 2012

Non value-type parameters in Assemblies/ CLR UDFs:

I am building a simple utitility to be hosted as a database assembly in SASS 2005. This is a .Net Assembly]

My method is date dependent and I want to pass in a DateTime rather than a string (globalisation issues.. you know the story). Can I do this and how would I pass this parameter in an MDX query?

I also want to pass in such thigs as the StorageMode enum etc. Presumably I can pass in the integer value... (kinda defeats the reason for using enums though)

Update to this, I find that you can pass the DateTime as a string and SSAS does some sort of implicit cast. this is still very sensitive to date string formatting, so is not ideal!|||

Well, it seems that after due consideration I have to answer my own post!

I think the problem is that we can only really pass in basic value types via text in queries, essentially strings and numbers. If I really want to pass in a class/struct I could pass in a string representing the XML Serialized class. For example, if I want to pass in a DateTime rather than a string, I could create an XML version of the DateTime structure. Of course, the alternative for dates would be to specify a universal format, such at the ISO format (yyyy-mm-dd) and ensure that this is rule is always adhered to, but this is coding by convention rather than using strong typing.

Now, my only problem is how to return data in a strongly typed format.... now the XML serialisation seems to be the answer to this one...

Saturday, February 25, 2012

No UDFs or SPs transferred from SQL 2000 to SQL 2005

Hi all
I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
all tables are transferred but the SPs and UDFs have not been
transferred.
Q1: Is there a way to "automatically" transfer these objects ?
Q2: Do I have to manually transfer each one of them and perhaps do
extra processing like "recompile" these UDFs and SPs ?
Thanks a lot in advance.You could easily generate a change script using tools like red-gate's SQL
Compare or Apex SQL Diff.
Aaron Bertrand
SQL Server MVP
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegroups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>|||On Thu, 19 Jul 2007 12:07:31 -0400, Aaron Bertrand [SQL Server MVP] wrot
e:

> You could easily generate a change script using tools like red-gate's SQL
> Compare or Apex SQL Diff.
www.Quest.com has a free comparison tool, and I really like it.
-Chuck Lathrope
www.sqlwebpedia.com|||Use the backup / restore route to effect a complete migration of all
objects. Extended SPs, and those using deprecated functionality (like COM)
will need work to get them working, but all objects will be transfered.
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegroups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>

No UDFs or SPs transferred from SQL 2000 to SQL 2005

Hi all
I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
all tables are transferred but the SPs and UDFs have not been
transferred.
Q1: Is there a way to "automatically" transfer these objects ?
Q2: Do I have to manually transfer each one of them and perhaps do
extra processing like "recompile" these UDFs and SPs ?
Thanks a lot in advance.You could easily generate a change script using tools like red-gate's SQL
Compare or Apex SQL Diff.
--
Aaron Bertrand
SQL Server MVP
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegroups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>|||On Thu, 19 Jul 2007 12:07:31 -0400, Aaron Bertrand [SQL Server MVP] wrote:
> You could easily generate a change script using tools like red-gate's SQL
> Compare or Apex SQL Diff.
www.Quest.com has a free comparison tool, and I really like it.
-Chuck Lathrope
www.sqlwebpedia.com|||Use the backup / restore route to effect a complete migration of all
objects. Extended SPs, and those using deprecated functionality (like COM)
will need work to get them working, but all objects will be transfered.
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegroups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>

No UDFs or SPs transferred from SQL 2000 to SQL 2005

Hi all
I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
all tables are transferred but the SPs and UDFs have not been
transferred.
Q1: Is there a way to "automatically" transfer these objects ?
Q2: Do I have to manually transfer each one of them and perhaps do
extra processing like "recompile" these UDFs and SPs ?
Thanks a lot in advance.
You could easily generate a change script using tools like red-gate's SQL
Compare or Apex SQL Diff.
Aaron Bertrand
SQL Server MVP
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegr oups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>
|||On Thu, 19 Jul 2007 12:07:31 -0400, Aaron Bertrand [SQL Server MVP] wrote:

> You could easily generate a change script using tools like red-gate's SQL
> Compare or Apex SQL Diff.
www.Quest.com has a free comparison tool, and I really like it.
-Chuck Lathrope
www.sqlwebpedia.com
|||Use the backup / restore route to effect a complete migration of all
objects. Extended SPs, and those using deprecated functionality (like COM)
will need work to get them working, but all objects will be transfered.
<rtoss1@.yahoo.com> wrote in message
news:1184859771.869668.194260@.o61g2000hsh.googlegr oups.com...
> Hi all
> I just migrated by Databases from SQL Server 2000 to SQL Server 2005,
> all tables are transferred but the SPs and UDFs have not been
> transferred.
> Q1: Is there a way to "automatically" transfer these objects ?
> Q2: Do I have to manually transfer each one of them and perhaps do
> extra processing like "recompile" these UDFs and SPs ?
> Thanks a lot in advance.
>