powershell + SQL 服务器提供商
在 powershell 中使用 sql server 提供程序时,我传递的路径第一次运行正常,但第二次运行时出现错误。这就像我必须以某种方式清除驱动器?
例子: sl "SQLSERVER:SQL\SERVERNAME\DEFAULT\DATABASES\DATABASENAME\Tables" 第一次运行时工作正常。位置设置成功。但是,当我第二次运行它时,我收到此错误: Set-Location:SQL Server PowerShell 提供程序错误:指定的键数与寻址此对象所需的键数不匹配。需要的钥匙数量 红色是:Schema.Name。
顺便说一句,我正在使用 quest powergui。请帮忙,这让我发疯。
When using the sql server provider in powershell, the path I pass works fine the first time, but upon the second run it errors out on me. It's like I have to clear the drive somehow?
Example:
sl "SQLSERVER:SQL\SERVERNAME\DEFAULT\DATABASES\DATABASENAME\Tables"
works fine the upon the first run. The location is successfully set. But, when I run it a 2nd time, I get this error:
Set-Location : SQL Server PowerShell provider error: The number of keys specified does not match the number of keys required to address this object. The number of keys requi
red are: Schema.Name.
I'm using quest powergui btw. Please help, this is driving me mad.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,您正在使用相对路径(即,它在提供程序之后不以斜杠开头:)。因此,首先您设置了相对于默认根文件夹的位置。然后,您尝试再次设置位置,但您已经位于“tables”文件夹中,其中没有“SQL\SERVERNAME...”文件夹。
这有什么意义吗?
Looks to me like you're using a relative path (i.e. it doesn't start with a slash after the provider:). So, first you've set the location relative to the default--root folder. Then, you try to set the location again, but you're already in the "tables" folder, which doesn't have a "SQL\SERVERNAME..." folder inside it.
Does that make any sense?