Hello,
I have been using a 32 bit DLL in SQL Server 2000 extended stored procedures
and it works just fine. Now I have upgraded my SQL Server 2000 32 bit to SQL
Server 2005 64 bit edition.
The same extended stored procedures now give error when I call them using
sp_OACreate.. It gives the error "Class not registered" even though the DLL
file is present in the "SysWow64" folder and it has been correctly registered
using regsvr32.
On a SQL Server 2005 32 bit edition, it works well. So, it is just the SQL
Server 2005 64 bit edition that seems cannot load the 32 bit DLL.. Is that
right?. What options do I have now so that I can continue the use the same 32
bit DLLs in 64 bit SQl Server 2005?.
Thanks for any help!
GaneshHi Ganesh
I am not an expert on this but it looks like only 64 but registrations can
be used by sp_OA... but I have not found anything to say that is the case.
John
"Ganesh Muthuvelu" wrote:
> Hello,
> I have been using a 32 bit DLL in SQL Server 2000 extended stored procedures
> and it works just fine. Now I have upgraded my SQL Server 2000 32 bit to SQL
> Server 2005 64 bit edition.
> The same extended stored procedures now give error when I call them using
> sp_OACreate.. It gives the error "Class not registered" even though the DLL
> file is present in the "SysWow64" folder and it has been correctly registered
> using regsvr32.
> On a SQL Server 2005 32 bit edition, it works well. So, it is just the SQL
> Server 2005 64 bit edition that seems cannot load the 32 bit DLL.. Is that
> right?. What options do I have now so that I can continue the use the same 32
> bit DLLs in 64 bit SQl Server 2005?.
> Thanks for any help!
> Ganesh|||For a 64 bit installation, you need 64 bits dll's.
You cannot mix 64 and 32 bit code in one process, that's why you cannot
use 32 bits dll's in a 64 bit process (or vice versa).
Ganesh Muthuvelu wrote:
> Hello,
> I have been using a 32 bit DLL in SQL Server 2000 extended stored procedures
> and it works just fine. Now I have upgraded my SQL Server 2000 32 bit to SQL
> Server 2005 64 bit edition.
> The same extended stored procedures now give error when I call them using
> sp_OACreate.. It gives the error "Class not registered" even though the DLL
> file is present in the "SysWow64" folder and it has been correctly registered
> using regsvr32.
> On a SQL Server 2005 32 bit edition, it works well. So, it is just the SQL
> Server 2005 64 bit edition that seems cannot load the 32 bit DLL.. Is that
> right?. What options do I have now so that I can continue the use the same 32
> bit DLLs in 64 bit SQl Server 2005?.
> Thanks for any help!
> Ganeshsql
Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts
Thursday, March 22, 2012
Tuesday, March 6, 2012
2005: change all schema to dbo?
My hosting service moved my database to sql server 2005 and the schema
for the tables and procedures is no longer 'dbo'. I need to change all
the object owners back to 'dbo'. There was a script in sql 2000 to do
this, but not finding one for 2005. You would think people need to do
this often enough that there would be a menu command to do it in
management studio. I guess this is too obvious.
I can't find anything in BOL, all I know is from google. Some sort of
looping script over all the objects with ALTER SCHEMA? Or would there be
another trick to get the application working again?
Have a look in Books Online at ALTER SCHEMA ... TRANSFER
You could generate the list using:
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.tables
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.views
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.procedures
WHERE schema_id != SCHEMA_ID('dbo');
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Paul" <invalid@.nospam.net> wrote in message
news:%23TBgQo%23aHHA.4140@.TK2MSFTNGP06.phx.gbl...
> My hosting service moved my database to sql server 2005 and the schema for
> the tables and procedures is no longer 'dbo'. I need to change all the
> object owners back to 'dbo'. There was a script in sql 2000 to do this,
> but not finding one for 2005. You would think people need to do this often
> enough that there would be a menu command to do it in management studio. I
> guess this is too obvious.
> I can't find anything in BOL, all I know is from google. Some sort of
> looping script over all the objects with ALTER SCHEMA? Or would there be
> another trick to get the application working again?
>
|||Perfect thanks. You just run the output of these select statements.
Aaron Bertrand [SQL Server MVP] wrote:
> Have a look in Books Online at ALTER SCHEMA ... TRANSFER
> You could generate the list using:
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.tables
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.views
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.procedures
> WHERE schema_id != SCHEMA_ID('dbo');
>
for the tables and procedures is no longer 'dbo'. I need to change all
the object owners back to 'dbo'. There was a script in sql 2000 to do
this, but not finding one for 2005. You would think people need to do
this often enough that there would be a menu command to do it in
management studio. I guess this is too obvious.
I can't find anything in BOL, all I know is from google. Some sort of
looping script over all the objects with ALTER SCHEMA? Or would there be
another trick to get the application working again?
Have a look in Books Online at ALTER SCHEMA ... TRANSFER
You could generate the list using:
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.tables
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.views
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.procedures
WHERE schema_id != SCHEMA_ID('dbo');
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Paul" <invalid@.nospam.net> wrote in message
news:%23TBgQo%23aHHA.4140@.TK2MSFTNGP06.phx.gbl...
> My hosting service moved my database to sql server 2005 and the schema for
> the tables and procedures is no longer 'dbo'. I need to change all the
> object owners back to 'dbo'. There was a script in sql 2000 to do this,
> but not finding one for 2005. You would think people need to do this often
> enough that there would be a menu command to do it in management studio. I
> guess this is too obvious.
> I can't find anything in BOL, all I know is from google. Some sort of
> looping script over all the objects with ALTER SCHEMA? Or would there be
> another trick to get the application working again?
>
|||Perfect thanks. You just run the output of these select statements.
Aaron Bertrand [SQL Server MVP] wrote:
> Have a look in Books Online at ALTER SCHEMA ... TRANSFER
> You could generate the list using:
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.tables
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.views
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.procedures
> WHERE schema_id != SCHEMA_ID('dbo');
>
2005: change all schema to dbo?
My hosting service moved my database to sql server 2005 and the schema
for the tables and procedures is no longer 'dbo'. I need to change all
the object owners back to 'dbo'. There was a script in sql 2000 to do
this, but not finding one for 2005. You would think people need to do
this often enough that there would be a menu command to do it in
management studio. I guess this is too obvious.
I can't find anything in BOL, all I know is from google. Some sort of
looping script over all the objects with ALTER SCHEMA? Or would there be
another trick to get the application working again?Have a look in Books Online at ALTER SCHEMA ... TRANSFER
You could generate the list using:
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.tables
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.views
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.procedures
WHERE schema_id != SCHEMA_ID('dbo');
--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Paul" <invalid@.nospam.net> wrote in message
news:%23TBgQo%23aHHA.4140@.TK2MSFTNGP06.phx.gbl...
> My hosting service moved my database to sql server 2005 and the schema for
> the tables and procedures is no longer 'dbo'. I need to change all the
> object owners back to 'dbo'. There was a script in sql 2000 to do this,
> but not finding one for 2005. You would think people need to do this often
> enough that there would be a menu command to do it in management studio. I
> guess this is too obvious.
> I can't find anything in BOL, all I know is from google. Some sort of
> looping script over all the objects with ALTER SCHEMA? Or would there be
> another trick to get the application working again?
>|||Perfect thanks. You just run the output of these select statements.
Aaron Bertrand [SQL Server MVP] wrote:
> Have a look in Books Online at ALTER SCHEMA ... TRANSFER
> You could generate the list using:
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.tables
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.views
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.procedures
> WHERE schema_id != SCHEMA_ID('dbo');
>
for the tables and procedures is no longer 'dbo'. I need to change all
the object owners back to 'dbo'. There was a script in sql 2000 to do
this, but not finding one for 2005. You would think people need to do
this often enough that there would be a menu command to do it in
management studio. I guess this is too obvious.
I can't find anything in BOL, all I know is from google. Some sort of
looping script over all the objects with ALTER SCHEMA? Or would there be
another trick to get the application working again?Have a look in Books Online at ALTER SCHEMA ... TRANSFER
You could generate the list using:
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.tables
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.views
WHERE schema_id != SCHEMA_ID('dbo');
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
FROM sys.procedures
WHERE schema_id != SCHEMA_ID('dbo');
--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Paul" <invalid@.nospam.net> wrote in message
news:%23TBgQo%23aHHA.4140@.TK2MSFTNGP06.phx.gbl...
> My hosting service moved my database to sql server 2005 and the schema for
> the tables and procedures is no longer 'dbo'. I need to change all the
> object owners back to 'dbo'. There was a script in sql 2000 to do this,
> but not finding one for 2005. You would think people need to do this often
> enough that there would be a menu command to do it in management studio. I
> guess this is too obvious.
> I can't find anything in BOL, all I know is from google. Some sort of
> looping script over all the objects with ALTER SCHEMA? Or would there be
> another trick to get the application working again?
>|||Perfect thanks. You just run the output of these select statements.
Aaron Bertrand [SQL Server MVP] wrote:
> Have a look in Books Online at ALTER SCHEMA ... TRANSFER
> You could generate the list using:
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.tables
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.views
> WHERE schema_id != SCHEMA_ID('dbo');
> SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
> FROM sys.procedures
> WHERE schema_id != SCHEMA_ID('dbo');
>
Subscribe to:
Posts (Atom)