存儲過程 將DTS包檔載入到伺服器上 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[s_LoadPackageToServer]') and 賣屋OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure [dbo].[s_LoadPackageToServer]GOCreate procedure s_LoadPackageToServer@PackageName varchar(128) 辦公室出租,@FileName varchar(500) ,@Username varchar(100) ,@Pas sword varchar(100)as/*exec s_LoadPackageToServer @PackageName = 'mypackage' , @FileName = 酒店兼職'c:\dtsp ckgs\mypackage.dts' , @Username = 'sa' , @Password = 'pwd'*/declare @objPackage intdeclare @rc int exec @rc = 禮服sp_OACreate 'DTS.Package', @objPackage output if @rc <> 0 begin raiserror('failed to create package rc = %d', 16, -1, @rc) return 酒店經紀 end exec @rc = sp_OAMethod @objPackage, 'LoadFromStorageFile' , null, @UncFile = @FileName, @password = null if @rc <> 0 begin 酒店打工raiserror('failed to load package rc = %d, package = %s', 16, -1, @rc, @PackageName) return end exec @rc = sp_OAMethod @objPackage, 西服'SaveToSQLServerAs' , null, @NewName = @PackageName, @ServerName = @@ServerName, @ServerUserName = @Username, @ServerPassword = @Password if @rc 買屋網<> 0 begin raiserror('failed to load package rc = %d, package = %s', 16, -1, @rc, @PackageName) return end exec s_LoadPackageToServer 信用卡代償'mypackage' , 'c:\DTS_AN2CP_DIC.dts' , 'sa' ,  'sa'


.msgcontent .wsharing ul li { text-indent: 0; }



小額信貸 分享

Facebook
Plurk
YAHOO!

創作者介紹

頭號人物

xc90xcruld 發表在 痞客邦 PIXNET 留言(0) 人氣()