Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有表、函数、存储过程的 SQL SERVER 数据库。我想将此数据库复制到具有不同名称的相同服务器。
如果我的原始数据库的名称是 DB_ORIG 并且我想要复制/克隆到一个名为 DB_NEW 的新数据库,你能给我确切的命令来复制数据库吗?
有很多方法。
最简单的可能是备份数据库,然后用新名称恢复它。
确保没有通过名称显式引用旧数据库的视图、函数或过程。