Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How to import DB overwriting an existing one

$
0
0

Hello,
I have this situation:

  • a 1,7GB script I need to import on SQL Server 2008 (Express)
  • I've imported it using sqlcmd(SSMS doesn't work)
  • The script has been imported on the master DB (if I usethe -d switch to overwrite an existing DB it doesn't work)
  • I've performed the backup of the master DB

Now i want to import this master backup overwriting an (empy) existing DB but the only way to do that it seems to start the SQL Server in single user mode.

I've started the SQl Server in Single User mode but I can't access to (empy) DB to lunch the restore task (I've got the Error: 18461).

I'm logged on this machine as Domain administrator and I use the Windows Authentication method.
Also if I use the SQL authentication method creating a specific user withthe sysadmin role it doesn't work.

What I'm doing wrong?


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>