Showing posts with label wizard. Show all posts
Showing posts with label wizard. Show all posts

Thursday, March 29, 2012

Copy objects Wizard - deleted data??

I have not used the copy objects wizard that much. I used it today to copy 4
views from my dev box to production. It copied the views, but also wiped out
my data in all the tables that the views are built around!!! In
production!!!!

Can someone provide me some insight into why this happened?

Thanks,
ChadChad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> I have not used the copy objects wizard that much. I used it today to
> copy 4 views from my dev box to production. It copied the views, but
> also wiped out my data in all the tables that the views are built
> around!!! In production!!!!
> Can someone provide me some insight into why this happened?

Extremely nasty. I have not used the wizard in question myself, and I
think you understand why after this experience. It's a bit ironic: the
wizards are there to help, but you can only use them, if you know
exactly what they do, and in such case you may not need them.

Anyway my guess is that the wizard saw reason to recreate the underlying
tables as well; possibly because the defintion in production was different
from your dev box.

The correct way to deploy things in production is through change scripts
that are created from information in the version-control system.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
restore everything from their backup and the transaction logs.

Normally, whenever I make DB table changes I save the scripts and put them
in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
changes to prod. But changes to views don't prompt for you to save these
changes as a script.

What specifically do you mean by "the version control system"? (As you can
tell by my question, I know just enough of SQL Server to be dangerous, so
any insight on how to handle version contol is appreciated.)

Thanks,
Chad

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9682EF2F57F5DYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> I have not used the copy objects wizard that much. I used it today to
>> copy 4 views from my dev box to production. It copied the views, but
>> also wiped out my data in all the tables that the views are built
>> around!!! In production!!!!
>>
>> Can someone provide me some insight into why this happened?
> Extremely nasty. I have not used the wizard in question myself, and I
> think you understand why after this experience. It's a bit ironic: the
> wizards are there to help, but you can only use them, if you know
> exactly what they do, and in such case you may not need them.
> Anyway my guess is that the wizard saw reason to recreate the underlying
> tables as well; possibly because the defintion in production was different
> from your dev box.
> The correct way to deploy things in production is through change scripts
> that are created from information in the version-control system.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
> restore everything from their backup and the transaction logs.
> Normally, whenever I make DB table changes I save the scripts and put them
> in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
> changes to prod. But changes to views don't prompt for you to save these
> changes as a script.
> What specifically do you mean by "the version control system"? (As you can
> tell by my question, I know just enough of SQL Server to be dangerous, so
> any insight on how to handle version contol is appreciated.)

"version control system" or "source code control" is nothing specific
to SQL Server, but fundamentals of software engineering. In a version
control system, developers adds their files. Later a file may be
checked out, maybe by the same developer, maybe by someone else. The
person who checked out the file, performs some changes to it, and
then checks back in again, after proper testing.

When it's getting time to make a build for an integration test, someone
who is a "build master", "configuration manager" or similar puts some
label on all the most recent versions of files, to create a baseline.
During tests, bugs may be uncovered and fixed. The fixes can be inserted
into that baseline, or a new baseline be created.

Eventually, the thing is put into production and a baseline is created for
this. Now, development of 2.0 starts. However, there may be need to
fix bugs in production as well. Say that version 12 of file foo.cs
was in the shipment baseline. By the time a critical bug in production
is discovered, the file at version 14 for 2.0 development. But you
check out version 12, and fix that, and check it in as 12.1 - you
have now created a branch.

The exact terminology for these various actions are different from
product to product. The most commonly used version-control system
in the Microsoft world is Visual SourceSafe. It performs branching
different that about any other product. VSS has a lot of short-comings
as a version-control system, but it's easy to start with, and it's OK
for smaller teams.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||For a tool that links the drop/create scripts (for ALL database
objects) in any source control system to your development, test and
production databases have a look at DB Ghost (www.dbghost.com).

The approach is to regard the drop/create scripts as the only true
representation of the desired schema i.e. your 'source database'. Once
you have modifed the drop/create scripts DB Ghost will build a brand
new database from them in an extremely fast manner whilst taking care
of any dependencies. This a) verifies that no syntax or dependency
errors have been introduced and b) gives you a real source database to
use as the basis for a compare and upgrade of your actual target i.e.
the test or production database. DB Ghost does this also and creates a
rock solid delta script of the differences that is guaranteed to work
with no hand coded modifications.

What you end up with is a target database that matches a (labelled) set
of scripts under source control. If this approach is used for all
releases then a full audit trail of who changed what, why and when is
maintained in the source control system so it is easy to do reports
such as 'what changed between release X and release Y' or 'who first
changed sproc Z after release X'.

Relying on comments in sprocs etc. is a recipe for disaster in all but
the most disciplined of IT shops. Let your source control system do
the hard work for you and let DB Ghost handle all the SQL Server code.
It's called the DB Ghost Process and it can bring an amazing level of
quality to your deployments and code control in general.|||Erland,

Thanks for the explanation. I do have experience with source control tools
such as VSS and PVCS, but all have been for file/directory based source,
like VB. How do DB developers apply these principles (check in, check out,
etc.) to SQL Server? This is something I've curious about for a while now.

