[REPOST2] SMO Table Owner

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

Using SMO, how do I get a table's ower? I'm scripting out some tables to
disk based on the table's name, but I'm getting a clash on the file name
because the same table name exists with different owners. I want to encorporate
the owner's name into the file name to prevent such clashes.

Also, please let me know if there's a better place to post SMO questions.
The docs and other sources are still a bit sparse on info.

Thanks.
Scott C.
 
Scott,

Adonet is the System.Data namespace

SMO is the Microsoft.SQLServer namespace.

Therefore I would ask it to the newsgroup from the language I am using,
because it is in my idea more WMI related.

But that is only my idea feel free to ask it here.

Cor
 
Hi Scott,

You can use the Table.Schema property to get the owner of the table. For
more information, please check the following link:

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.
scriptschemaobjectbase.schema.aspx

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top