Solved

Restore SQL Database

Posted on 2014-07-24
10
168 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
ID: 40216144
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
ID: 40216173
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
ID: 40238382
"fix logins" ... I am not aware of this issue. Can you give me more information about this, Tks
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:AXISHK
ID: 40238421
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
ID: 40238457
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
 

Author Comment

by:AXISHK
ID: 40238468
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
ID: 40238470
I would.
0
 

Author Comment

by:AXISHK
ID: 40238561
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
ID: 40238567
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
ID: 40245342
Tks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 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