Thanks,
Chad

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96833C7C3BFCYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
>> restore everything from their backup and the transaction logs.
>>
>> Normally, whenever I make DB table changes I save the scripts and put
>> them
>> in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
>> changes to prod. But changes to views don't prompt for you to save these
>> changes as a script.
>>
>> What specifically do you mean by "the version control system"? (As you
>> can
>> tell by my question, I know just enough of SQL Server to be dangerous, so
>> any insight on how to handle version contol is appreciated.)
> "version control system" or "source code control" is nothing specific
> to SQL Server, but fundamentals of software engineering. In a version
> control system, developers adds their files. Later a file may be
> checked out, maybe by the same developer, maybe by someone else. The
> person who checked out the file, performs some changes to it, and
> then checks back in again, after proper testing.
> When it's getting time to make a build for an integration test, someone
> who is a "build master", "configuration manager" or similar puts some
> label on all the most recent versions of files, to create a baseline.
> During tests, bugs may be uncovered and fixed. The fixes can be inserted
> into that baseline, or a new baseline be created.
> Eventually, the thing is put into production and a baseline is created for
> this. Now, development of 2.0 starts. However, there may be need to
> fix bugs in production as well. Say that version 12 of file foo.cs
> was in the shipment baseline. By the time a critical bug in production
> is discovered, the file at version 14 for 2.0 development. But you
> check out version 12, and fix that, and check it in as 12.1 - you
> have now created a branch.
> The exact terminology for these various actions are different from
> product to product. The most commonly used version-control system
> in the Microsoft world is Visual SourceSafe. It performs branching
> different that about any other product. VSS has a lot of short-comings
> as a version-control system, but it's easy to start with, and it's OK
> for smaller teams.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> Thanks for the explanation. I do have experience with source control tools
> such as VSS and PVCS, but all have been for file/directory based source,
> like VB. How do DB developers apply these principles (check in, check out,
> etc.) to SQL Server? This is something I've curious about for a while now.

They use - or at least should use - files. I've seen a whole lot of
questions on version control of SQL objects as this should be something
difficult or special. It isn't. Source code is source code, and should be
handled as such.

I guess people are tricked by tools that permit you to store things in the
database directly, point-and-click GUI:n for creating tables etc. But all
of that is really files.

The one gotcha there is if you use a tool like Query Analyzer for editing
your SQL objects, is that you disrupt the normal procedure which is
1) check out 2) edit 3) save 4) compile 5) test 6) back to 2 until it
works 7) check in. With a tool like QA, 3 is taken out of the chain, which
can lead to that what you check is not what you tested.

In our shop, we avoid this problem by using a third-party editor, Textpad.
It has no special features for SQL - but it is a better editor than QA.
From Textpad 3 and 4 is one key-click, as we can activate a command-line
from Textpad. We have our own load tool for quite a few bells and whistles,
but the tool could be command-line OSQL.

The thing people seem to want to do, is to take the SQL objects from
the database, but this is actually really wrong when you think of it.
If you work in VB, would get the input for the version-control system
by disassembling the object modules?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Copy objects with DTS Import/Export Wizard?

Has the functionality of copying objects using the DTS Import/Export Wizard been removed in SQL Server 2005?

MSDN says this about the wizard:

"With the DTS Import/Export Wizard, you can transfer database objects such as indexes, views, roles, stored procedures, and referential integrity constraints. For more information, see Copy SQL Server Objects Task."

But the "for more imformation" link describes adding a task to a DTS package to copy an object, not how to use the wizard to copy objects.

It's been awhile since I've used SQL Server 2000, but as I recall it was possible to copy objects as well as data using the DTS Import/Export Wizard.

Thanks,

Ron

DTS has been enhanced to SSIS(Integration Services) in SQL 2005, so in this case you can use SSIS package to perform that copy SQL Server objects tasks which is similar to the copying the database objects.|||

You have a few options:

Copy Database Wizard:
Use this if you want to copy an entire database.

Right-click on a database in Management Studio, go to "Tasks", and choose "Copy Database...".|||

I also share in their frustrations... When you only have a few objects, in this case tables to transfer; you have very little options in the SQL2005 Import/Export wizard as compared to the SQL2000 DTS (Import/Export) wizard. Copy Database is out of the question for this scenario.

My problem lies in the fact that the SQL2005 Import/Export wizard does not create the indexes and keys when the table needs to be created in the target database, even if the source schema exists on the target database. Is there any way around this without pre-creating the target tables from scripts generated on the source DB? Seems that this manual step should be built into the wizard? Ay suggestions? We are running SP2 for SQL 2005.

There are suggestions that SSIS can be used, thats fine, but given the entirely different interface as compared to DTS, I don't have the time to deal with that when the wizard should be able to do this in a few minutes.

|||That option is fine for SQL2000/2005 to SQL2005, but is there any option to copy to SQL2000?|||I am getting very frustrated, for two days now I've been trying to work out how to copy a database (SQL express version) to my ISP which has the full MS 2005 server. I keep losing keys, stored procedures etc. When you right click on the database as you say and click on tasks there's no copy database there.|||Yey! now I get to spend 2 hours with ssis doing what used to take 2 minutes with dts import wizard.|||

