Re: Import Data succeeds but doesn't copy data?



<egg-on-face>

I went back to the import data script and looked at it carefully, and I
realized that the tables were being copied, but under a different schema, so
I ended up with a duplicate set of tables that DID have the data in them :(

</egg-on-face>

My question is, is there any way to alter the schema identity of a table?

IOW: the application is looking for a table with a schema of "dbo" like:

[mydatabase].[dbo].[mytable]

but when I'm copying the database, the tables are being created as:

[mydatabase].[myschema].[mytable]

is there any way to "map" those tables with [myschema] to [dbo]? If I run
the app's script to create the tables, it creates them under [dbo], and if I
try to copy directly to those tables, all SSMS will let me do is create new
tables under schema [myschema]...help?


--

"Arnie Rowland" <arnie@xxxxxxxx> wrote in message
news:OGg7Y0WyGHA.4392@xxxxxxxxxxxxxxxxxxxxxxx
Look closely at the messages...

Copy rows from [myDataBase].[myDataBase].[carthead] to
[myDataBase].[myDataBase].[carthead]

Looks like you are copying from a database [MyDatabase] to the SAME
[MyDatabase]

I still suspect that you are using the same source and destination
servers.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"geek-y-guy" <noone@xxxxxxxxxxx> wrote in message
news:%2383%23QrWyGHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
If a CONSTRAINT was involved with preventing the data from being
imported, there would be error messages, and you would not receive a
"copied xxx rows" message.

That's what I assumed...

I'm wondering about the location of the resulting table. Are you sure
that you did NOT use the same server for both the source and
destination?

That would be a likely mistake for me to make :o

... but in this case I'm sure that isn't what's happening...I'm copying
from the remote server and targeting the dB on the local server (I've
tried it numerous times). In each case, I'm logging in to the remote
server with a SQL Login/pwd and to the local server with a trusted
connection. I'm selected "delete rows in target table" and "enable
identity insert". Here's my transaction:

//--begin transaction
Click Finish to perform the following actions:
Copy rows from [myDataBase].[myDataBase].[carthead] to
[myDataBase].[myDataBase].[carthead]
Any existing rows in the target table will be deleted.
Copy rows from [myDataBase].[myDataBase].[cartrows] to
[myDataBase].[myDataBase].[cartrows]
Any existing rows in the target table will be deleted.
Copy rows from [myDataBase].[myDataBase].[CartRowsOptions] to
[myDataBase].[myDataBase].[CartRowsOptions]
Any existing rows in the target table will be deleted.
Copy rows from [myDataBase].[myDataBase].[Categories] to
[myDataBase].[myDataBase].[Categories]
Any existing rows in the target table will be deleted.
Copy rows from [myDataBase].[myDataBase].[Categories_Products] to
[myDataBase].[myDataBase].[Categories_Products]
Any existing rows in the target table will be deleted.
The package will not be saved.
The package will be run immediately.
The execution was successful
//--end transaction

And here's the report upon completion:

//--begin report
- Create a TransferProvider. (Success)
- Create a temporary file for destructive SQL. (Success)
- Create a temporary file for constructive SQL. (Success)
- Create a temporary XML file for table metadata. (Success)
- Configure the TransferProvider with files and Source/Destination
connection info. (Success)
- Execute the transfer with the TransferProvider. (Success)
- Execute the destructive SQL. (drop tables) (Success)
- Execute the constructive SQL. (create tables) (Success)
- Create a temporary table transfer package for [myDataBase].[carthead]
(Success)
- Execute transfer package for [myDataBase].[carthead] (Success)
- Copying to [myDataBase].[carthead] (Success)
* 45 rows transferred
- Create a temporary table transfer package for [myDataBase].[cartrows]
(Success)
- Execute transfer package for [myDataBase].[cartrows] (Success)
- Copying to [myDataBase].[cartrows] (Success)
* 65 rows transferred
- Create a temporary table transfer package for
[myDataBase].[CartRowsOptions] (Success)
- Execute transfer package for [myDataBase].[CartRowsOptions]
(Success)
- Copying to [myDataBase].[CartRowsOptions] (Success)
* 0 rows transferred
- Create a temporary table transfer package for [myDataBase].[Categories]
(Success)
- Execute transfer package for [myDataBase].[Categories] (Success)
- Copying to [myDataBase].[Categories] (Success)
* 3 rows transferred
- Create a temporary table transfer package for
[myDataBase].[Categories_Products] (Success)
- Execute transfer package for [myDataBase].[Categories_Products]
(Success)
- Copying to [myDataBase].[Categories_Products] (Success)
* 13 rows transferred
//--end report

So, it looks like everything executes...but when I open any table in the
dB, the data is not there!

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"geek-y-guy" <noone@xxxxxxxxxxx> wrote in message
news:OSWC9ovxGHA.4232@xxxxxxxxxxxxxxxxxxxxxxx
I have a dB on a remote SQL2000sp4/win2k server I'm trying to import
into SQL2005x64 (sp1) on Server2003x64. I have a schema that I didn't
write that created the database on both servers.

During config on the import wizard I select to delete existing data and
enable identity insert, and when I run the copy all the steps complete,
including "copied xxx rows", and there are no errors in the report.

But when I check the table, there is no data in it! Would a constraint
on the table prevent the data from actually being inserted, even though
it reports the rows were copied successfully?









.



Relevant Pages

  • Re: Import Data succeeds but doesnt copy data?
    ... you did NOT use the same server for both the source and destination? ... Any existing rows in the target table will be deleted. ... Configure the TransferProvider with files and Source/Destination ...
    (microsoft.public.sqlserver.tools)
  • Re: Import Data succeeds but doesnt copy data?
    ... Looks like you are copying from a database to the SAME ... I mentioned that I copied to a new dB on the destination server ... Configure the TransferProvider with files and Source/Destination ...
    (microsoft.public.sqlserver.tools)
  • Re: Import Data succeeds but doesnt copy data?
    ... that you did NOT use the same server for both the source and destination? ... Any existing rows in the target table will be deleted. ... Configure the TransferProvider with files and Source/Destination ...
    (microsoft.public.sqlserver.tools)
  • DHCP Migration to 2008
    ... We are having problems with migrating the DHCP from Windows 2003 SP2 to 2008. ... The source DHCP server is our production and the target is ... We have searched for this particular error without success. ...
    (microsoft.public.windows.server.migration)
  • Re: Should I Abandon Mutt and Exim4?
    ... earlier and got several suggestions each of which I tried without success. ... POP mail server server name: mail.tomgeorge.info port 110 user name: lists@xxxxxxxxxxxxxx ... SMTP error from remote mailer after MAIL ... If I understand the attached quote from /usr/share/doc/exim4/README.Debian.gz exim should handle this automatically (and the Mozilla setup referred to above is set to use TLS ...
    (Debian-User)