2017-03-13 5 views
1

오류로 인해 Backup-SqlDatabase를 실행할 수 없습니다.Powershell에서 Backup-SqlDatabase를 사용할 때 "TypeData의 오류"오류가 발생했습니다.

PS C:\Users\Mik> Backup-SqlDatabase 
Backup-SqlDatabase : The 'Backup-SqlDatabase' command was found in the module 'SqlServer', but the module could not be 
loaded. For more information, run 'Import-Module SqlServer'. 
At line:1 char:1 
+ Backup-SqlDatabase 
+ ~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Backup-SqlDatabase:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule 

을 내가 제안 가져 오기 - 모듈을 실행하고이 얻을 :이 문제로 기여했는지 나는 최근 2012과 함께 SQL 서버 2016 설치

PS C:\Users\Mik> Import-Module SqlServer 
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData 
"Microsoft.SqlServer.Management.Smo.NamedSmoObject": The member DefaultKeyPropertySet is already present. 
Error in TypeData "Microsoft.SqlServer.Management.Smo.NamedSmoObject": The member DefaultDisplayPropertySet is already 
present. 
Error in TypeData "Microsoft.SqlServer.Management.Smo.NamedSmoObject": The member DefaultDisplayProperty is already 
present. 
At line:1 char:1 
+ Import-Module SqlServer 
+ ~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : InvalidOperation: (:) [Import-Module], RuntimeException 
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand 

는 확실하지 않다을 나는 다음과 같은 수 나는 Powershell 명령을 이전에 사용하지 않았다.

+0

새로운 PoSH 세션에서 이것을 시도 했습니까? 즉, 직접 또는 프로필별로 다른 모듈을로드하지 않았습니까? 'SqlServer' 모듈을 어떤 버전으로 읽어들입니까? (여러개의 병렬 모듈 버전을 확인하고 명시 적으로 의도 한 버전을로드하여 모듈을 가져 오려고합니까?) 그래도 오류가 발생합니까? –

답변