I now use MS Database Publishing wizard which attaches to Database Explorer in Microsoft Developer Express. It works better than DTS Import/Export as I do not lose keys and can copy all object in the database. Great for making backups too.

Copy objects with DTS Import/Export Wizard?

Has the functionality of copying objects using the DTS Import/Export Wizard been removed in SQL Server 2005?

MSDN says this about the wizard:

"With the DTS Import/Export Wizard, you can transfer database objects such as indexes, views, roles, stored procedures, and referential integrity constraints. For more information, see Copy SQL Server Objects Task."

But the "for more imformation" link describes adding a task to a DTS package to copy an object, not how to use the wizard to copy objects.

It's been awhile since I've used SQL Server 2000, but as I recall it was possible to copy objects as well as data using the DTS Import/Export Wizard.

Thanks,

Ron

DTS has been enhanced to SSIS(Integration Services) in SQL 2005, so in this case you can use SSIS package to perform that copy SQL Server objects tasks which is similar to the copying the database objects.|||

You have a few options:

Copy Database Wizard:
Use this if you want to copy an entire database.

Right-click on a database in Management Studio, go to "Tasks", and choose "Copy Database...".|||

I also share in their frustrations... When you only have a few objects, in this case tables to transfer; you have very little options in the SQL2005 Import/Export wizard as compared to the SQL2000 DTS (Import/Export) wizard. Copy Database is out of the question for this scenario.

My problem lies in the fact that the SQL2005 Import/Export wizard does not create the indexes and keys when the table needs to be created in the target database, even if the source schema exists on the target database. Is there any way around this without pre-creating the target tables from scripts generated on the source DB? Seems that this manual step should be built into the wizard? Ay suggestions? We are running SP2 for SQL 2005.

There are suggestions that SSIS can be used, thats fine, but given the entirely different interface as compared to DTS, I don't have the time to deal with that when the wizard should be able to do this in a few minutes.

|||That option is fine for SQL2000/2005 to SQL2005, but is there any option to copy to SQL2000?|||I am getting very frustrated, for two days now I've been trying to work out how to copy a database (SQL express version) to my ISP which has the full MS 2005 server. I keep losing keys, stored procedures etc. When you right click on the database as you say and click on tasks there's no copy database there.|||Yey! now I get to spend 2 hours with ssis doing what used to take 2 minutes with dts import wizard.|||

I now use MS Database Publishing wizard which attaches to Database Explorer in Microsoft Developer Express. It works better than DTS Import/Export as I do not lose keys and can copy all object in the database. Great for making backups too.

sqlsql

Copy objects with DTS Import/Export Wizard?

Has the functionality of copying objects using the DTS Import/Export Wizard been removed in SQL Server 2005?

MSDN says this about the wizard:

"With the DTS Import/Export Wizard, you can transfer database objects such as indexes, views, roles, stored procedures, and referential integrity constraints. For more information, see Copy SQL Server Objects Task."

But the "for more imformation" link describes adding a task to a DTS package to copy an object, not how to use the wizard to copy objects.

It's been awhile since I've used SQL Server 2000, but as I recall it was possible to copy objects as well as data using the DTS Import/Export Wizard.

Thanks,

Ron

DTS has been enhanced to SSIS(Integration Services) in SQL 2005, so in this case you can use SSIS package to perform that copy SQL Server objects tasks which is similar to the copying the database objects.|||

You have a few options:

Copy Database Wizard:
Use this if you want to copy an entire database.

Right-click on a database in Management Studio, go to "Tasks", and choose "Copy Database...".|||

I also share in their frustrations... When you only have a few objects, in this case tables to transfer; you have very little options in the SQL2005 Import/Export wizard as compared to the SQL2000 DTS (Import/Export) wizard. Copy Database is out of the question for this scenario.

My problem lies in the fact that the SQL2005 Import/Export wizard does not create the indexes and keys when the table needs to be created in the target database, even if the source schema exists on the target database. Is there any way around this without pre-creating the target tables from scripts generated on the source DB? Seems that this manual step should be built into the wizard? Ay suggestions? We are running SP2 for SQL 2005.

There are suggestions that SSIS can be used, thats fine, but given the entirely different interface as compared to DTS, I don't have the time to deal with that when the wizard should be able to do this in a few minutes.

|||That option is fine for SQL2000/2005 to SQL2005, but is there any option to copy to SQL2000?|||I am getting very frustrated, for two days now I've been trying to work out how to copy a database (SQL express version) to my ISP which has the full MS 2005 server. I keep losing keys, stored procedures etc. When you right click on the database as you say and click on tasks there's no copy database there.|||Yey! now I get to spend 2 hours with ssis doing what used to take 2 minutes with dts import wizard.|||

I now use MS Database Publishing wizard which attaches to Database Explorer in Microsoft Developer Express. It works better than DTS Import/Export as I do not lose keys and can copy all object in the database. Great for making backups too.

Copy objects with DTS Import/Export Wizard?

Has the functionality of copying objects using the DTS Import/Export Wizard been removed in SQL Server 2005?

MSDN says this about the wizard:

"With the DTS Import/Export Wizard, you can transfer database objects such as indexes, views, roles, stored procedures, and referential integrity constraints. For more information, see Copy SQL Server Objects Task."

