Solved

Restore SQL Database

Posted on 2014-07-24
10
156 Views
Last Modified: 2014-08-06
Can we backup a SQL2008R2 standard database and restore it into SQL 2008R2 Enterprise ? Is there anything that I need to be aware of ?

Tks
0
Comment
Question by:AXISHK
  • 5
  • 4
10 Comments
 
LVL 8

Expert Comment

by:Wilder_Admin
Comment Utility
This should work with a sql dump because here you really dump data there are no informations out of which database systems they come from.
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
Restoring to a higher edition of the same version will work fine.

You may need to run a "fix logins" script if your database has an domain users, but you would have to do that anyway if moving to another server, so isn't unique to your scenario.
0
 

Author Comment

by:AXISHK
Comment Utility
"fix logins" ... I am not aware of this issue. Can you give me more information about this, Tks
0
 

Author Comment

by:AXISHK
Comment Utility
EXEC sp_change_users_login 'Report', the following are listed.

UserName            UserSID
bakerpreport            0x9DF2F5CD331FF14AB4B345B33A731C8B
erpreport3            0x0F42C6E03696B649BE9D8E20307EDCED
SalesReportingAX2009      0xBC60008F737DE748975E795E4F9D5B13
puradmin            0xE26A5AC1075F7B42A20D641C2FACCA87
reportuser            0x9E9DCE427AD01543A5E81A90F996F4C3

Afterwards, I issue "EXEC sp_change_users_login 'Auto_Fix', 'bakerpreport' ". The following message is logged, Tks

"Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 214
An invalid parameter or option was specified for procedure 'sys.sp_change_users_login'."
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
If you're using "Auto_Fix" then you need to supply a password. Auto_Fix will create a matching login if one doesn't already exist - which, depending on your security policy, you may or may not want it doing.

You might be better using "Update_One" option instead to ensure you are only mapping existing logins.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:AXISHK
Comment Utility
so, should I issue,

use database_name
go
EXEC sp_change_users_login 'Update_One', 'bakerpreport', 'bakerpreport'
go
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
I would.
0
 

Author Comment

by:AXISHK
Comment Utility
It returns with the message below. However, EXEC sp_change_users_login 'Report' show the user "bakerpreport". However, I can't see the name under MS SQL Server Management Studio -> Security -> Logins. What does it mean  ? Tks

Msg 15291, Level 16, State 1, Procedure sp_change_users_login, Line 137
Terminating this procedure. The Login name 'bakerpreport' is absent or invalid.
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
Comment Utility
It means there isn't a login name that corresponds to the user name.

You need to decide if you need those users or not. If you do then you'll need to create the login and map the user to it - or you could go back to using "Auto_Fix" but you will need to provide a password to use to the login.

Personally I would script the logins manually, and then re-run sp_change_users_login with the "Update_One" option.

Alternatively, if you don't need the database users, you can just drop them.
0
 

Author Closing Comment

by:AXISHK
Comment Utility
Tks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now