且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ADO.net连接字符串错误

更新时间:2023-02-17 08:15:59

只是通过重命名.mdf文件不能重命名数据库。主数据库仍保留实际名称。

使用sp_renamedb'旧名称','新名称'

重命名数据库。
You cannot rename a database just by rename the .mdf file. Master Database still holds the actual name.

use sp_renamedb 'old name','new name'

to rename a database.