But the "for more imformation" link describes adding a task to a DTS package to copy an object, not how to use the wizard to copy objects.

It's been awhile since I've used SQL Server 2000, but as I recall it was possible to copy objects as well as data using the DTS Import/Export Wizard.

Thanks,

Ron

DTS has been enhanced to SSIS(Integration Services) in SQL 2005, so in this case you can use SSIS package to perform that copy SQL Server objects tasks which is similar to the copying the database objects.|||

You have a few options:

Copy Database Wizard:
Use this if you want to copy an entire database.

Right-click on a database in Management Studio, go to "Tasks", and choose "Copy Database...".|||

I also share in their frustrations... When you only have a few objects, in this case tables to transfer; you have very little options in the SQL2005 Import/Export wizard as compared to the SQL2000 DTS (Import/Export) wizard. Copy Database is out of the question for this scenario.

My problem lies in the fact that the SQL2005 Import/Export wizard does not create the indexes and keys when the table needs to be created in the target database, even if the source schema exists on the target database. Is there any way around this without pre-creating the target tables from scripts generated on the source DB? Seems that this manual step should be built into the wizard? Ay suggestions? We are running SP2 for SQL 2005.

There are suggestions that SSIS can be used, thats fine, but given the entirely different interface as compared to DTS, I don't have the time to deal with that when the wizard should be able to do this in a few minutes.

|||That option is fine for SQL2000/2005 to SQL2005, but is there any option to copy to SQL2000?|||I am getting very frustrated, for two days now I've been trying to work out how to copy a database (SQL express version) to my ISP which has the full MS 2005 server. I keep losing keys, stored procedures etc. When you right click on the database as you say and click on tasks there's no copy database there.|||Yey! now I get to spend 2 hours with ssis doing what used to take 2 minutes with dts import wizard.|||

I now use MS Database Publishing wizard which attaches to Database Explorer in Microsoft Developer Express. It works better than DTS Import/Export as I do not lose keys and can copy all object in the database. Great for making backups too.

copy objects and data from server to server

I want to copy all objects and data from other SQL 2000 server std. to my
local server(SQL 2000 personal) to test something.
when I do copy wizard I got a message
"SQL Server service is running under localsystem account. To get the
privilege to copy through the network you should change SQL Service
account."(FYI,this may not what you see in Eng version because I translated
it.)
Why?
This time I used "copy wizard", is it the best solution?If you load EM, & select the server in question. Right click & select
properties. Goto the Security tab. At the bottom, you have the option to
start & run SQL server in either the local system account, or another
account...
Cheers,
James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures|||HI,
To perform this operation start the SQL server service using a Domain OS
user, which has got access in both servers.
Thanks
Hari
MCDBA
"James Goodman" <j a m e s@.norton-associates.co.u k> wrote in message
news:bvd77v$o53$1@.sparta.btinternet.com...
> If you load EM, & select the server in question. Right click & select
> properties. Goto the Security tab. At the bottom, you have the option to
> start & run SQL server in either the local system account, or another
> account...
>
>
> --
> Cheers,
> James Goodman MCSE, MCDBA
> http://www.angelfire.com/sports/f1pictures
>

copy objects and data from server to server

I want to copy all objects and data from other SQL 2000 server std. to my
local server(SQL 2000 personal) to test something.
when I do copy wizard I got a message
"SQL Server service is running under localsystem account. To get the
privilege to copy through the network you should change SQL Service
account."(FYI,this may not what you see in Eng version because I translated
it.)
Why?
This time I used "copy wizard", is it the best solution?If you load EM, & select the server in question. Right click & select
properties. Goto the Security tab. At the bottom, you have the option to
start & run SQL server in either the local system account, or another
account...
Cheers,
James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures|||HI,
To perform this operation start the SQL server service using a Domain OS
user, which has got access in both servers.
Thanks
Hari
MCDBA
"James Goodman" <j a m e s@.norton-associates.co.u k> wrote in message
news:bvd77v$o53$1@.sparta.btinternet.com...
quote:

> If you load EM, & select the server in question. Right click & select
> properties. Goto the Security tab. At the bottom, you have the option to
> start & run SQL server in either the local system account, or another
> account...
>
>
> --
> Cheers,
> James Goodman MCSE, MCDBA
> http://www.angelfire.com/sports/f1pictures
>

Tuesday, March 27, 2012

Copy Entire DB on same Server

Hi All,

Could anybody tell me how to make a copy of an entire database on the same server? The copy wizard won't allow the a copy to be made on the same server.

And I believe I won't be able to detach the database and re-attach it to a newly created database with a different name.

Thanks in advance!My solution would be to do a backup, then a restore of your database to a new database name.

-PatPsqlsql

Sunday, March 25, 2012

Copy DB bug in SQL server 2005 ..

Microsoft or someone please...
Is there a way to stop the copydatabase wizard from removing the identity
fields when it is used to copy a DB? This is quite annoying having to go
into the copied DB and re-add all the identity seed / field settings.
Thanks
BucNever mine, I found that SP1 is suppose to fix it, just a huge download
<Buc> wrote in message news:uff7aceeGHA.1436@.TK2MSFTNGP05.phx.gbl...
> Microsoft or someone please...
> Is there a way to stop the copydatabase wizard from removing the identity
> fields when it is used to copy a DB? This is quite annoying having to go
> into the copied DB and re-add all the identity seed / field settings.
> Thanks
> Buc
>

COPY DB

I'm trying to copy a database using the copy db wizard. The source and
destination are both sql 2000. I'm getting the following error message.
CDW Database task Step Fails
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Unspecified error
Step Error code: 80004005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
TASK DETAIL
FAILED TO CREATE THE SHARE OMWWIZC
The SQL Admin account has to have permissions to access teh file system on
the other machine, not just the other SQL Server.
Robert.
"sql" wrote:

> I'm trying to copy a database using the copy db wizard. The source and
> destination are both sql 2000. I'm getting the following error message.
> CDW Database task Step Fails
> Step Error Source: Microsoft Data Transformation Services (DTS) Package
> Step Error Description:Unspecified error
> Step Error code: 80004005
> Step Error Help File:sqldts80.hlp
> Step Error Help Context ID:1100
>
> TASK DETAIL
> FAILED TO CREATE THE SHARE OMWWIZC

COPY DB

I'm trying to copy a database using the copy db wizard. The source and
destination are both sql 2000. I'm getting the following error message.
CDW Database task Step Fails
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Unspecified error
Step Error code: 80004005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
TASK DETAIL
FAILED TO CREATE THE SHARE OMWWIZCThe SQL Admin account has to have permissions to access teh file system on
the other machine, not just the other SQL Server.
Robert.
"sql" wrote:

> I'm trying to copy a database using the copy db wizard. The source and
> destination are both sql 2000. I'm getting the following error message.
> CDW Database task Step Fails
> Step Error Source: Microsoft Data Transformation Services (DTS) Package
> Step Error Description:Unspecified error
> Step Error code: 80004005
> Step Error Help File:sqldts80.hlp
> Step Error Help Context ID:1100
>
> TASK DETAIL
> FAILED TO CREATE THE SHARE OMWWIZC

COPY DB

I'm trying to copy a database using the copy db wizard. The source and
destination are both sql 2000. I'm getting the following error message.
CDW Database task Step Fails
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Unspecified error
Step Error code: 80004005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
TASK DETAIL
FAILED TO CREATE THE SHARE OMWWIZCThe SQL Admin account has to have permissions to access teh file system on
the other machine, not just the other SQL Server.
Robert.
"sql" wrote:
> I'm trying to copy a database using the copy db wizard. The source and
> destination are both sql 2000. I'm getting the following error message.
> CDW Database task Step Fails
> Step Error Source: Microsoft Data Transformation Services (DTS) Package
> Step Error Description:Unspecified error
> Step Error code: 80004005
> Step Error Help File:sqldts80.hlp
> Step Error Help Context ID:1100
>
> TASK DETAIL
> FAILED TO CREATE THE SHARE OMWWIZC

Copy databases

Hi,
Maybe a stupid question, but I'm trying to copy some databases from one server to another. The copy databases wizard says the job is successful and I can see that the job has been done on the remote server. But the copied databases are not there. What do I do?
Anyone?|||Make sure you connected (during the copy) to the right (the same as you have inspected later)instance of SQL Server.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||How do you know if the databases are not there? do select * from sys.databases and see if they are there.|||Aren't they supposed to show up in the database tree in Object explorer? I can't see them...only the ones that I exported, but copying is supposed to be a better method.
|||

they are but you need to refresh the tree, by running the query I asked you to I was asking to check if they were really there.

Are the databases you are looking for in the resultset from the query I asked you to run?

|||I did and no they are not there.
|||Hmmm very strange, my only suggestion is to try again and look for errors.|||'Execute SQL Server Agent job' generates an error and the log says 'Login failed for user'.
|||So I think some Agent debugging might be in order then to make sure it is working ok, Management Tools Group folks can help, then come back.sqlsql

Thursday, March 22, 2012

Copy Database, can't attach it?

I'm used the Copy Database Wizard to copy a database from one server to
another. While in the copy operation the destination machine was hanging and
I had to reset it.
Now when I want to attach the source database again, I get the following
error:
"CREATE FILE encountered operating system error 5 (Access is denied.)..."
What is going on here? Why was the source machine affected in this
destructive manner?
What do I need to do in order to attach my source again?
OlavI generally find that it's 10x easier to shoot yourself in the foot and get
into serious trouble with SQL Server 2005 than it was with SQL Server 2000.
Olav
"Olav" <x@.y.com> wrote in message
news:O0Fj8YZXGHA.4212@.TK2MSFTNGP02.phx.gbl...
> I'm used the Copy Database Wizard to copy a database from one server to
> another. While in the copy operation the destination machine was hanging
> and I had to reset it.
> Now when I want to attach the source database again, I get the following
> error:
> "CREATE FILE encountered operating system error 5 (Access is denied.)..."
> What is going on here? Why was the source machine affected in this
> destructive manner?
> What do I need to do in order to attach my source again?
> Olav
>|||I read somewhere detaching databases is very risky, and can infact
corrupt the entire database if something goes wrong... Good luck to
you.|||?
Nice if that is the default option the Copy Database Wizard is using then?
Olav
"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
>|||Stop me if im boring you ...
Basically a database created using created database Test consists of 2 files
mdf for tables
ldf for transaction logs
In effect detaching a database is what happens when you stop sql server
attaching is what happens when you start sql server
so dont be afraid of this process
Be aware though that ...
Any transactions not written down to the mdf file and still in the ldf
transaction logs will need to be recovered by SQL server.
to limit this complication we
stop all users
run checkpoint 3 times to for those transactions down into mdf
then detach
at this point the logfile is emptied and can be ditched on attach
Ever wanted to shink you log file. then this method can be employed.
Note I would not used this method on prodction systems crital to business..
Lifes too short and its a hassel geting another job.
If you detached thdatabase then you basicall have 2 files
If a file gets chopped on a copy you would normally tidy up and resend file.
hope this helps
"Olav" wrote:

> ?
> Nice if that is the default option the Copy Database Wizard is using then?
> Olav
> "KBuser" <Kyle.Buser@.gmail.com> wrote in message
> news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>
>|||"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
> I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
No, detaching a database should be perfectly fine.
But you need to copy both the MDF and LDF files and attach both.

>

Copy Database, can't attach it?

I'm used the Copy Database Wizard to copy a database from one server to
another. While in the copy operation the destination machine was hanging and
I had to reset it.
Now when I want to attach the source database again, I get the following
error:
"CREATE FILE encountered operating system error 5 (Access is denied.)..."
What is going on here? Why was the source machine affected in this
destructive manner?
What do I need to do in order to attach my source again?
OlavI generally find that it's 10x easier to shoot yourself in the foot and get
into serious trouble with SQL Server 2005 than it was with SQL Server 2000.
Olav
"Olav" <x@.y.com> wrote in message
news:O0Fj8YZXGHA.4212@.TK2MSFTNGP02.phx.gbl...
> I'm used the Copy Database Wizard to copy a database from one server to
> another. While in the copy operation the destination machine was hanging
> and I had to reset it.
> Now when I want to attach the source database again, I get the following
> error:
> "CREATE FILE encountered operating system error 5 (Access is denied.)..."
> What is going on here? Why was the source machine affected in this
> destructive manner?
> What do I need to do in order to attach my source again?
> Olav
>|||I read somewhere detaching databases is very risky, and can infact
corrupt the entire database if something goes wrong... Good luck to
you.|||?
Nice if that is the default option the Copy Database Wizard is using then?
Olav
"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
>I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
>|||Stop me if im boring you ...
Basically a database created using created database Test consists of 2 files
mdf for tables
ldf for transaction logs
In effect detaching a database is what happens when you stop sql server
attaching is what happens when you start sql server
so dont be afraid of this process
Be aware though that ...
Any transactions not written down to the mdf file and still in the ldf
transaction logs will need to be recovered by SQL server.
to limit this complication we
stop all users
run checkpoint 3 times to for those transactions down into mdf
then detach
at this point the logfile is emptied and can be ditched on attach
Ever wanted to shink you log file. then this method can be employed.
Note I would not used this method on prodction systems crital to business..
Lifes too short and its a hassel geting another job.
If you detached thdatabase then you basicall have 2 files
If a file gets chopped on a copy you would normally tidy up and resend file.
hope this helps
"Olav" wrote:
> ?
> Nice if that is the default option the Copy Database Wizard is using then?
> Olav
> "KBuser" <Kyle.Buser@.gmail.com> wrote in message
> news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
> >I read somewhere detaching databases is very risky, and can infact
> > corrupt the entire database if something goes wrong... Good luck to
> > you.
> >
>
>|||"KBuser" <Kyle.Buser@.gmail.com> wrote in message
news:1144783193.978615.83980@.t31g2000cwb.googlegroups.com...
> I read somewhere detaching databases is very risky, and can infact
> corrupt the entire database if something goes wrong... Good luck to
> you.
No, detaching a database should be perfectly fine.
But you need to copy both the MDF and LDF files and attach both.
>

Copy database wizard. Invalid column name 'AccountCode'

I've been trying the copy database wizard for hours, each time getting one error or another. The most recent one is "Invalid column name 'AccountCode'". In the error message it tells me to change the MaximumErrorCount - I can't find any information on how to do that.

I'm using VPN to access the source server. The source is SQL Server 2000 from the client's server. The destination is SQL Server 2005 from the MSDN Premium subscription. The username has every server role checked. Part of the transfer is successful. I'm using SMO instead of Attach & Detach.

What's wrong with 'AccountCode'?

How do I change MaximumErrorCount in the SQL Server Management studio?

TIA

Mike

what is service pack applied on this machine. is there any particular reason you are going for copy database wizards. have u tried Backup/restore or dettach/attach method. You apply sp2 for sqlserver 2005 and try CDW

Madhu

|||

I applied SQL Server SP2 as part of my attempts to get it working yesterday. The OS is XP and has had XP SP 2 for a while.

I tried the backup / restore yesterday and the database was created but I could not see any tables, views, sp, etc. I just now I tried it again but this time I checked the "Overwrite existing database" selection and it seems to have worked just fine this time.

