How To create Role with same SID on different server

Hello

I have previously asked same question as following link

Question Link

According to that discussion we can not create role with Same SID. 

But my doubt is If I take backup of database from one server then use this backup to restore database on another server then SID will be same, If I create the database then overwrite this database while restoring.

process is I have first created some database on my local pc with diff name (blank database), Then I have created backup from server database. Then restore this backup on my local machine on my previously created blank database by changing its log file & also selecting overwrite option. & I check SID was same for role. How this is happening.

I want to know that if it is not possible to create Role with same SID then how sql manages it.

If SQL can manage this then we can do using SMO.

I know that in sql query we can not pass SID as parameter by my previous question. Just want to know is it possible or not.

I want to know that How to create role with same SID on different server?

Can you please give me proper clear guidance for it?

Regards

Vipul Langalia

 



August 23rd, 2015 10:36pm

When you restore a backup users in that backup become orphan. This is because log ins are not available on that server and SID is different.

Users will have same roles when you restore the backup.

I want to know that How to create role with same SID on different server?

First find the SID of a user.

Create the user with the same SID on the different server.

 
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 12:25am

Hello

Thank you for your quick response.

I cannot create role with same SID. that is my question , How to create Role with same SID on different server. I can create Login with Same SID. But can nnot create Role with same SID when I try to create script using SMO.

Regarding Backps Role is also created with same SID on different servers. 

First I took Back up from Server1. then I create blank database with different Name on Server2.

Now I restore Backup on this database.

At that time I replace LogFiles because Backup of server1 has logfile of its database name. But On Server2 I am first creating blank database with different name. So I replace Log file of my New databae which I create on server2.

Now I also check true the overwrite existing database with replace check box in  option tab.

Now I check the Database it has role with same SID. I want to know how it happened & If it is possible to create role with same SID on different server with SMO.

Regards

VIpul

August 24th, 2015 3:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics