Showing posts with label including. Show all posts
Showing posts with label including. Show all posts

Sunday, March 25, 2012

copy db

in sql 2005 -- what's the best way for me to make a complete copy of my database - including indexes and keys and everything??
i tried backup but when restoring to the second i get an error with multiple media sets.What error are you getting on the restore?|||If you are restoring to the same server, then you need to rename all of the physical files.|||Msg 3132, Level 16, State 1, Line 1
The media set has 2 media families but only 1 are provided. All members must be provided.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

I am doing

RESTORE DATABASE trafficr
FROM DISK = 'c:\backups\traffic.bak'
WITH MOVE 'traffic' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\trafficr.mdf',
MOVE 'traffic_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\trafficr_log.ldf',

REPLACE|||What's with the commas at the end of each line?|||this is the syntax i'm using for sql server - -is it wrong?

i think it once worked but not working now - maybe with the way i did the backup? how should i do the backup so one media|||post the output of this:

RESTORE headeronly FROM DISK = 'c:\backups\traffic.bak'

you may have more than one backup in the file.sqlsql

Thursday, March 22, 2012

Copy Database Wizard and Logins?

I want to copy a database (including login users) from server A to server B
using the Copy Database Wizard.
I find that a Login is created at the server level, but it is disabled. When
I enable it, it seems to be a different user than at the database level.
What is the correct procedure to get the logins copied over and working?
OlavCDW doesn't create the login using the same SID as the original login. Use sp_help_revlogin (search
KB) instead.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Olav" <x@.y.com> wrote in message news:OfD%23hsZXGHA.3444@.TK2MSFTNGP05.phx.gbl...
>I want to copy a database (including login users) from server A to server B using the Copy Database
>Wizard.
> I find that a Login is created at the server level, but it is disabled. When I enable it, it seems
> to be a different user than at the database level.
> What is the correct procedure to get the logins copied over and working?
> Olav
>

Copy Database Wizard and Logins?

I want to copy a database (including login users) from server A to server B
using the Copy Database Wizard.
I find that a Login is created at the server level, but it is disabled. When
I enable it, it seems to be a different user than at the database level.
What is the correct procedure to get the logins copied over and working?
OlavCDW doesn't create the login using the same SID as the original login. Use s
p_help_revlogin (search
KB) instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Olav" <x@.y.com> wrote in message news:OfD%23hsZXGHA.3444@.TK2MSFTNGP05.phx.gbl...reen">
>I want to copy a database (including login users) from server A to server B
using the Copy Database
>Wizard.
> I find that a Login is created at the server level, but it is disabled. Wh
en I enable it, it seems
> to be a different user than at the database level.
> What is the correct procedure to get the logins copied over and working?
> Olav
>sqlsql