So I'm good to go now - I still don't know why CDW didn't work. I had deleted the database each time I tried it yesterday so it couldn't be that.

Thanks for the reply. At least it got me to try the restore option again.

Mike

Copy Database Wizard w/MSDE

I am trying to use the copy database wizard in Enterprise
manager to copy a database from one MSDE installation to
another. It always returns the error:
"Your SQL Server Service is running under the local
system account. You need to to change your SQL Server
Service account to have the rights to copy files over the
Network."
When I try to change the service to run under a different
account I get another error, "The handle is invalid."
I got to thinking that perhaps MSDE doesn't allow you to
run under anything but local system. Can anyone
confirm? Or does anyone know what's wrong here?
hi bill,
"bill" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:2d14001c46a06$8a1cd570$a401280a@.phx.gbl...
> When I try to change the service to run under a different
> account I get another error, "The handle is invalid."
> I got to thinking that perhaps MSDE doesn't allow you to
> run under anything but local system. Can anyone
> confirm? Or does anyone know what's wrong here?
MSDE SQL Server service and SQLSERVERAgent service can run on diferent
account than LocalSystem with no problem [of mines =;-) ]
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||a little addition to "invalid" message...
please have a look at http://tinyurl.com/696hq if can help
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Copy Database Wizard Timeout Error

Hi,

I am copying a database from one server to the other. Both have SQL 2005. When using the CDW, I get the following error after 10 minutes:

Event Name: OnError

Message: An exception occurred while executing a Transact-SQL statement or batch.

StackTrace: at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand)

at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(StringCollection sqlCommands)

at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()

InnerException-->Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

It always errors at 10 minutes. But, when I run the Create Database statement from my query analyzer, it works and it takes about 18 minutes.

How do I get the CDW to wait longer than 10 minutes before returning an error?

I have set my remote query timeout to 20 minutes and that didn't seem to have any effect.

Thanks,

--ExoStatic

Have you installed Service PAck 2? CDW is much improved.

Download SQL Server 2005 Service Pack 2 at:

http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx

...probably doesn't matter but the job runs on the destination server so it timeouts are relevent they may need to be set on that server.

|||

We have greatly improved SMO transfer in CDW with Service Pack 2. I strongly suggest you try that. Also, you could try using the detach/attach method instead of SMO Transfer. I believe it is faster and more reliable.

After installing Service Pack 2, please let us know if your problem persists. You may still have to change some settings on your server.

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||

if you use Detach/attach method you still need to migrate the Login from Source Server. You can also try Backup/Restore method which is best in such scenario. in this method also the Logins has to be taken care.

To transfer login Refer :http://support.microsoft.com/default.aspx/kb/246133

Madhu

sqlsql

Copy Database Wizard Throughput?

Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
original is composed of 2 or 3 data files and 1 translog file, total of about
12GB. I connected each server -- separate boxes -- to my internal network,
the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+ hours,
the CDW is still processing and I can see that the largest of the ldf files
has copied over to the 2005 server, but basically I'm wondering, what's the
metric per GB of data to move, 1Gb/per hour? Has anyone else using the CDW
seen it work faster? Just seems a bit slow to me . . .
Thanks,
Chad
Hello,
I recommend you to do:-
1. Backup the SQL 2000 database
2. Copy the Backup file to SQL 2005 server
3. Restore the Backup file. This will automatically restore and upgrade the
database to SQL 2005
Thanks
Hari
"cc" <cc@.discussions.microsoft.com> wrote in message
news:21E0DBD4-D1C1-4539-85E9-E048EF0A4EDA@.microsoft.com...
> Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
> original is composed of 2 or 3 data files and 1 translog file, total of
> about
> 12GB. I connected each server -- separate boxes -- to my internal
> network,
> the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+
> hours,
> the CDW is still processing and I can see that the largest of the ldf
> files
> has copied over to the 2005 server, but basically I'm wondering, what's
> the
> metric per GB of data to move, 1Gb/per hour? Has anyone else using the
> CDW
> seen it work faster? Just seems a bit slow to me . . .
> Thanks,
>
> Chad
|||On Feb 19, 8:37 pm, cc <c...@.discussions.microsoft.com> wrote:
> Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
> original is composed of 2 or 3 data files and 1 translog file, total of about
> 12GB. I connected each server -- separate boxes -- to my internal network,
> the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+ hours,
> the CDW is still processing and I can see that the largest of the ldf files
> has copied over to the 2005 server, but basically I'm wondering, what's the
> metric per GB of data to move, 1Gb/per hour? Has anyone else using the CDW
> seen it work faster? Just seems a bit slow to me . . .
> Thanks,
> Chad
That wizard does the equivalent of you scripting and creating each
individual database object, followed by a INSERT INTO/SELECT * for
each table. It's pretty much a toy with no real value. There are
better, accepted methods for transferring a database between servers:
1. BACKUP/RESTORE - preferred if downtime is a concern, can be done
without taking the host DB offline
2. Detach/reattach - preferred if a clean cutoff is required, host DB
is taken offline, copied to the new location, then brought back
online.
Both are much faster and simpler than the copy wizard.
|||It looks like I'll go the sp_detach route. I had tried CDW with some <100mb
dbs and it went smoothly and quickly, but this one actually croaked. Well,
to be specific, I thought maybe I had too many GUI resources open, and in
Win2003, the SQL Mgr and CDW both appear as separate graphical entities, so I
killed the SQL MGR, which took the CDW down, just like that, no warnings, no
rollback at all. Fortunately, I was able to reattach the mdf files on the
origin server. Sigh.
"Tracy McKibben" wrote:

