SQL Server 2000/2005 - 维护开发版本和生产版本

时间:2022-06-20 08:48:58

I am used to using Oracle Designer by creating database object definitions, then creating DDL SQL required by connecting to a database instance.

我习惯于通过创建数据库对象定义来使用Oracle Designer,然后通过连接到数据库实例来创建所需的DDL SQL。

For eaxmple, when adding a new column to a table, first I add it to the table definition, then generate the DDL SQL against the development version and run it, then after testing I point to the Production instance to create the missing column in Production.

对于eaxmple,在向表中添加新列时,首先将其添加到表定义中,然后针对开发版本生成DDL SQL并运行它,然后在测试后指向Production实例以在Production中创建缺少的列。

Given that there is no Designer in SQL Server what is the correct procedure to say add a column to both database instances? Is there a tool for keeping the schemas in sync?

鉴于SQL Server中没有Designer,向两个数据库实例添加列的正确步骤是什么?是否有用于保持模式同步的工具?

2 个解决方案

#1


RedGate offer a product called SQL Compare, that can be used to script out the differences between different databases.

RedGate提供了一种名为SQL Compare的产品,可用于编写不同数据库之间的差异。

See: http://www.red-gate.com/products/SQL_Compare/index.htm

You could also use the Database Diagrams within SQL Server Management Studio to design your database schema however this would be constrained to within a given database.

您还可以使用SQL Server Management Studio中的数据库图来设计数据库模式,但这将限制在给定的数据库中。

#2


There isn't a built in tool for keeping them in sync (that I know of), but RedGate has some commercial apps for this.

没有一个内置工具可以让它们保持同步(我知道),但RedGate有一些商业应用程序。

What do you mean there is no designer in SQL Server? Are you using SQL Server Management Studio?

你是什​​么意思在SQL Server中没有设计师?您使用的是SQL Server Management Studio吗?

#1


RedGate offer a product called SQL Compare, that can be used to script out the differences between different databases.

RedGate提供了一种名为SQL Compare的产品,可用于编写不同数据库之间的差异。

See: http://www.red-gate.com/products/SQL_Compare/index.htm

You could also use the Database Diagrams within SQL Server Management Studio to design your database schema however this would be constrained to within a given database.

您还可以使用SQL Server Management Studio中的数据库图来设计数据库模式,但这将限制在给定的数据库中。

#2


There isn't a built in tool for keeping them in sync (that I know of), but RedGate has some commercial apps for this.

没有一个内置工具可以让它们保持同步(我知道),但RedGate有一些商业应用程序。

What do you mean there is no designer in SQL Server? Are you using SQL Server Management Studio?

你是什​​么意思在SQL Server中没有设计师?您使用的是SQL Server Management Studio吗?