Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 DB Owner change into DBO
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Seleck
Starting Member

Germany
14 Posts

Posted - 13 November 2003 :  06:35:21  Show Profile  Visit Seleck's Homepage
I am running two differnt snitz in our intranet enviornment with MS SQL server2000 + NT Authentification.
One snitz is online and running properly. 2nd. one i am using for experimental purpose on same server with different database name and folder (totally seperate, only same server).
Both Snitz are using the same UID define in config.asp as strConnString but diferent database name

for example : in snitz1, UID=test and databse=snitz1
and snitz2, UID=test and database=sniz2

At start, both dbowner are same (test)create via setup.asp defined in config.asp

But Everytime when i import the database from snitz1 to snitz2 via internalservertool DTS, it change the owner of databse into dbo.

This of course cause an error "ODBC Drivers error 80040e14", because the owner defined in config.asp in strConnString is not dbo and cause an error:


Anyone know any suggestion how to import database from one snitz to another without changing of dbowner?

SEL
--------
http://www.bradseleck.com

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 13 November 2003 :  07:01:50  Show Profile
there's a stored procedure you can run to change owners, sp_changeobjectowner I think, do a search on books online

The UK MkIVs Forum
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 13 November 2003 :  07:18:13  Show Profile  Visit HuwR's Homepage
this should not happen if you set the correct users for each of the connections when doing dts, are you by chance using the sa account when you do the transfers ?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 November 2003 :  07:25:34  Show Profile  Send ruirib a Yahoo! Message
You can also assign that user dbowner role and that should fix the permissions issue. Of course, you may not want to do that.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 13 November 2003 :  07:32:44  Show Profile  Visit Seleck's Homepage
No i am using at server my own NT-Loggin account while running dts. it ask you the source and target name of database, you can make choice of both from a list showed in a rollover field. There is no choice to set the dbowner or user while proceeding this process. You can only use Window-Authentification or SQLServer-Authentification.

SEL
--------
http://www.bradseleck.com
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 13 November 2003 :  07:39:56  Show Profile  Visit Seleck's Homepage
further i did this dts procedure with Window-Authentfication. When you use the SQLServer-Authentification, it ask you username and Password, and as i put there the name of user define in config.asp (test: who also got full write and defined as dbowner), dts denied to work

Hey DavidRhodes, can you please give me more detail about "sp_changeobjectowner" ?, it should only change the apropriate tablefields beeing used by snitzer not the whole db.

SEL
--------
http://www.bradseleck.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 13 November 2003 :  07:56:29  Show Profile  Visit HuwR's Homepage
when doing a DTS transfer you can set the user you want to use to connect to both the source and destination databases. the one you set to connect to the destination is the one it will use when creating the tables.

if dts did not work when you used the user in your config.asp, then it does not have all the correct permissions.
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 13 November 2003 :  07:57:50  Show Profile
Taken from books online (press F1 in Enterprise Manager )



sp_changedbowner
Changes the owner of the current database.

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 Server™ 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'

The UK MkIVs Forum
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 14 November 2003 :  06:30:35  Show Profile  Visit Seleck's Homepage
I make it work with DTS though i had to change into each tablefield manually the sourcetarget from "dbo" to "test".
Every thing work properly and you can see all datas in test snitz too. But ... well i wish this But isn't there..
Everytime when a new user try to post a new registration, it cause following error:

=================================================================
Compilingerror in Microsoft VBScript- Error '800a03ea'


Syntaxerror

/iisHelp/common/500-100.asp, line 129

elseIf (objASPError.Description > "") Then

Microsoft OLE DB Provider for ODBC Drivers- Error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]the ZERO value cannot insert in the MEMBER_ID-columne of SNITZ2.dbo.FORUM_MEMBERS-Tabell. the columne do not allow Zero-Value. Error by INSERT.

/forum2/register.asp, line 599
=================================================================
All tabell allow the zero value so that can't be the reason.

Anysuggestion or help ???

SEL
--------
http://www.bradseleck.com
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 November 2003 :  09:18:49  Show Profile  Send ruirib a Yahoo! Message
You should have created the tables, using setup.asp before using DTS. Right now you will probably need to set that field as an identity field.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 November 2003 :  09:22:21  Show Profile  Send ruirib a Yahoo! Message
Anyway, this already had been asked before in another thread. Do not double post, ok?!


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 17 November 2003 :  02:28:18  Show Profile  Visit Seleck's Homepage
Oh well sorry ruirib,

I won't dare to ask any thing here, if you are going to command me not to ask any thing here or you could have referred to the link of this topic. Thank you for your friendly command.

SEL
--------
http://www.bradseleck.com
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 17 November 2003 :  03:34:14  Show Profile  Visit Gremlin's Homepage
You might find this usefull in the future when in similar circumstances it will change owners on all user tables in a database for you in one step.


SELECT 'EXEC(''sp_changeobjectowner @objname = '''''+
ltrim(u.name) + '.' + ltrim(s.name) + ''''''   
+ ', @newowner = dbo'')'FROM  sysobjects s,
sysusers u
WHERE s.uid = u.uid
AND   u.name <> 'dbo'
AND   xtype in ('V', 'P', 'U')
AND   u.name not like 'INFORMATION%'
order by s.name

basically just change the bit in red to the new owner you require.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 17 November 2003 :  04:53:03  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by Seleck

Oh well sorry ruirib,

I won't dare to ask any thing here, if you are going to command me not to ask any thing here or you could have referred to the link of this topic. Thank you for your friendly command.


At Snitz we strongly discourage double posting. It's a waste of space and effort from the mods/admins team. It's just too bad if you don't like it, but I won't change the way I moderate the forums assigned to me, just to please you .


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 17 November 2003 :  06:10:25  Show Profile  Visit Seleck's Homepage
Hi Gremlin.

Million thanx for this solution. I am using this now its working perfectly. Me and our Intranet users will enjoy snitz full performance now . Thanx again

regards

SEL
--------
http://www.bradseleck.com
Go to Top of Page

Seleck
Starting Member

Germany
14 Posts

Posted - 17 November 2003 :  06:26:59  Show Profile  Visit Seleck's Homepage
Ruirib,

I am agree with you about double pasting, but did you read my problem realy carefully ? I guess you didn't.

It has nothing to do with the previous subject. It says how to keep the owner of a db while importing a databse from an existing db to another one.

You won't please me telling me you are a admin and you have a gun to shoot anyone who paste double message. Just think some people are new here and they are in a learning procedure and they might ask sometime stupid help and questions, those have been asked mayn time, Are you going to deal them with same attitude ??

There are thousands of subjects beeing repeated many time in such forums. sure its not good and you guys as forum's admin have to advice people avoiding this. But ruirib, a friendly way won't be bad and people would understand instead feeling insulted.

you might be Moderator or superadmin of this forum ruirib, but ton make the music and you are not doing a favor to snitz, when you start beeing unfriendly with people. You may take an example of Gremilin, He was able to read, detect the problem and answer me with a pefect working solution. Me and users of our intranet are thankfull for his help.

you may delete me and all my posted message now from this forum, because i am crticising you and your unfriendly attitude, but this won't change the fact, Your this "OK!!" was very unfriendly.

regards

SEL
--------
http://www.bradseleck.com

Edited by - Seleck on 17 November 2003 06:30:34
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07