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
 General SQL Server Forums
 New to SQL Server Administration
 SQLbuilkCopy

Author  Topic 

shiyam198
Yak Posting Veteran

94 Posts

Posted - 2012-08-22 : 23:45:28
Hi,

When I try to create a following SP in a new server, it says the error - Msg 6528, Level 16, State 1, Procedure usp_BulkCopy, Line 3
Assembly 'SqlBulkCopy' was not found in the SQL catalog of database 'master'.


USE [master]
GO

/****** Object: StoredProcedure [dbo].[usp_BulkCopy] Script Date: 08/22/2012 23:32:59 ******/
CREATE PROCEDURE [dbo].[usp_BulkCopy]
@sourceServer [nvarchar](255),
@sourceDatabase [nvarchar](255),
@sourceSelectQuery [nvarchar](4000),
@destinationServer [nvarchar](255),
@destinationDatabase [nvarchar](255),
@destinationTable [nvarchar](255),
@FlagKeepIdentity [bit],
@throwExceptionOnErrors [bit],
@SourceTrusted [bit],
@DestTrusted [bit],
@SourceUser [nvarchar](255),
@SourcePass [nvarchar](255),
@DestUser [nvarchar](255),
@DestPass [nvarchar](255)
WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [SqlBulkCopy].[StoredProcedures].[usp_BulkCopy]
GO



How do I overcome this? I am not sure what an assembly is and if it is indeed a real issue.

Thanks for your time..

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-23 : 07:25:59
Did you successfully create the SqlBulkCopy assembly? You can check if it was using
SELECT * FROM sys.assembly_modules
I am assuming you are trying to do something more complex or something that cannot be handled by the bulk copy feature built into SQL Server and so trying to implement a CLR procedure to accomplish that.
Go to Top of Page

komkrit
Yak Posting Veteran

60 Posts

Posted - 2012-08-23 : 08:43:30
You have to install CLR assemblies (.dll) before using them.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Komkrit Yensirikul
Welcome for all questions. Let us know if our solution solved your problem.
Go to Top of Page

komkrit
Yak Posting Veteran

60 Posts

Posted - 2012-08-23 : 08:43:37
Edit
Go to Top of Page
   

- Advertisement -