简体   繁体   English

如何使用 pm> Update-Database 命令?

[英]how to use pm> Update-Database command?

i am trying to run the command Update-Database in package manager console.我正在尝试在 package 管理器控制台中运行命令Update-Database the following errors appears.出现以下错误。

this is the connection string I tried using这是我尝试使用的连接字符串
"ConnectionStrings": { "sqlserver": "nvlohuqx:YXGg4spm1KAvIidbFufyLMt9HeCZMZDD@surus.db.elephantsql.com:5432/nvlohuqx" }

it showed this error它显示了这个错误

“Format Of The Initialization String Does Not Conform To Specification Starting At Index X” “初始化字符串的格式不符合从索引 X 开始的规范”

and then after I changed the format for the connection string to the following:然后在我将连接字符串的格式更改为以下内容之后:

"sqlserver": "Server=surus.db.elephantsql.com;Database=nvlohuqx;User Id=nvlohuqx;Password=YXGg4spm1KAvIidbFufyLMt9HeCZMZDD;"

I get this new error:我收到这个新错误:

"A.network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" “与 SQL 服务器建立连接时出现与网络相关或特定于实例的错误。未找到服务器或无法访问该服务器。验证实例名称是否正确以及 SQL 服务器是否配置为允许远程连接。(提供者:命名管道提供程序,错误:40 - 无法打开与 SQL 服务器的连接)”

I recommend use Ip instead of domain on Server = ""我建议在 Server = "" 上使用 Ip 而不是域

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM