Showing posts with label planning. Show all posts
Showing posts with label planning. Show all posts

Tuesday, February 14, 2012

Can a 64 bit database be attached to a 32 bit SQL Server?

We are planning to switch our Sql Server 2000 to Sql Server 2005 64 bit
edition. Once I attached the current database to the 64 bit Sql Server and
some changes are made to the database (new records in tables) is it possible
to go back to the 32 bit version of SQL Server with the changed database? I
created a test database on my 64 bit SQL Server, detached it and tried to
attach it to a 32 bit SQL Server. I am getting the following error "Error
602: Could not find row in sysindexes for database ID 10, object ID 1, index
ID 1. Run DBCC CHECKTABLE on sysindexes. Attaching database has failed."
Thank you
Simona wrote:
> We are planning to switch our Sql Server 2000 to Sql Server 2005 64 bit
> edition. Once I attached the current database to the 64 bit Sql Server and
> some changes are made to the database (new records in tables) is it possible
> to go back to the 32 bit version of SQL Server with the changed database? I
> created a test database on my 64 bit SQL Server, detached it and tried to
> attach it to a 32 bit SQL Server. I am getting the following error "Error
> 602: Could not find row in sysindexes for database ID 10, object ID 1, index
> ID 1. Run DBCC CHECKTABLE on sysindexes. Attaching database has failed."
> Thank you
>
You're not only crossing platforms, you're also crossing product
versions. Databases are transportable between platforms (i.e. 64-bit to
32-bit and vice-versa) but not between versions. You can go from SQL
2000 to SQL 2005, but not the reverse.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Can a 64 bit database be attached to a 32 bit SQL Server?

We are planning to switch our Sql Server 2000 to Sql Server 2005 64 bit
edition. Once I attached the current database to the 64 bit Sql Server and
some changes are made to the database (new records in tables) is it possible
to go back to the 32 bit version of SQL Server with the changed database? I
created a test database on my 64 bit SQL Server, detached it and tried to
attach it to a 32 bit SQL Server. I am getting the following error "Error
602: Could not find row in sysindexes for database ID 10, object ID 1, index
ID 1. Run DBCC CHECKTABLE on sysindexes. Attaching database has failed."
Thank youSimona wrote:
> We are planning to switch our Sql Server 2000 to Sql Server 2005 64 bit
> edition. Once I attached the current database to the 64 bit Sql Server and
> some changes are made to the database (new records in tables) is it possib
le
> to go back to the 32 bit version of SQL Server with the changed database?
I
> created a test database on my 64 bit SQL Server, detached it and tried to
> attach it to a 32 bit SQL Server. I am getting the following error "Error
> 602: Could not find row in sysindexes for database ID 10, object ID 1, ind
ex
> ID 1. Run DBCC CHECKTABLE on sysindexes. Attaching database has failed."
> Thank you
>
You're not only crossing platforms, you're also crossing product
versions. Databases are transportable between platforms (i.e. 64-bit to
32-bit and vice-versa) but not between versions. You can go from SQL
2000 to SQL 2005, but not the reverse.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Friday, February 10, 2012

Calling VBA functions from SQL

I have a rather complex function (part of a production planning engine) that is written in VBA, and is part of my front end app. I'd like to be able to somehow call this function from either a sproc or DTS package in SQL. Is this possible, or am I going to have to convert the function to a SQL sproc (ugh)?Plop the VBA script into an Active-X task within a DTS package, and you should be "good to go". Another choice that folks often overlook is to make the VBA an ActiveX Script step in a SQL Agent job.

-PatP|||Thanks, Pat.

I was thinking along those lines, so I did a little more research while waiting for an answer. It appears that VBScript (and ActiveX??) doesn't like arrays, especially the dynamic variety. I think what I'm trying to do may be misuse of a sproc, but since I want the task to run as part of a rather large string of scheduled tasks, I'm stuck with converting it.