Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Getting error while copying data

Author  Topic 

satish.gorijala
Posting Yak Master

182 Posts

Posted - 2009-10-25 : 13:00:22
Hi, i want to transfer a table from one database to another database.Both databases are in same system.

Database1 contains table "Tbl_Test" Which contains 2 crores records.

Now i want to move this table to Database 2. Through DTS pkg its take more time. so i am trying this query ...but getting error

Select * Into Database2.Tbl_TestData from Tbl_Test

I am getting below error:
Msg 2760, Level 16, State 1, Line 1
The specified schema name "CensusDB" either does not exist or you do not have permission to use it.

I am running sql as admin..and i have all permissions.

developer :)

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-10-25 : 13:05:49
try changing this
Select * Into Database2.Tbl_TestData from Tbl_Test

to
Select * Into Database2.dbo.Tbl_TestData from Tbl_Test

Go to Top of Page

satish.gorijala
Posting Yak Master

182 Posts

Posted - 2009-10-25 : 13:31:17
Thank you. It works for me.

quote:
Originally posted by russell

try changing this
Select * Into Database2.Tbl_TestData from Tbl_Test

to
Select * Into Database2.dbo.Tbl_TestData from Tbl_Test





developer :)
Go to Top of Page
   

- Advertisement -