Примечание.
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
Gets or sets a String that contains the SQL Server Management Object (SMO) enumeration Uniform Resource Name (URN) for the selected enumeration.
Пространство имен: Microsoft.SqlServer.Dts.Runtime.Enumerators.SMO
Сборка: Microsoft.SqlServer.ForEachSMOEnumerator (in microsoft.sqlserver.foreachsmoenumerator.dll)
Синтаксис
'Декларация
Property EnumURN As String
string EnumURN { get; set; }
property String^ EnumURN {
String^ get ();
void set (String^ value);
}
/** @property */
String get_EnumURN ()
/** @property */
void set_EnumURN (String value)
function get EnumURN () : String
function set EnumURN (value : String)
Значение свойства
A String that contains the enumerator's configuration parameters.
Замечания
The SMO enumeration URN contains four parts. First is the string, RuntimeServer" followed by a connection. The following line of code shows an EnumURN property where a connection has been specified.
RuntimeServer[@Connection='{B1552E8D-43AE-44B1-B5D3-03C4F5461977}']/Server[@Name='localhost']/SMOEnumObj[@Name='Databases']/SMOEnumType[@Name='Names']
The second part of the string is the server name parameter.
The last two parts are the SMOEnumObj and SMOEnumType parameters. The third part, the SMOEnumObj parameter, names the enumeration object that is enumerated. Valid values are:
@"LinkedServers"
@"Jobs"
@"Logins"
@"Databases"
@"FileGroups"
@"DataFiles"
@"LogFiles"
@"StoredProcedures"
@"UserDefinedDataTypes"
@"UserDefinedFunctions"
@"Views"
@"Users"
@"Tables"
@"Columns"
@"ForeignKeys"
@"Triggers
The code sample above shows an enumeration over databases.
The fourth part, the SMOEnumType parameter, specifies which enumeration type should be used. Valid values are:
@"Objects"
@"ObjectsPP"
@"Names"
@"URNs"
@"Locations"
The code sample above shows an enumeration using names.
Пример
The following code example shows the construction of an EnumURN property.
Package package = new Package();
ForEachLoop loop = (ForEachLoop)package.Executables.Add("STOCK:FOREACHLOOP");
loop.Name = "ForEachLoop";
// Create Enumerator Info.
ForEachEnumeratorInfos infos = app.ForEachEnumeratorInfos;
ForEachEnumeratorInfo info = infos[EnumType.SMOEnum];
if (info == null)
throw new ApplicationException("Could not find ForEachEnum for:
"+EnumType.SMOEnum);
// Create Enumerator.
ForEachEnumeratorHost enumW = info.CreateNew();
if (enumW == null)
throw new ApplicationException("null enumerator was created");
ForEachSMOEnumerator smoEnumerator = (ForEachSMOEnumerator)enumW.InnerObject;
enumerator.EnumURN = RuntimeServer[@Connection='{B1552E8D-43AE-44B1-B5D3-03C4F5461977}']/Server[@Name='localhost']/SMOEnumObj[@Name='Databases']/SMOEnumType[@Name='Names']
. . .
// more code here...
. . .
Синхронизация потоков
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Платформы
Платформы разработки
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
Целевые платформы
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
См. также
Справочник
IDTSForEachSMOEnumerator Interface
IDTSForEachSMOEnumerator Members
Microsoft.SqlServer.Dts.Runtime.Enumerators.SMO Namespace