Showing posts with label udf. Show all posts
Showing posts with label udf. Show all posts

Sunday, March 11, 2012

260 Table Limit

A Select statement is limited to 260 tables. Tables included in nested view
s
and UDF's are included in the table total. Is there an easy way to determin
e
how many tables a Select statement is currently using? For example, I'd lik
e
to know if sproc X is currently at 259 tables.Wow,Dave do you reall deal with 260tables within a single SP?

> and UDF's are included in the table total. Is there an easy way to
> determine
> how many tables a Select statement is currently using?
No , that I'm aware
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:93191E1B-B7F6-4B85-9930-233CE6345555@.microsoft.com...
>A Select statement is limited to 260 tables. Tables included in nested
>views
> and UDF's are included in the table total. Is there an easy way to
> determine
> how many tables a Select statement is currently using? For example, I'd
> like
> to know if sproc X is currently at 259 tables.|||Hi Dave
There is no easy way of doing this, even if sysdepends was reliable, you
could not differentiate between different statements in your
procedure/function.
The question you would have to ask is why does your design reach this limit?
John
"Dave" wrote:

> A Select statement is limited to 260 tables. Tables included in nested vi
ews
> and UDF's are included in the table total. Is there an easy way to determ
ine
> how many tables a Select statement is currently using? For example, I'd l
ike
> to know if sproc X is currently at 259 tables.|||I've seen partitioned views that unionize more than 100 tables, but never a
single select with that many joins. This imposed 260 table limit is
basically a sanity constraint and there for the safety of yourself and
others.
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:93191E1B-B7F6-4B85-9930-233CE6345555@.microsoft.com...
>A Select statement is limited to 260 tables. Tables included in nested
>views
> and UDF's are included in the table total. Is there an easy way to
> determine
> how many tables a Select statement is currently using? For example, I'd
> like
> to know if sproc X is currently at 259 tables.|||> Is there an easy way to determine
> how many tables a Select statement is currently using?
Being someone who has reached this limit once or twice, I understand
your concern. If this limit is a "sanity constraint", it would be good
to know how "sane" are we, regarding a particular statement.
I found a method to aproximate the number (the real number may be a bit
higher): issue a SET SHOWPLAN_ALL ON before executing the SELECT (in
Query Analyzer / Management Studio), then count the number of rows
where the Argument column begins with "OBJECT:" (you can do this by
copying the result to Excel, for example). This number can be smaller
than the real number of tables, because the query plan is already
optimized (so it doesn't show the tables that are present in the
statement or the views, but are unnecessary for returning the specified
columns).
Razvan

Tuesday, March 6, 2012

2005 using CLR for UDF accessing DirectoryServices

Not sure if this is correct group, but I cannot access
DirectoryServices namespace (directoryservices.dll) when creating (or
running) a C# UDF.
It seems that this is a 'feature', but why - and is there a way round
it - I need to access Active Directory from the UDF.
Thanks
Howard.Generally your assembly needs 'EXTERNAL_ACCESS' or 'UNSAFE' permission set.
What error message is generated?
WBR, Evergray
--
Words mean nothing...
"HowardB" <howard.birkett@.collercapital.com> wrote in message
news:1140603708.038477.288580@.g14g2000cwa.googlegroups.com...
> Not sure if this is correct group, but I cannot access
> DirectoryServices namespace (directoryservices.dll) when creating (or
> running) a C# UDF.
> It seems that this is a 'feature', but why - and is there a way round
> it - I need to access Active Directory from the UDF.
> Thanks
> Howard.
>|||Thanks Evergray, got a response from an MVP in the dotnet.framework
group. Seems that I first have to add DirecroryServices to sql with
CREATE ASSEMBLY with unsafe permission set after turning on the
database TRUSTWORTHY - then, yes, I can add my assembly with UNSAFE
permission set- haven't tried it yet!!
H