> On Feb 19, 8:37 pm, cc <c...@.discussions.microsoft.com> wrote:
>
> That wizard does the equivalent of you scripting and creating each
> individual database object, followed by a INSERT INTO/SELECT * for
> each table. It's pretty much a toy with no real value. There are
> better, accepted methods for transferring a database between servers:
> 1. BACKUP/RESTORE - preferred if downtime is a concern, can be done
> without taking the host DB offline
> 2. Detach/reattach - preferred if a clean cutoff is required, host DB
> is taken offline, copied to the new location, then brought back
> online.
> Both are much faster and simpler than the copy wizard.
>
>

Copy Database Wizard Throughput?

Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
original is composed of 2 or 3 data files and 1 translog file, total of about
12GB. I connected each server -- separate boxes -- to my internal network,
the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+ hours,
the CDW is still processing and I can see that the largest of the ldf files
has copied over to the 2005 server, but basically I'm wondering, what's the
metric per GB of data to move, 1Gb/per hour? Has anyone else using the CDW
seen it work faster? Just seems a bit slow to me . . .
Thanks,
ChadHello,
I recommend you to do:-
1. Backup the SQL 2000 database
2. Copy the Backup file to SQL 2005 server
3. Restore the Backup file. This will automatically restore and upgrade the
database to SQL 2005
Thanks
Hari
"cc" <cc@.discussions.microsoft.com> wrote in message
news:21E0DBD4-D1C1-4539-85E9-E048EF0A4EDA@.microsoft.com...
> Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
> original is composed of 2 or 3 data files and 1 translog file, total of
> about
> 12GB. I connected each server -- separate boxes -- to my internal
> network,
> the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+
> hours,
> the CDW is still processing and I can see that the largest of the ldf
> files
> has copied over to the 2005 server, but basically I'm wondering, what's
> the
> metric per GB of data to move, 1Gb/per hour? Has anyone else using the
> CDW
> seen it work faster? Just seems a bit slow to me . . .
> Thanks,
>
> Chad|||On Feb 19, 8:37 pm, cc <c...@.discussions.microsoft.com> wrote:
> Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
> original is composed of 2 or 3 data files and 1 translog file, total of about
> 12GB. I connected each server -- separate boxes -- to my internal network,
> the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+ hours,
> the CDW is still processing and I can see that the largest of the ldf files
> has copied over to the 2005 server, but basically I'm wondering, what's the
> metric per GB of data to move, 1Gb/per hour? Has anyone else using the CDW
> seen it work faster? Just seems a bit slow to me . . .
> Thanks,
> Chad
That wizard does the equivalent of you scripting and creating each
individual database object, followed by a INSERT INTO/SELECT * for
each table. It's pretty much a toy with no real value. There are
better, accepted methods for transferring a database between servers:
1. BACKUP/RESTORE - preferred if downtime is a concern, can be done
without taking the host DB offline
2. Detach/reattach - preferred if a clean cutoff is required, host DB
is taken offline, copied to the new location, then brought back
online.
Both are much faster and simpler than the copy wizard.|||It looks like I'll go the sp_detach route. I had tried CDW with some <100mb
dbs and it went smoothly and quickly, but this one actually croaked. Well,
to be specific, I thought maybe I had too many GUI resources open, and in
Win2003, the SQL Mgr and CDW both appear as separate graphical entities, so I
killed the SQL MGR, which took the CDW down, just like that, no warnings, no
rollback at all. Fortunately, I was able to reattach the mdf files on the
origin server. Sigh.
"Tracy McKibben" wrote:
> On Feb 19, 8:37 pm, cc <c...@.discussions.microsoft.com> wrote:
> > Ok, so I'm trying to use the CDW to copy a SQL 2000 db to SQL 2005. The
> > original is composed of 2 or 3 data files and 1 translog file, total of about
> > 12GB. I connected each server -- separate boxes -- to my internal network,
> > the SQL 2005 has a Gbit NIC, the 2000 server a 100MBit NIC. After 10+ hours,
> > the CDW is still processing and I can see that the largest of the ldf files
> > has copied over to the 2005 server, but basically I'm wondering, what's the
> > metric per GB of data to move, 1Gb/per hour? Has anyone else using the CDW
> > seen it work faster? Just seems a bit slow to me . . .
> >
> > Thanks,
> >
> > Chad
>
> That wizard does the equivalent of you scripting and creating each
> individual database object, followed by a INSERT INTO/SELECT * for
> each table. It's pretty much a toy with no real value. There are
> better, accepted methods for transferring a database between servers:
> 1. BACKUP/RESTORE - preferred if downtime is a concern, can be done
> without taking the host DB offline
> 2. Detach/reattach - preferred if a clean cutoff is required, host DB
> is taken offline, copied to the new location, then brought back
> online.
> Both are much faster and simpler than the copy wizard.
>
>