Data Infrastructure Management Software Discussions

Slow assembly load

francoisbnc

I experience slow load of assembly [System.Reflection.Assembly]::loadwithPartialName("Microsoft.SQLServer.SMO") in WFA command,  about 5 minutes to load.

Strange thing is, directly from powershell command line, it take about 15 seconds.

Do you know what could be the cause?

francois

3 REPLIES 3

Re: Slow assembly load

kandati

Hi,

Can you elaborate it more..!

with what command you hit this issue..!

Are you facing the same issue with all the commands or is it with a specific command in a particular time..!

Regards

Sivaprasad K

Re: Slow assembly load

francoisbnc

Hi,

This is a part of my code, in the log start assembly to end assembly took 7 minutes. Tried with direct dll load but that doesn't help.

## - Loading the SQL Server SMO Assembly"

Get-WFALogger -Info -message $('Start load Assembly')

#[System.Reflection.Assembly]::loadwithPartialName("Microsoft.SQLServer.SMO");

[System.Reflection.Assembly]::loadfrom("C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll")

Get-WFALogger -Info -message $('End load Assembly: ')

09:27:35.046 INFO  [_Detach_SQL_DB] ### Command '_Detach_SQL_DB' ###

09:27:36.169 INFO  [_Detach_SQL_DB] Executing command: ./_Detach_SQL_DB3112812273117812986.ps1 -DBs @('(AdventureWorksDEV)') -MachineName gdc00304\DBA_TEST

09:27:36.200 INFO  [_Detach_SQL_DB] Start load Assembly

09:35:34.827 INFO  [_Detach_SQL_DB] End load Assembly:

09:35:34.842 INFO  [_Detach_SQL_DB] Connect to SQL: gdc00304\DBA_TEST

09:35:48.664 INFO  [_Detach_SQL_DB] Working on: (AdventureWorksDEV)

09:35:48.898 INFO  [_Detach_SQL_DB] Nothing to detach for: (AdventureWorksDEV)

09:35:51.332 INFO  [_Detach_SQL_DB] Command completed, took 496286 milliseconds

Regards,

francois

Re: Slow assembly load

francoisbnc

Found  add-type "C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll" drastically improve load.

about 15 sec now

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public