Showing posts with label tothe. Show all posts
Showing posts with label tothe. Show all posts

Monday, March 19, 2012

Copy database from one server to other

We had two physical SQL servers and copying one database using the wizard to
the other sqlserver was easy because both services used the same domain
account. Now i will have to copy databases from one server to another
outside the domain. This means they will have seperate logins for the
sqlserver service. how can i then use the copy database wizard? It fails
because it can't create a file on the ditination server'
does this mean i have to use log shipping or use a script and then copy just
data'
thanks.You can use backup/restore or sp_attachdb, sp_detachdb. You will have to
manually script out the logins. See this page for more info:
http://support.microsoft.com/defaul...kb;en-us;246133
Ray Higdon MCSE, MCDBA, CCNA
--
"Richard K." <google@.walkersca.com> wrote in message
news:uCR%23ry98DHA.3404@.TK2MSFTNGP09.phx.gbl...
> We had two physical SQL servers and copying one database using the wizard
to
> the other sqlserver was easy because both services used the same domain
> account. Now i will have to copy databases from one server to another
> outside the domain. This means they will have seperate logins for the
> sqlserver service. how can i then use the copy database wizard? It fails
> because it can't create a file on the ditination server'
> does this mean i have to use log shipping or use a script and then copy
just
> data'
> thanks.
>

Saturday, February 25, 2012

copy a db, identity problem

hi
i need to copy a db to another db every single table to another similar to
the first one but with some difference. When i try to do that i need to
remove some constraint and all the identity on the new db. i'd like do that
with a script, i tried:
CREATE TABLE (
id int IDENTITY (1,1) NOT NULL
)
ALTER TABLE prova ALTER COLUMN id int null
GO
it doesnt work.
how can i remove identity from a column of my table'
tx
carloYou can't directly remove the IDENTITY property. You would have to
create a new column or new version of the table.
However, you can use the SET IDENTITY_INSERT option to allow you to
populate the column without removing the IDENTITY property. See Books
Online for details.
David Portas
SQL Server MVP
--|||>> how can i remove identity from a column of my table'
You cannot do this directly. The alternative is to create another table,
copy the data & rename it. The EM interface can get this done with a few
mouse clicks and it may perform reasonably for small-medium sized tables.
Anith|||You don't need to. And, actually, you shouldn't. Look up SET IDENTITY_INSERT
in Books Online. And then use it.
It helps you achieve exactly what you need (judging from your post).
ML