Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: error conversion db
Hi,
as OMW is telling you:
Use the SQL Server 7 sp_changedbowner/sp_changeobjectowner procedure
to assign a valid login as owner of the table.
Below is the help from SQLServer2000, I'm not sure about the differences
with SQLServer7.
Syntax
sp_changedbowner [ @loginame = ] 'login'
[ , [ @map = ] remap_alias_flag ]
Arguments
[@loginame =] 'login'
Is the login ID of the new owner of the current database. login is sysname, with no default. login must be Microsoft® SQL ServerT login or a Microsoft Windows NT® user that already exists. login cannot become the owner of the current database if it already has access to the database through an existing alias or user security account within the database. To avoid this, drop the alias or user within the current database first.
[@map =] remap_alias_flag
Is the value true or false, which indicates whether existing aliases to the old database owner (dbo) are mapped to the new owner of the current database or dropped. remap_alias_flag is varchar(5), with a default of NULL, indicating any existing aliases to the old dbo are mapped to the new owner of the current database. false indicates that existing aliases to the old database owner are dropped.
Return Code Values
0 (success) or 1 (failure)
Remarks
After sp_changedbowner is executed, the new owner is known as the dbo user
inside the database. The dbo has implied permissions to perform all
activities in the database.
The owner of the master, model, or tempdb system databases cannot be changed.
To display a list of the valid login values, execute the sp_helplogins stored procedure.
Executing sp_changedbowner with only the login parameter changes database ownership to login and maps the aliases of users who were previously aliased to dbo to the new database owner.
Permissions
Only members of the sysadmin fixed server role or the owner of the current
database can execute sp_changedbowner.
Examples
This example makes the user Albert the owner of the current database and
maps existing aliases to the old database owner to Albert.
EXEC sp_changedbowner 'Albert'
>> ("SYS"."OM_OBJ_INFO"."OBJ_OWNER")
I would strongly suggest you do not create the OMW dictionary
in the SYS schema. Create seperate users for it.
Andre van Winssen
"supporto" <supporto_at_tamautomazione.com> wrote in message
news:Fu_j8.65199$Ns4.2724726_at_news2.tin.it...
> After trying to convert my db from sql server7 to oracle 8.1.7 with
> migration workbench i have receive
> 1186 errors .... !!!!
>
> i don't know how to resolve it .... please anyone can help me ?
>
> --------------------------------------------------------------------------
--Received on Thu Mar 14 2002 - 05:02:12 CST
> -------------------------------------------
> CentriCo : Table. Owner name is NULL. Use the SQL Server 7
> sp_changedbowner/sp_changeobjectowner procedure
> to assign a valid login as owner of the table
> --------------------------------------------------------------------------
--
> -------------------------------------------
> EXCEPTION : SQLServer7SourceModelMap.mapForeignKeys(): CodGuast_FK00,
> oracle.mtg.migration.MigrationSQLException: ORA-01400: cannot insert NULL
> into ("SYS"."OM_FORN_KEY_INFO"."REF_OWNER") :ORA-01400: cannot insert NULL
> into ("SYS"."OM_FORN_KEY_INFO"."REF_OWNER")
> --------------------------------------------------------------------------
--
> -------------------------------------------
> EXCEPTION : SQLServer7SourceModelMap.mapIndices(): Aggregazioni,
> oracle.mtg.migration.MigrationSQLException: ORA-01400: cannot insert NULL
> into ("SYS"."OM_INDEX_INFO"."TABLE_NAME") :ORA-01400: cannot insert NULL
> into ("SYS"."OM_INDEX_INFO"."TABLE_NAME")
> --------------------------------------------------------------------------
--
> -------------------------------------------
> EXCEPTION : SQLServer7SourceModelMap.mapPrimaryKeys(): PKAggregati,
> oracle.mtg.migration.MigrationSQLException: ORA-01400: cannot insert NULL
> into ("SYS"."OM_OBJ_INFO"."OBJ_OWNER") :ORA-01400: cannot insert NULL into
> ("SYS"."OM_OBJ_INFO"."OBJ_OWNER")
> --------------------------------------------------------------------------
--
> -------------------------------------------
> EXCEPTION : SQLServer7SourceModelMap.mapTables(): Aggregati,
> oracle.mtg.migration.MigrationSQLException: ORA-00903: invalid table name
> :ORA-00903: invalid table name
>
>
> thanks bye
> Ale
>
>