首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

在Powershell中调用sqlcmd时,如何指定区域/语言/区域性设置?

在Powershell中调用sqlcmd时,可以使用以下方法指定区域/语言/区域性设置:

  1. 使用Set-Variable命令设置环境变量:Set-Variable -Name "LC_ALL" -Value "en_US.UTF-8"
  2. 使用System.Threading.Thread::CurrentThread.CurrentCulture属性设置当前线程的区域设置:[System.Threading.Thread]::CurrentThread.CurrentCulture = 'en-US'
  3. 使用System.Globalization.CultureInfo::CurrentCulture属性设置当前进程的区域设置:[System.Globalization.CultureInfo]::CurrentCulture = 'en-US'

这些方法可以在调用sqlcmd之前设置区域/语言/区域性设置,确保sqlcmd在执行时使用指定的设置。

关于Powershell中调用sqlcmd的更多信息,您可以参考腾讯云的云数据库SQL Server产品,该产品提供了强大的云数据库服务,支持Powershell脚本调用sqlcmd进行数据库操作。您可以访问以下链接了解更多信息:

腾讯云云数据库SQL Server产品介绍

请注意,以上答案仅供参考,具体的设置方法可能会因环境和需求而有所不同。

页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

部署Skype for Business Server 2015 数据库SQL 高可用AlwayOn

原文链接:http://blogs.technet.com/b/uclobby/archive/2015/05/08/deploying-sql-server-alwayson-availability-group-for-skype-for-business-server-2015.aspx Deploying SQL Server AlwaysOn Availability Group for Skype for Business Server 2015      In Lync Server 2013, there were requests regarding an alternative to SQL Mirroring for SQL Server High Availability. This was related to the fact that SQL Mirroring was marked as a feature to be removed in future SQL Server versions: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use AlwaysOn Availability Groups instead. in SQL Server 2014 - Database Mirroring (SQL Server) - https://msdn.microsoft.com/en-us/library/ms189852.aspx In Lync Server 2013, it was common to have SQL Server High Availability using SQL Mirroring. The reason for this was that Topology Builder did all the hard work for us. Another supported scenario was to use SQL failover clustering, but in this case we need to manually deploy it: Database software support in Lync Server 2013 https://technet.microsoft.com/en-us/library/gg398990.aspx The good news is Skype for Business Server 2015 comes with AlwaysOn Availability Groups:

03
领券