首页 > 数据库 >syspolicy_purge_history sql job failed

syspolicy_purge_history sql job failed

时间:2023-04-28 11:12:15浏览次数:49  
标签:disabled syspolicy scripts SqlServer Microsoft purge failed 注册表 PowerShell

错误信息如下:

'File C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLPS\Sqlps.ps1 cannot be loaded because running scripts is disabled on this system

根据错误信息提示检查发现服务器注册表里缺少内容-Microsoft.SqlServer.Management.PowerShell.sqlps130键值对信息
image

 

应该是这样的,

 

更新注册表即可。把下面代码块里的内容粘贴到文本编辑器里,修改后缀为.reg,然后鼠标左键双击执行。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps130]
"Path"="C:\\Program Files (x86)\\Microsoft SQL Server\\130\\Tools\\Binn\\SQLPS.exe"
"ExecutionPolicy"="RemoteSigned"

参考文档 https://blog.pythian.com/powershell-error-sqlps-ps1-cannot-loaded-running-scripts-disabled-system/

 

标签:disabled,syspolicy,scripts,SqlServer,Microsoft,purge,failed,注册表,PowerShell
From: https://www.cnblogs.com/dxmdiy/p/17361565.html

相关文章

  • Linux(Centos7)failed to start lsb bring up/down 反其道解决
    VM虚拟机里装的CentOS7,之前用的好好的,突然就连不上网了。使用命令:systemctlrestartnetwork.service提示错误:  注:网截图了,用网友的按提示输入:systemctlstarusnetwork里面有行错误提示: failedtostartlsbbringup/down网上找了一圈,大部分说是 ......
  • SpringBoot2 hikari关于 Failed to validate connection com.mysql.cj.jdbc.Connectio
    项目启动不报错,如果静默15分钟没有数据库操作就报上述错误WARN不影响程序运行Failedtovalidateconnectioncom.mysql.cj.jdbc.ConnectionImpl@16244d67(Nooperationsallowedafterconnectionclosed.).PossiblyconsiderusingashortermaxLifetimevalue.发现Spri......
  • net::ERR_FAILED 413
    后台收不到post请求,前端报错413具体情况如下: 开始以为是跨域又有问题,进一步发现是上传的图片文件过大。Node.js环境中koa框架使用还不熟练。参考笔记-node.jskoa框架。请求体过大报413错误-简书(jianshu.com)引入koa-bodyparser 挂载配置,将文件大小设置为不超过10MB......
  • tomcat报错 removeGeneratedClassFiles failed
    1,tomcat切换用户重启后报错如下:Aug29,20142:14:47PMorg.apache.jasper.compiler.CompilerremoveGeneratedClassFilesWARNING:Failedtodeletegeneratedclassfile[/home/joeyon/test/work/Catalina/localhost/_/org/apache/jsp/WEB_INFO/c/common/errorIos_jsp.class]......
  • DDP运行报错(单卡无错):ERROR:torch.distributed.elastic.multiprocessing.api:failed (e
    使用DDP时出现错误,但是单卡跑无错误。错误记录如下:RuntimeError:Expectedtohavefinishedreductionintheprioriterationbeforestartinganewone.Thiserrorindicatesthatyourmodulehasparametersthatwerenotusedinproducingloss.Youcanenableunu......
  • 解决npm install各种报错的6种方案 Error: Command failed: cmd.exe autoreconf -ivf
    报错示例:Error:Commandfailed:C:\Windows\system32\cmd.exe/s/c"autoreconf-ivf"gifsiclepre-buildtestfailedPSG:\code_all\my_webpack_webgl2021-5-17-dev_01\three151-demo>npminstallnpmnoticeBeginningOctober4,2021,allconnect......
  • 解决Some index files failed to download.They have been ignored, or old ones used
    使用pingwww.baidu.com测试一下网络,如果出现:ping:www.baidu.com:Temporaryfailureinnameresolution就是网络问题了以下是解决办法,修改两处后重启即可,下面详细说明第一处修改的地方:sudovim/etc/systemd/resolved.conf修改DNS如下:[Resolve]DNS=8.8.8.8#FallbackD......
  • make_ext4fs error: make_file: failed to allocate inode
    make_ext4fserror:make_file:failedtoallocateinodeerror:do_inode_allocate_extents:Failedtoallocate1146blocksmakemenuconfigTargetImages--->[*]ext4--->(60000)Maximumnumberofinodesinrootfilesystem无脑6000改为60000同样的还有改sys......
  • [vite]: Rollup failed to resolve import "APlayer" from "./APlayer/index.vue".Thi
    这个错误提示是在你使用Vite构建项目时遇到的。错误信息提示Rollup在构建过程中无法解析import"APlayer",而且这很可能会在运行时破坏你的应用程序。这个问题的原因是,APlayer并不是一个模块,没有被正确地导出到你的项目中。为了解决这个问题,你需要告诉Rollup将APlayer......
  • Rollup failed to resolve import "vue-demi" from
    1、背景:vue3+vite+ts的一个项目打包的时候报错了2、报错截图 3、引入截图 4、修改引入vue-demi->vue5、结果可以正常打包啦~~ ......