sqlalchemy - How do I figure out the type of the SQL Server 2008 R2 View definition -
i walking view definitions in database today using sqlalchemy 0.6 (using get_view_definition()) , ran across 1 larger 4000 characters. ms seems (information schema views views) shouldn't returned. ms sql server management studio shows whole thing (well @ least beginning , end right) if ask design of view. sqlalchemy returns string truncated @ 4000 characters (boo, hiss). how can ask database type wants return piece of data instead of depending on suspect out of date documentation. i'm assuming type varchar. verify that.
the object definitions, including view definitions, can retrieved sys.sql_modules
view, or using object_definition
function. includes proper nvarchar(max)
type contains untruncated definition of object.
other backward compatibility views sys.syscomments
or information_schema.views
contain column of type nvarchar(4000)
, such type, definition, must truncate object definition after first 4k characters. many cross platform tools rely on information_schema
views , perhaps sqlalchemy same.
Comments
Post a Comment