My database server crashed. I was able to recover the physical database
files, which a reattached to a new server with sp_attached_db. Now I got a
problem with recreating my login accounts. I got an error message that
<login_Account> al ready had a role in my database.
What is te proper way to recreate login accounts?
You can use sp_change_users_login to remap:
http://msdn.microsoft.com/library/en...ca-cz_8qzy.asp
-oj
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:15AD2C9D-48A8-4158-9834-594C9787CBB5@.microsoft.com...
> My database server crashed. I was able to recover the physical database
> files, which a reattached to a new server with sp_attached_db. Now I got a
> problem with recreating my login accounts. I got an error message that
> <login_Account> al ready had a role in my database.
> What is te proper way to recreate login accounts?
Showing posts with label crashed. Show all posts
Showing posts with label crashed. Show all posts
Friday, February 24, 2012
Database Recovery
Labels:
crashed,
database,
databasefiles,
microsoft,
mysql,
oracle,
physical,
reattached,
recover,
recovery,
server,
sp_attached_db,
sql
Database Recovery
My database server crashed. I was able to recover the physical database
files, which a reattached to a new server with sp_attached_db. Now I got a
problem with recreating my login accounts. I got an error message that
<login_Account> al ready had a role in my database.
What is te proper way to recreate login accounts?You can use sp_change_users_login to remap:
http://msdn.microsoft.com/library/e..._ca-cz_8qzy.asp
-oj
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:15AD2C9D-48A8-4158-9834-594C9787CBB5@.microsoft.com...
> My database server crashed. I was able to recover the physical database
> files, which a reattached to a new server with sp_attached_db. Now I got a
> problem with recreating my login accounts. I got an error message that
> <login_Account> al ready had a role in my database.
> What is te proper way to recreate login accounts?
files, which a reattached to a new server with sp_attached_db. Now I got a
problem with recreating my login accounts. I got an error message that
<login_Account> al ready had a role in my database.
What is te proper way to recreate login accounts?You can use sp_change_users_login to remap:
http://msdn.microsoft.com/library/e..._ca-cz_8qzy.asp
-oj
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:15AD2C9D-48A8-4158-9834-594C9787CBB5@.microsoft.com...
> My database server crashed. I was able to recover the physical database
> files, which a reattached to a new server with sp_attached_db. Now I got a
> problem with recreating my login accounts. I got an error message that
> <login_Account> al ready had a role in my database.
> What is te proper way to recreate login accounts?
Labels:
crashed,
database,
databasefiles,
microsoft,
mysql,
oracle,
physical,
reattached,
recover,
recovery,
server,
sp_attached_db,
sql
database recovery
hai!
i have a database which crashed recently(26th sep 2007).my last backup is on 14 sep 2007.i have restored database after two days.Now i have a database (old) with data upto 14sep 2007 and from 26sep to till date.(data from 14sep to 26sep missing).I restored database on 28th with a new database name which has data upto 26th sep 2007.how to attach these two databases to a single database to have data from beginning to tilldate.
please help in this regard.in the future, if you want to be able to recover all of your data you should place your databases in full recovery, take full and transaction logs back ups, have you mdfs and ldfs on seperate drives and make sure your your backups are stored on a tape drive or another server and maybe keep a copy off site.
as for your current situation, it sounds like you are going to have to stitch this one together by copying your tables from one database into the tables of the database you want to hold all of your data.
i have a database which crashed recently(26th sep 2007).my last backup is on 14 sep 2007.i have restored database after two days.Now i have a database (old) with data upto 14sep 2007 and from 26sep to till date.(data from 14sep to 26sep missing).I restored database on 28th with a new database name which has data upto 26th sep 2007.how to attach these two databases to a single database to have data from beginning to tilldate.
please help in this regard.in the future, if you want to be able to recover all of your data you should place your databases in full recovery, take full and transaction logs back ups, have you mdfs and ldfs on seperate drives and make sure your your backups are stored on a tape drive or another server and maybe keep a copy off site.
as for your current situation, it sounds like you are going to have to stitch this one together by copying your tables from one database into the tables of the database you want to hold all of your data.
Database Recovery
My database server crashed. I was able to recover the physical database
files, which a reattached to a new server with sp_attached_db. Now I got a
problem with recreating my login accounts. I got an error message that
<login_Account> al ready had a role in my database.
What is te proper way to recreate login accounts?You can use sp_change_users_login to remap:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_ca-cz_8qzy.asp
-oj
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:15AD2C9D-48A8-4158-9834-594C9787CBB5@.microsoft.com...
> My database server crashed. I was able to recover the physical database
> files, which a reattached to a new server with sp_attached_db. Now I got a
> problem with recreating my login accounts. I got an error message that
> <login_Account> al ready had a role in my database.
> What is te proper way to recreate login accounts?
files, which a reattached to a new server with sp_attached_db. Now I got a
problem with recreating my login accounts. I got an error message that
<login_Account> al ready had a role in my database.
What is te proper way to recreate login accounts?You can use sp_change_users_login to remap:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_ca-cz_8qzy.asp
-oj
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:15AD2C9D-48A8-4158-9834-594C9787CBB5@.microsoft.com...
> My database server crashed. I was able to recover the physical database
> files, which a reattached to a new server with sp_attached_db. Now I got a
> problem with recreating my login accounts. I got an error message that
> <login_Account> al ready had a role in my database.
> What is te proper way to recreate login accounts?
Database recovery
Hi All,
Plaese excuse me if this sounds like a stupid question, my SQL sever crashed
and all my databases are gone. Which steps do I follow to restore my
database. In the backup folder of the Sql there is folders of database names
containg the table names with the extension "bak". Please helpFor Each db,
Restore database <dbname> from disk = <completefilename>
You need to determine if you have log backups or only full database backups.
If you have log backups, then each db restore you should add ' with
norecovery', and use the restore log command to restore the logs...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help|||To add to what Wayne has to say,
You should read the entire section on Backup and Recovery in the Books
Online. That way, you know that you covered all of your bases during the
restore process.
Rick Sawtell
MCT, MCSD, MCDBA|||You will have to restore the master database first, then the model and msdb.
All of the remaining user databases can then be restored.
Make sure that you have brought the installation back to the same service
pack and hotfix levels before restore the master database.
Sincerely,
Anthony Thomas
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:ud9IkmN7EHA.2316@.TK2MSFTNGP15.phx.gbl...
For Each db,
Restore database <dbname> from disk = <completefilename>
You need to determine if you have log backups or only full database backups.
If you have log backups, then each db restore you should add ' with
norecovery', and use the restore log command to restore the logs...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help|||"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help
You may also want to look for any .MDF and .LDF files.
It MAY be possible to reinstall SQL Server and them simply reattach these
sp_attach_db.
These will probably be more recent than your backups.
Plaese excuse me if this sounds like a stupid question, my SQL sever crashed
and all my databases are gone. Which steps do I follow to restore my
database. In the backup folder of the Sql there is folders of database names
containg the table names with the extension "bak". Please helpFor Each db,
Restore database <dbname> from disk = <completefilename>
You need to determine if you have log backups or only full database backups.
If you have log backups, then each db restore you should add ' with
norecovery', and use the restore log command to restore the logs...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help|||To add to what Wayne has to say,
You should read the entire section on Backup and Recovery in the Books
Online. That way, you know that you covered all of your bases during the
restore process.
Rick Sawtell
MCT, MCSD, MCDBA|||You will have to restore the master database first, then the model and msdb.
All of the remaining user databases can then be restored.
Make sure that you have brought the installation back to the same service
pack and hotfix levels before restore the master database.
Sincerely,
Anthony Thomas
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:ud9IkmN7EHA.2316@.TK2MSFTNGP15.phx.gbl...
For Each db,
Restore database <dbname> from disk = <completefilename>
You need to determine if you have log backups or only full database backups.
If you have log backups, then each db restore you should add ' with
norecovery', and use the restore log command to restore the logs...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help|||"Nkagi" <Nkagi@.discussions.microsoft.com> wrote in message
news:A0128E1C-76A2-4FFE-B977-E36759C436BF@.microsoft.com...
> Hi All,
> Plaese excuse me if this sounds like a stupid question, my SQL sever
crashed
> and all my databases are gone. Which steps do I follow to restore my
> database. In the backup folder of the Sql there is folders of database
names
> containg the table names with the extension "bak". Please help
You may also want to look for any .MDF and .LDF files.
It MAY be possible to reinstall SQL Server and them simply reattach these
sp_attach_db.
These will probably be more recent than your backups.
Subscribe to:
Posts (Atom)