Service Desk Practitioners Forum
cancel

Import/export data base

SOLVED
Go to solution
Highlighted
bad
Respected Contributor.

Import/export data base

Hello
i have got windows server 2003,sql server 2000, SD 5.0
How can i export/import all SD data base from one sql server to another?I allways get error about foreign key....
11 REPLIES
Vasily Kamenev
Acclaimed Contributor.

Re: Import/export data base

Hi
Why are you not use standard backup tools from SQL?

Vasily
bad
Respected Contributor.

Re: Import/export data base

So, i can make backup XX.bak on server A and then restore database on server B from backup XX.bak.
And HP SD should work on server B?
Vasily Kamenev
Acclaimed Contributor.

Re: Import/export data base

Yes, after restore, don't forget check the permissions on DB in SQL and set correct user for access to DB.

Vasily
Misaq
Acclaimed Contributor.

Re: Import/export data base

http://openview.hp.com/ecare/getsupportdoc?docid=OV-EN022569

Do have a look at this document before restoring.
bad
Respected Contributor.

Re: Import/export data base

what to do after backup?:( SD don't work, problems with users login.
Vasily Kamenev
Acclaimed Contributor.

Re: Import/export data base

Of'cource, I wrote before, need new user. open restored DB, now your DB restored with accounts too, but that accounts from old server, need delete and create one more new and add raghts for this one to restored DB as db_Owner.

Vasily

bad
Respected Contributor.

Re: Import/export data base

to MQM
No,i can't open this link:( it requires additional registration:(

http://openview.hp.com/ecare/getsupportdoc?docid=OV-EN022569

bad
Respected Contributor.

Re: Import/export data base

Vasily, about "databases/DB/users/hpsdu"?? it doesn't allow to delete user hpsdu, i get error "the selected user cannot be droped because the user owns objects"
Vasily Kamenev
Acclaimed Contributor.

Re: Import/export data base

That was when your user create some object in DB, in this case you need change the owner in this object use sp_changeobjectowner, that help for you
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_1lpu.asp

Vasily
bad
Respected Contributor.

Re: Import/export data base

EXEC sp_changeobjectowner 'hpsdu.cdm_bussinesslocationperorg','hpsdu'

and answer

Server: Msg 15505, Level 16, State 1, Procedure sp_changeobjectowner, Line 63
Cannot change owner of object 'hpsdu.cdm_bussinesslocationperorg' or one of its child objects because the new owner 'hpsdu' already has an object with the same name.
Vasily Kamenev
Acclaimed Contributor.
Solution

Re: Import/export data base

Run SQL Query Analizer:

use 'your db name'
EXEC EXEC sp_changeobjectowner 'cdm_bussinesslocationperorg' , 'dbo'

Vasily