Showing posts with label versioning. Show all posts
Showing posts with label versioning. Show all posts

Friday, February 17, 2012

Database Versioning?

Hi,

Could someone point me in the right direction? I have an internal development database and a production database. Is there an easy way to replicate the changes that have been made to the development version on the production server without modifying the actual data in the tables? So, if I add a new user in my development version I offcourse don't want to see it pop up in the live version. But adding/deleting/updating a new table or column should.

And if possible I'd also like to know how you could do the following: Let's say we have an OrderDetail table containing information about the purchased product. Let's say I'd like to add a new column 'total' to skip calculation on the database every time I want to know the totals. It should be able to initialise the value by doing 'times ordered * price' for every existing row. Is that possible as well?

Srry for the noob questions Smile

edit: Using MSSQL 2005

There are tools like Red-Gate Compare and Visual Studio for Database Professionals that might be helpful for this situation.

Check out "Computed Columns" in the Books Online.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||http://www.red-gate.com/

And ApexSQL has a tool for this too, I believe.
http://www.apexsql.com/sql_tools_script.asp

HTH...

Joe|||

Also, check out Visual Studio 2005 Team Edition for Database Professionals.

http://msdn2.microsoft.com/en-us/teamsystem/aa718807.aspx

Database Versioning?

Hi,

Could someone point me in the right direction? I have an internal development database and a production database. Is there an easy way to replicate the changes that have been made to the development version on the production server without modifying the actual data in the tables? So, if I add a new user in my development version I offcourse don't want to see it pop up in the live version. But adding/deleting/updating a new table or column should.

And if possible I'd also like to know how you could do the following: Let's say we have an OrderDetail table containing information about the purchased product. Let's say I'd like to add a new column 'total' to skip calculation on the database every time I want to know the totals. It should be able to initialise the value by doing 'times ordered * price' for every existing row. Is that possible as well?

Srry for the noob questions Smile

edit: Using MSSQL 2005

There are tools like Red-Gate Compare and Visual Studio for Database Professionals that might be helpful for this situation.

Check out "Computed Columns" in the Books Online.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||http://www.red-gate.com/

And ApexSQL has a tool for this too, I believe.
http://www.apexsql.com/sql_tools_script.asp

HTH...

Joe|||

Also, check out Visual Studio 2005 Team Edition for Database Professionals.

http://msdn2.microsoft.com/en-us/teamsystem/aa718807.aspx

Database versioning SQL Server 2000

Where can we find a Database Version Control Tool for all the database objects, not only for stored procedures like Visual SourceSafe.I am not sure exactly what you are after but if you want to be able to capture scripts of all objects in a database into sourcesafe then try:

http://www.sqlservercentral.com/products/bwunder/archiveutility/

for a neat little freeware utility.

P.S. You may need to register on sqlservercentral.com|||There is SQL Source Control 2003 http://www.skilledsoftware.com/sqlsourcecontrol.htm and Embarcadero Change Manager. The first uses integration with MS Visual Source Safe, the second stores scripted versions locally or on the server. I never worked with any of them though.|||check out these links, may be they'll be helpful.

http://www.nigelrivett.net/DMOScriptAllDatabases.html
http://www.nigelrivett.net/SQLServerReleaseControl.htm

database versioning

Hey any admin should know this stuff cold but I'm a little fuzzy, hope you
can help!
I have a database mydb, about 5gb.
I want to keep a copy of it on the server, but as mydb_old.
(yes I have space for it!)
What's a good way to get it there, database copy wizard, copying files,
backup/restore?
Thanks.
(I want to keep the original mydb also, with the same filegroup filenames.
I'll do further work on mydb, but may want to reference the old mydb_old)
Josh
Tibor,
Thanks.
Josh
"Tibor Karaszi" wrote:

> I prefer backup/restore. When you restore, obviously you specify the "mydb_old" name for the
> database and also use the MOVE clause to specify new physical filenames for each file. Something
> like:
> RESTORE DATABASE mydb_old
> FROM ...
> WITH
> MOVE 'mydb_data' to 'C:\mydb_data.mdf'
> ,MOVE 'mydb_log' to 'C:\mydb_log.ldf'
> ...
> You can later change the *logical* names for each database file (ALTER DATABASE), but it isn't
> really neccesary (logical filenames doesn't have to be unique within the instance, only within the
> database).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "JRStern" <JRStern@.discussions.microsoft.com> wrote in message
> news:19322621-FA70-4987-8475-05FC5EEA4355@.microsoft.com...
>

database versioning

Hey any admin should know this stuff cold but I'm a little fuzzy, hope you
can help!
I have a database mydb, about 5gb.
I want to keep a copy of it on the server, but as mydb_old.
(yes I have space for it!)
What's a good way to get it there, database copy wizard, copying files,
backup/restore?
Thanks.
(I want to keep the original mydb also, with the same filegroup filenames.
I'll do further work on mydb, but may want to reference the old mydb_old)
JoshI prefer backup/restore. When you restore, obviously you specify the "mydb_old" name for the
database and also use the MOVE clause to specify new physical filenames for each file. Something
like:
RESTORE DATABASE mydb_old
FROM ...
WITH
MOVE 'mydb_data' to 'C:\mydb_data.mdf'
,MOVE 'mydb_log' to 'C:\mydb_log.ldf'
...
You can later change the *logical* names for each database file (ALTER DATABASE), but it isn't
really neccesary (logical filenames doesn't have to be unique within the instance, only within the
database).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"JRStern" <JRStern@.discussions.microsoft.com> wrote in message
news:19322621-FA70-4987-8475-05FC5EEA4355@.microsoft.com...
> Hey any admin should know this stuff cold but I'm a little fuzzy, hope you
> can help!
> I have a database mydb, about 5gb.
> I want to keep a copy of it on the server, but as mydb_old.
> (yes I have space for it!)
> What's a good way to get it there, database copy wizard, copying files,
> backup/restore?
> Thanks.
> (I want to keep the original mydb also, with the same filegroup filenames.
> I'll do further work on mydb, but may want to reference the old mydb_old)
> Josh
>
>|||Tibor,
Thanks.
Josh
"Tibor Karaszi" wrote:
> I prefer backup/restore. When you restore, obviously you specify the "mydb_old" name for the
> database and also use the MOVE clause to specify new physical filenames for each file. Something
> like:
> RESTORE DATABASE mydb_old
> FROM ...
> WITH
> MOVE 'mydb_data' to 'C:\mydb_data.mdf'
> ,MOVE 'mydb_log' to 'C:\mydb_log.ldf'
> ...
> You can later change the *logical* names for each database file (ALTER DATABASE), but it isn't
> really neccesary (logical filenames doesn't have to be unique within the instance, only within the
> database).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "JRStern" <JRStern@.discussions.microsoft.com> wrote in message
> news:19322621-FA70-4987-8475-05FC5EEA4355@.microsoft.com...
> > Hey any admin should know this stuff cold but I'm a little fuzzy, hope you
> > can help!
> >
> > I have a database mydb, about 5gb.
> >
> > I want to keep a copy of it on the server, but as mydb_old.
> >
> > (yes I have space for it!)
> >
> > What's a good way to get it there, database copy wizard, copying files,
> > backup/restore?
> >
> > Thanks.
> >
> > (I want to keep the original mydb also, with the same filegroup filenames.
> > I'll do further work on mydb, but may want to reference the old mydb_old)
> >
> > Josh
> >
> >
> >
>