Trying to copy a SQL server 2005 database
-
We have a database on a SQL 2005 server. We'd like to take an exact copy of it, on the same server (yes, I know this isn't the ideal place for a true dev system), giving the result a name such as mydbname_dev, so as to use it for test purposes. When I right-click on the database, I see under Tasks an option called "Copy database", which sounds perfect. Only, it doesn't work. Examination of log files tells me that "The login already has an account under a different user name." OK. More Googling suggests that I need to "remove the default associated objects transfer for LOGINS". This means using the "Select Database Objects" screen. Which I can't find... and further investigation shows that it doesn't appear if you're copying to the same server. Is it really impossible to use "copy database" to simply copy a database? Any suggestions as to a better way of going about this? I want the new copy to be identical in every way except name to the production database, so we can use it to test out some scripts before we run them on the real thing, and I'd like the copy method to be as simple as possible, to avoid the chances of me introducing an error by typo, or by omitting some vital step.
-
We have a database on a SQL 2005 server. We'd like to take an exact copy of it, on the same server (yes, I know this isn't the ideal place for a true dev system), giving the result a name such as mydbname_dev, so as to use it for test purposes. When I right-click on the database, I see under Tasks an option called "Copy database", which sounds perfect. Only, it doesn't work. Examination of log files tells me that "The login already has an account under a different user name." OK. More Googling suggests that I need to "remove the default associated objects transfer for LOGINS". This means using the "Select Database Objects" screen. Which I can't find... and further investigation shows that it doesn't appear if you're copying to the same server. Is it really impossible to use "copy database" to simply copy a database? Any suggestions as to a better way of going about this? I want the new copy to be identical in every way except name to the production database, so we can use it to test out some scripts before we run them on the real thing, and I'd like the copy method to be as simple as possible, to avoid the chances of me introducing an error by typo, or by omitting some vital step.
-
And that'll preserve all my access control and so on? OK, thanks - will do.