|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
moving dB to new server and recreate login?I have a dB on a staging server set up like: dBname: someDBname login: someDBname --mapped as dbo where the database and the dbo login have the same name I want to move the dB to a live server, so I detach the dB, copy it to the live server, and attach it to the live server. When I examine the dB on the live server using SSMS, it still has the username in it. Now I need to recreate the login...but if I create a new login with the same name as before, and try to map it to the existing username in the dB, I get an error "The server principal 'someDBname' already exists" In the past, I've just created a new login like "someDBname2" and mapped it to the "someDBname" user, but I would prefer to be able to preserve the original login...and I'm not sure I understand what I'm doing wrong? This article may be useful for you.
http://www.support.microsoft.com/?id=314546 -- Show quoteArnie Rowland, Ph.D. Westwood Consulting, Inc Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous "geek-y-guy" <no***@nowhere.org> wrote in message news:uVWG%23Gm3GHA.324@TK2MSFTNGP05.phx.gbl... > Hi All: I'm missing a basic concept in SQL2005 Security. > > I have a dB on a staging server set up like: > > dBname: someDBname > login: someDBname --mapped as dbo > > where the database and the dbo login have the same name > > I want to move the dB to a live server, so I detach the dB, copy it to the > live server, and attach it to the live server. > > When I examine the dB on the live server using SSMS, it still has the > username in it. > > Now I need to recreate the login...but if I create a new login with the > same name as before, and try to map it to the existing username in the dB, > I get an error "The server principal 'someDBname' already exists" > > In the past, I've just created a new login like "someDBname2" and mapped > it to the "someDBname" user, but I would prefer to be able to preserve the > original login...and I'm not sure I understand what I'm doing wrong? > > > In addition to the link provided by Arnie, SQL Server 2005 Service Pack 2
includes a more robust "Copy Database Wizard" feature and documentation which allows the copy or move of a database and related objects from source instances such as SQL Server 2000, SQL Server 2005, and SQL Express. Regards, Keith Wilson Microsoft SQL Server Keith.Wilson@nospam.microsoft.com ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Show quote "Arnie Rowland" wrote: > This article may be useful for you. > > http://www.support.microsoft.com/?id=314546 > > -- > Arnie Rowland, Ph.D. > Westwood Consulting, Inc > > Most good judgment comes from experience. > Most experience comes from bad judgment. > - Anonymous > > > "geek-y-guy" <no***@nowhere.org> wrote in message > news:uVWG%23Gm3GHA.324@TK2MSFTNGP05.phx.gbl... > > Hi All: I'm missing a basic concept in SQL2005 Security. > > > > I have a dB on a staging server set up like: > > > > dBname: someDBname > > login: someDBname --mapped as dbo > > > > where the database and the dbo login have the same name > > > > I want to move the dB to a live server, so I detach the dB, copy it to the > > live server, and attach it to the live server. > > > > When I examine the dB on the live server using SSMS, it still has the > > username in it. > > > > Now I need to recreate the login...but if I create a new login with the > > same name as before, and try to map it to the existing username in the dB, > > I get an error "The server principal 'someDBname' already exists" > > > > In the past, I've just created a new login like "someDBname2" and mapped > > it to the "someDBname" user, but I would prefer to be able to preserve the > > original login...and I'm not sure I understand what I'm doing wrong? > > > > > > > > > > In addition to the link provided by Arnie, SQL Server 2005 Service Pack 2 Hi Keith: Where is Service Pack 2? Has it been officially released yet? I > includes a more robust "Copy Database Wizard" feature and documentation > which > allows the copy or move of a database and related objects from source > instances such as SQL Server 2000, SQL Server 2005, and SQL Express. > > Regards, > > Keith Wilson > Microsoft SQL Server don't see it on M$oft's public site? Show quote > > Keith.Wilson@nospam.microsoft.com > ================================================== > > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from your issue. > > ================================================== > This posting is provided "AS IS" with no warranties, and confers no > rights. > > > "Arnie Rowland" wrote: > >> This article may be useful for you. >> >> http://www.support.microsoft.com/?id=314546 >> >> -- >> Arnie Rowland, Ph.D. >> Westwood Consulting, Inc >> >> Most good judgment comes from experience. >> Most experience comes from bad judgment. >> - Anonymous >> >> >> "geek-y-guy" <no***@nowhere.org> wrote in message >> news:uVWG%23Gm3GHA.324@TK2MSFTNGP05.phx.gbl... >> > Hi All: I'm missing a basic concept in SQL2005 Security. >> > >> > I have a dB on a staging server set up like: >> > >> > dBname: someDBname >> > login: someDBname --mapped as dbo >> > >> > where the database and the dbo login have the same name >> > >> > I want to move the dB to a live server, so I detach the dB, copy it to >> > the >> > live server, and attach it to the live server. >> > >> > When I examine the dB on the live server using SSMS, it still has the >> > username in it. >> > >> > Now I need to recreate the login...but if I create a new login with the >> > same name as before, and try to map it to the existing username in the >> > dB, >> > I get an error "The server principal 'someDBname' already exists" >> > >> > In the past, I've just created a new login like "someDBname2" and >> > mapped >> > it to the "someDBname" user, but I would prefer to be able to preserve >> > the >> > original login...and I'm not sure I understand what I'm doing wrong? >> > >> > >> > >> >> >> |
|||||||||||||||||||||||