Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anushachanda1
Starting Member
3 Posts |
Posted - 2011-07-14 : 03:29:05
|
I want to create a flat database to test an upgrade script.Can anyone tell me how to create a flat database in sql server 2005. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-14 : 03:39:18
|
what is a flat database ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
anushachanda1
Starting Member
3 Posts |
Posted - 2011-07-14 : 03:55:01
|
As per my knowledge , it contains no data. I want to test an upgrade script which changes the version of the database. |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-14 : 04:04:52
|
no data. How about tables ? other objects like view, stored procedure etc ?If you just want an empty database, then use CREATE DATABASE to do it. KH[spoiler]Time is always against us[/spoiler] |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-14 : 04:09:51
|
the definition here deffer from yours http://www.businessdictionary.com/definition/flat-database.htmlquote: DefinitionSimple database design consisting of one large table instead of several interconnected tables of a relational database. Called 'flat' because of its only two dimensional (data fields and records) structure, these databases cannot represent complex data relationships. Also called flat file database or flatform database.
quote: As per my knowledge , it contains no data.
Lets just ignore the terminology here and explain what do you want ?quote: I want to test an upgrade script which changes the version of the database.
what version are you talking about ? You can't really change the version of the database. It is automatically performed by SQL Server when you restore or attached a lower database version. You can change the compatibility level of the database. Is this what you are talking about ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
anushachanda1
Starting Member
3 Posts |
Posted - 2011-07-14 : 04:53:09
|
Whatever database the definition is talking about, i want to know how that database is created. Upgrade Scripts are the scripts which increase the database and stored procedure version of my product and also have the related database changes.So when the upgrade script is written it needs to be tested over a database.I have created an upgrade script and i want to test it over a flat database ,since i want all the changes added to the script to be working. Normal database already contains the added functionality in the script. Excuse if i confuse you. Very new to these concepts. |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-14 : 10:20:33
|
quote: i want to know how that database is created.
Normally a database is create with the commandCREATE DATABASE YourDatabase quote: I have created an upgrade script and i want to test it over a flat database ,since i want all the changes added to the script to be working. Normal database already contains the added functionality in the script.
You need to have a database with a older "version". We will not be able to help you create that "flat" database. If you are the developer, you should have the old "version" of the database backup somewhere for the testing. KH[spoiler]Time is always against us[/spoiler] |
 |
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2011-07-14 : 16:06:08
|
I would also state that you really do not want to upgrade an 'empty' database. That is, a database with all of the objects for your application (tables, procedures, functions, views, etc...) and no data.You upgrade scripts may work on a table with no data - but fail horribly when applied to a table with millions of rows of data.Jeff |
 |
|
|
|
|
|
|