我目前正在研究通过PowerShell远程安装SQL Server Express的脚本。当我执行脚本时,SQL安装会退出,错误代码为-2068774911(生成XML文档-访问被拒绝时出错)。
我的代码如下:
>>> def missing_numbers(num_list):
original_list = [x for x in range(num_list[0], num_list[-1] + 1)]
num_list = set(num_list)
print (list(num_list ^ set(original_list)))
>>> missing_numbers([1,2,3,4,5,10,11])
[6, 7, 8, 9]
>>> missing_numbers([2,3,4,5,10,11])
[6, 7, 8, 9]
>>> missing_numbers([2,3,4,5,10,11,1])
[1, 2, 3, 4, 5, 10, 11]
>>> missing_numbers([2,3,4,5,10,11])
[6, 7, 8, 9]
SQL安装摘要:
Overall summary: Final result: Failed: see details below Exit code (Decimal): -2068774911 Exit facility code: 1201 Exit error code: 1 Exit message: There was an error generating the XML document. Start time: 2019-03-11 13:47:12 End time: 2019-03-11 13:47:31 Requested action: Install Exception help link: https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=0xE0C083E6%400xF80B8030&EvtType=0xE0C083E6%400xF80B8030 Setup completed with required actions for features. Troubleshooting information for those features: Next step for SQLEngine: SQL Server Setup was canceled before completing the operation. Try the setup process again. Next step for ComponentUpdate: SQL Server Setup was canceled before completing the operation. Try the setup process again. Next step for SNAC: SQL Server Setup was canceled before completing the operation. Try the setup process again. Next step for SNAC_SDK: SQL Server Setup was canceled before completing the operation. Try the setup process again. Next step for Writer: SQL Server Setup was canceled before completing the operation. Try the setup process again. Next step for Browser: SQL Server Setup was canceled before completing the operation. Try the setup process again. Machine Properties: Machine name: BKP-SRV Machine processor count: 2 OS version: Microsoft Windows Server 2012 R2 Standard (6.3.9600) OS service pack: OS region: United States OS language: English (United States) OS architecture: x64 Process architecture: 64 Bit OS clustered: No Product features discovered: Product Instance Instance ID Feature Language Edition Version Clustered Configured Package properties: Description: Microsoft SQL Server 2017 ProductName: SQL Server 2017 Type: RTM Version: 14 SPLevel: 0 Installation location: C:\Users\Administrator\Documents\SQLEXPR_x64_ENU\x64\setup\ Installation edition: Express Product Update Status: User selected not to include product updates. User Input Settings: ACTION: Install ADDCURRENTUSERASSQLADMIN: true AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE AGTSVCPASSWORD: ***** AGTSVCSTARTUPTYPE: Disabled ASBACKUPDIR: Backup ASCOLLATION: Latin1_General_CI_AS ASCONFIGDIR: Config ASDATADIR: Data ASLOGDIR: Log ASPROVIDERMSOLAP: 1 ASSERVERMODE: TABULAR ASSVCACCOUNT: ASSVCPASSWORD: ASSVCSTARTUPTYPE: Automatic ASSYSADMINACCOUNTS: ASTELSVCACCT: ASTELSVCPASSWORD: ASTELSVCSTARTUPTYPE: 0 ASTEMPDIR: Temp BROWSERSVCSTARTUPTYPE: Disabled CLTCTLRNAME: CLTRESULTDIR: CLTSTARTUPTYPE: 0 CLTSVCACCOUNT: CLTSVCPASSWORD: CLTWORKINGDIR: COMMFABRICENCRYPTION: 0 COMMFABRICNETWORKLEVEL: 0 COMMFABRICPORT: 0 CONFIGURATIONFILE: C:\SW\VeeamInstall\Prequisites\MSSQL2012EXPSP3\ConfigurationFile.ini CTLRSTARTUPTYPE: 0 CTLRSVCACCOUNT: CTLRSVCPASSWORD: CTLRUSERS: ENABLERANU: true ENU: true EXTSVCACCOUNT: EXTSVCPASSWORD: FEATURES: SQLENGINE, SNAC_SDK FILESTREAMLEVEL: 0 FILESTREAMSHARENAME: FTSVCACCOUNT: FTSVCPASSWORD: HELP: false IACCEPTPYTHONLICENSETERMS: false IACCEPTROPENLICENSETERMS: false IACCEPTSQLSERVERLICENSETERMS: true INDICATEPROGRESS: false INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server INSTALLSQLDATADIR: INSTANCEDIR: C:\Program Files\Microsoft SQL Server INSTANCEID: VEEAMSQL2012 INSTANCENAME: VEEAMSQL2012 ISMASTERSVCACCOUNT: NT AUTHORITY\Network Service ISMASTERSVCPASSWORD: ISMASTERSVCPORT: 8391 ISMASTERSVCSSLCERTCN: ISMASTERSVCSTARTUPTYPE: Automatic ISMASTERSVCTHUMBPRINT: ISSVCACCOUNT: NT AUTHORITY\Network Service ISSVCPASSWORD: ISSVCSTARTUPTYPE: Automatic ISTELSVCACCT: ISTELSVCPASSWORD: ISTELSVCSTARTUPTYPE: 0 ISWORKERSVCACCOUNT: NT AUTHORITY\Network Service ISWORKERSVCCERT: ISWORKERSVCMASTER: ISWORKERSVCPASSWORD: ISWORKERSVCSTARTUPTYPE: Automatic MATRIXCMBRICKCOMMPORT: 0 MATRIXCMSERVERNAME: MATRIXNAME: MRCACHEDIRECTORY: NPENABLED: 0 PBDMSSVCACCOUNT: PBDMSSVCPASSWORD: PBDMSSVCSTARTUPTYPE: 0 PBENGSVCACCOUNT: PBENGSVCPASSWORD: PBENGSVCSTARTUPTYPE: 0 PBPORTRANGE: PBSCALEOUT: false PID: ***** QUIET: true QUIETSIMPLE: false ROLE: AllFeatures_WithDefaults RSINSTALLMODE: DefaultNativeMode RSSVCACCOUNT: RSSVCPASSWORD: RSSVCSTARTUPTYPE: Automatic SAPWD: SECURITYMODE: SQLBACKUPDIR: SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS SQLSVCACCOUNT: NT Service\MSSQL$VEEAMSQL2012 SQLSVCINSTANTFILEINIT: false SQLSVCPASSWORD: SQLSVCSTARTUPTYPE: Automatic SQLSYSADMINACCOUNTS: BUILTIN\ADMINISTRATORS SQLTELSVCACCT: NT Service\SQLTELEMETRY$VEEAMSQL2012 SQLTELSVCPASSWORD: SQLTELSVCSTARTUPTYPE: Automatic SQLTEMPDBDIR: SQLTEMPDBFILECOUNT: 0 SQLTEMPDBFILEGROWTH: -1 SQLTEMPDBFILESIZE: -1 SQLTEMPDBLOGDIR: SQLTEMPDBLOGFILEGROWTH: -1 SQLTEMPDBLOGFILESIZE: -1 SQLUSERDBDIR: SQLUSERDBLOGDIR: SUPPRESSPRIVACYSTATEMENTNOTICE: false TCPENABLED: 0 UIMODE: AutoAdvance UpdateEnabled: false UpdateSource: MU USEMICROSOFTUPDATE: false X86: false Configuration file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20190311_134708\ConfigurationFile.ini Detailed results: Feature: Database Engine Services Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Feature: Setup Support Files Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Feature: SQL Client Connectivity Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Feature: SQL Client Connectivity SDK Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Feature: SQL Writer Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Feature: SQL Browser Status: Failed Reason for failure: Setup was canceled for the feature. Next Step: SQL Server Setup was canceled before completing the operation. Try the setup process again. Rules with failures: Global rules: Scenario specific rules: Rules report file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20190311_134708\SystemConfigurationCheck_Report.htm Exception summary: The following is an exception stack listing the exceptions in outermost to innermost order Inner exceptions are being indented Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException Message: There was an error generating the XML document. HResult : 0x84b10001 FacilityCode : 1201 (4b1) ErrorCode : 1 (0001) Data: DisableWatson = true Stack: at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.CalculateSettings(IEnumerable`1 settingIds) at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.CalculateAllSettings(Boolean chainerSettingOnly) at Microsoft.SqlServer.Configuration.SetupExtension.FinalCalculateSettingsAction.ExecuteAction(String actionId) at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.c__DisplayClasse.b__b() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate) Inner exception type: System.InvalidOperationException Message: There was an error generating the XML document. HResult : 0x80131509 Stack: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces) at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) Inner exception type: System.Security.Cryptography.CryptographicException Message: Access is denied. HResult : 0x80070005 Stack: at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.SqlServer.Common.SqlSecureString.WriteXml(XmlWriter writer) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterAgentConfigurationPublic.Write6_AgentConfigurationPublic(String n, String ns, AgentConfigurationPublic o, Boolean isNullable, Boolean needType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterAgentConfigurationPublic.Write7_AgentConfigurationPublic(Object o)