Showing posts with label upgrading. Show all posts
Showing posts with label upgrading. Show all posts

Monday, March 19, 2012

Creating SQL script to upgrade database

Hi,
I am in a process of upgrading database. I am using SQL script generated by
enterprise manager, which is read by executed by VB in windows installer
project.
It sets up the entire database only after dropping all tables.
I need each and every table to be checked if it already exists, it should
skip the creation of that table. If that table does not exist, only then it
should create that table.
'Generate SQL script' toll of Enterprise managaer gives just 2 options, if
you donot select DROP objects option, it tries to create all tables without
checking of their existence. If you do select DROP objects option, It drop
each table before it creates new one(loss of data).
Is there an option to avoid this situation ?
Means, any way to create a SQL script which checks wheather the table
exists, If it exists, it does nnot try to create it, otherwise it creates the
table.
Thnx
"BONTZ" <BONTZ@.discussions.microsoft.com> wrote in message
news:6670BE8F-7370-422F-98DB-043DCA3511AA@.microsoft.com...
> I am in a process of upgrading database. I am using SQL script generated
by
> enterprise manager, which is read by executed by VB in windows installer
> project.
> It sets up the entire database only after dropping all tables.
> I need each and every table to be checked if it already exists, it
should
> skip the creation of that table. If that table does not exist, only then
it
> should create that table.
> 'Generate SQL script' toll of Enterprise managaer gives just 2 options,
if
> you donot select DROP objects option, it tries to create all tables
without
> checking of their existence. If you do select DROP objects option, It drop
> each table before it creates new one(loss of data).
> Is there an option to avoid this situation ?
> Means, any way to create a SQL script which checks wheather the table
> exists, If it exists, it does nnot try to create it, otherwise it creates
the
> table.
Without writing the additional code to validate the tables, the CREATE TABLE
statements will simply fail for existing tables -- perhaps just ignore the
errors for those tables?
Steve
|||Hi Steve,
Thnx for the response.
I can ignore the errros.. but I am not running script through query
analyzer. As mentioned before, I am running this script through windows
installer program, which rollsback the installation of my application in case
of any error.
I was wondering that there should be an option provided by enterprise
manager which just checks weather table is already present before creating
one.
Regards
"Steve Thompson" wrote:

> "BONTZ" <BONTZ@.discussions.microsoft.com> wrote in message
> news:6670BE8F-7370-422F-98DB-043DCA3511AA@.microsoft.com...
> by
> should
> it
> if
> without
> the
> Without writing the additional code to validate the tables, the CREATE TABLE
> statements will simply fail for existing tables -- perhaps just ignore the
> errors for those tables?
> Steve
>
>
|||Hi,
You could add your own logic, if you use the script wizard to create the
table create and table drop statements -- check out the way the logic
qualifies whether the table exists before the DROP statement is run.
It will require additional coding, but a possible way to enhance your
script.
Steve
"BONTZ" <BONTZ@.discussions.microsoft.com> wrote in message
news:4332D573-F257-425D-8E80-AADBACAD95B4@.microsoft.com...
> Hi Steve,
> Thnx for the response.
> I can ignore the errros.. but I am not running script through query
> analyzer. As mentioned before, I am running this script through windows
> installer program, which rollsback the installation of my application in
case[vbcol=seagreen]
> of any error.
> I was wondering that there should be an option provided by enterprise
> manager which just checks weather table is already present before creating
> one.
> Regards
>
> "Steve Thompson" wrote:
generated[vbcol=seagreen]
installer[vbcol=seagreen]
then[vbcol=seagreen]
options,[vbcol=seagreen]
drop[vbcol=seagreen]
creates[vbcol=seagreen]
TABLE[vbcol=seagreen]
the[vbcol=seagreen]

Sunday, March 11, 2012

Creating RS 2005 with Visual Studio 2003

Hi All,

My company is condidering upgrading to SQL Server 2005 and/or Visual Studio 2005. We may decide we want to upgrade one without upgrading the other. My concern is the Reporting Services compatibility.

My understanding is that if we decide to upgrade to Visual Studio 2005, we would have to upgrade to Reporting Services 2005 because VS 2005 cannot create reports that are compatible with RS 2000. But if we decide we want to upgrade to RS 2005, we can continue to create the reports in VS 2003 because RS 2005 supports RS 2000 rdl files.

Is this correct?

Thanks!

Yes, you are wright.

But you cannot use the new feature from RS2005 (see http://www.sqlservercentral.com/columnists/kAli/microsoftreportingservices2005featuresandenhanceme.asp )

|||

SQL Server 2000 Report Designer requires Visual Studio 2003. It does not run in Visual Studio 2005.

Note: reports designed with the RS 2000 report designer / VS 2003 can be directly published to a RS 2005 report server (they will be auto-upgraded on publishing on the server).

SQL Server 2005 uses Visual Studio 2005. If you do not have Visual Studio 2005 installed, Setup will install the version of the Visual Studio shell that is necessary for running Report Designer. You cannot use SQL Server 2005 Report Designer to publish reports to a SQL Server 2000 report server.

-- Robert

|||

Thank you both for your answers!

So basically, we'd be ok upgrading to SQL Server 2005 and staying with VS 2003, but can't upgrade to VS 2005 without upgrading SQL Server - unless we want to run VS 2003 AND VS 2005.

|||Correct.