INF: ????? ???? DTS ? ???? ??????

?????? ????????? ?????? ?????????
???? ???????: 242391 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? ?? ??? ??????? ????? ??? ????????? ??????? ???????? ?? ????? ???? ??? SQL Server 7.0 ???????? ????? ????? (DTS). ??? ????? ????? ??????? ?????? ???? ??????.

?????? ??? ??????? ??? ??? ??????? ?? SQL Server 2000 ???? "??? SQL Server ???????".

??????? ????

????? ??????? ???????? ??????

????? ???? DTS ???? ?????? ??????? ???? ????. ??? ????? ???? ??????? ??????? ??? ?????? ????? ??????? ?? ??? ??????? ??????? ??????? ??? ?? UDLs ? DSNs ODBC. ??? ??? ?????? ODBC DSN ?? UDL OLEDB ??? ????? ?????? ??? ??????? ?? ????? ??? ??????. ??? ??? ???? ??? ?????? ????? ??? ?? ???? ????? ??? ???????.

??? ??????? ??????? ???????? SQL Server ??????? (????) ?????? ??? ??? ?????? ???? ?? ????? ??? ?????? ?? ???? ??? ???? ??? ?? ??? ?????? ?? ?? ?? ?? ??? ????? ??????. caveat ???? ??? ??? ??????? ????? ?? ??? ????? ?????? ?? ????? ??? SQL Server ????????? ????.

????? ????? ??????? ???? ??? ???????? ??? ActiveX ?? ?????? ????? ?????? ????? ?????? ????? ??? ???????. ?????? ?????? ?? ???? ???? ????? ???? ??? ActiveX Script ???? ?????? ???? ???????? ???????? ?????? ????? ??????. ?????? ??? ???? ???? ???? DTSGlobalVariables.Parent. ??? ???? ????? ????? ?? ?? ????? ?????? ??? ????? ?? ??? ????? ?????? ????? ??????.

?????? ???? ?? SQL ???????? ???????? "???? Script ActiveX" ? ??? ????? ????? ??????? DataSource ????? ?? ?????? ??? ActiveX:
   Function main()
   dim oPackage
   dim oConn

     'Get package object
     set oPackage = DTSGlobalVariables.parent
     'Get a handle to the desired connection.
     set oConn = oPackage.connections(1)
     'Modify the datasource.
     oConn.datasource = "newServerName"

     'Release object handles.
     set oPackage = nothing
     set oConn = nothing

    Main = DTSTaskExecResult_Success
End function
				
??? ???? ???? ?? ?????? ?? ???? ????? ???? ?? ?????? ????? ?????? ?? ??????? ?? ????? ?????? ?? ?????? ????? ??? ??????.

?????? ?????? ????? ???? ???????? ????? ???? ???? ???????? "????? DTS" ?? "???? DTS ??? ?????. ????? ?????? Visual Basic ?????? ?????? ??? ?????? ??????? ???????? ?? ??????? ????? ??????? ??? ???? ?????? ?????? ??????.

?????? ?????? ?????? ???? ?? ??????? ????? ???? ????? ???? ???????? "????? DTS" ?? "???? DTS ????? ??? SQL Server ???????. ??????? ?????? ???????? ScriptPkg ?? ????? "????? ????? Microsoft" ??????? ?????? ???? ???? ??????:
239454INF: ScriptPkg ?????? ?????? ??? ???? ?????? DTS ?????? ???????? ????????? DTS ???????
???????? ??? ?????? ????? ? ????? ????????? ???????? ?????? ?? ?????? ???? ???????? ??? ????? ????????.

???? ?? ??? ????? ?? ??????? ??????? ????? Visual Basic ????? ??? ?? ???? ??? ????? ?????? Microsoft DTSPackage.

???: ??? ????? ???? ?? ??? ????? ???????? ?? Visual Basic ? ?????? ?????? ?? ????? ???? ? ??? ????? ???? ??????? ?? ?????? ????? ??? ???? ??????? ???????. ???? ??? ???? ???? ???? ?? Visual Basic ????? ?? ?????? ?????? ??????????? ????????? ??? ??????? ?????? ?? ???? ????.

?????? ?? ????? ?? ????????? ????????

????????? ???????? ?????? ????? ??? ?? ?????? ???????? ????? ActiveX ???????? ?????? ??? ??????? ActiveX. ?? ???? ????????? ???? ????? ?? ?????? SQL ?? ????? ???????. ??? ???? ???? ??????? ???? ??? ???????? ??? ActiveX ????? ????? SQL ?? ????? ??????? ???????? ??? ????? ?????. ????? ??? ???? ??? ???? ???????? ????? ActiveX ???? ???? ????????? ?????? ????? SQL ????? ???? ?????? ???????? ??? ??????? ????? ?????? 'booktype':
Function Main()
   dim oPackage
   dim oPump

        'Get a handle to the Package object.
	set oPackage = DTSGlobalVariables.Parent
	'Get a handle to the desired Datapump Task.
	set oPump = oPackage.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask   
	'Alter the datapump SQL statement.
	oPump.SourceSQLStatement = "select * from pubs..titles WHERE type _
  = ''" + DTSGlobalVariables("booktype") + "''"
	Main = DTSTaskExecResult_Success
End Function
				
??????: ??? ??? ????? ???? ?? ???? DTS ???? ?? ???? ???????? ????? ???? ?? ?????? ??? ActiveX ??????. ??? ?? ??? ??????? ??? ?????? ??? ?????? ?? ?????? ??? ActiveX. ?????? ??? ??? ?????? ???? ????? ??? ????? ?? ??? ??????. ??? ?????? ?? ??? ?????? ?? ??? ???? ??? ??????? '??????' ?? '??????'. ??? ???? ??????? ???? DTSStep_DTSDataPumpTask_1 DTSTask_DTSDataPumpTask_1.

????? ?????? ??? ???? DTS

?????? DTSRun ?? ???? ??? ?????? ??? ??????? ???? ???? ????? ?????? ??? ??? ?????. ?????? ????????? ??? ???? ??? ??? ??????? "? ??? ?? ???? ????? ?? ??? ???????? ?? ????????? ???? ?? ???? ????? ?????? ???????.

??????: ??? ????? SQL Server 2000 ?? ???? ???? ?? SQL Server 2000 ???? ??? ???? SQL Server 7.0 ?????? ????? ????????? ???????? DTSRun ???? ???? ????? ??? ????? /A ?????? ????? ?? ??? ??????? ??? ????????? ???????? ???????? ?? ???? DTS SQL Server 7.0.

????? ??? ???? ?? ?????? Script ActiveX ???? ??? ?? ??? ????? ?????? ????? ?????. ?? ???? ??????? ??? ??????? ???????? ?????? ???? ???? ??? ?? ???? ?? ??? "?????? ????? ?? ???????? ???????" ?? ??? ???????.
Function main()
  Dim fso	'This will serve as a handle to a file system object.
  Dim ofile	'Handle for accessing a file.

    'Get a file system object for manipulation files.
    Set fso = CreateObject("Scripting.FileSystemObject")

    'Open the text file.
    Set ofile = fso.OpenTextFile("c:\test.txt")

    'Read line from the file into the global variable.
    DTSGlobalVariables("myGlobalVar").Value = ofile.ReadLine

    'Close the "parameter" file.
    ofile.Close

    Main = DTSTaskExecResult_Success
End function
				
???? ?????? ?????? ????? ??????? ???? ActiveX Script ????? ???????? ?? ???? ???? SQL. ???? ???? ?????? paramvalue ?? my_param_table ????????? ???????? ?? ?????? ?????? ????? ?????. ?????? ??? ?????? ?????? ??????? ????? SQL (DMO) ??????? ?? SQL Server ???? ????? ????? ??? ????? ???????? ?????? ?????? ActiveX (ADO) ?? ????? ??? ?????? ??? ????????.
Function main()
Dim oServer 		'DMO Server object.
Dim oResult		'Result set.
Dim sParamValue

	'Create a SQLDMO server object.
	Set oServer =  CreateObject("SQLDMO.SQLServer")

	' Make a connection to the local server.
	oServer.Connect ".", "sa"

	'Select the desired row from the table.
	set oResult = oServer.Databases("pubs").ExecuteWithResults_
("select  paramvalue from  my_param_table")

	'Retrieve the first row, first column from the results.
	sParamValue = oResult.GetColumnString (1,1)

	'Set the global variable.
	DTSGlobalVariables("MyGlobalVar").Value = sParamValue

	Main = DTSTaskExecResult_Success
End function
				

????? ???? DTS ???? ?? Visual Basic

?? ?????? ????? ?????? DTS ??????? ?? Visual Basic. ????? ???? ?? "?????? ???????" ?? Visual Basic ???? ????? ?????? ?? ???? \Devtools\Samples\DTS ??? ????? ??????? ????? ?? SQL Server. ???? ??? ?????? ?? ???????? ??????? ??? ???? ?????? ?? ???? Visual Basic ????? ?? DTS:
  1. ????? ?????? ??????? ??????? ??? Visual Basic ???? ?????? ????? ??? ??? ?? DTS.CustomTaskUI ??? ??? ?? ??????? ?? ???? ????? ??? "?????? ????".
  2. ??? ??? ???? ?????? ???? ????? Visual Basic ?? ????? ?????? ??? ???????? ????? SQL Server ?????? ????? ?????? Service Pack 1 (SP1). ???? SP1 ??? ??????? ?????? ??????? UI.
  3. ???? ?????? Visual Basic ????? ??????? ????? ???? ????? DTS ?????. ?????? ???? ??????? ??? Visual Basic ??? ?? ??? ??????? ??? ???? ??????? ??????? ?? ????? "?????? ????". ????? DTS ????? ??????? ???? ???????. ?? ??? ??? ???????? ????? ??? ???????.

?????? ??? ??????? ??? ????? ????? DTS ???

?? SQL 7.0 ???? ????? ?????? ??? ????? ??????? ??? ?????? \Devtools\Damples\DTS. ????? ????? "?????? ???????" (Visual Basic) ?? ???? ????? (C++). ??? ??? ????? ????? ?? ?????? ??????? DTSDemo.exe ?????? ???????.

?????? ?????? versatile ?? ScriptPkg ??? ?? Dtsdemo.exe. ????? ScriptPkg ??? ????????? ???????? ?????? ?? Visual Basic ???? ???? ???? ??? ??? ?????? ?????? ?? ????????? ???????? ?? Visual Basic. ??? ??????? ??? ?????? ???? ??:
  1. ????? ??????? Visual Basic ?? ???? ????? ???? DTS ??????.
  2. ???? ????? ??? ?????? ??????? flatfile DTS ???? ?? ??? ??????? ?? SQL ????????.
  3. ????? ???? ??? ?? ???? ???? ??????? ??? ?????? ???? ?? SourceSafe.
???? ??? ?????? ?? ???????? ???????? ?? ?????? ScriptPkg:
  1. ?????? ????? ?? ???? ?????? ???? ??? ??????? ???? ????.
  2. ??? ???? ?????? ????? ???? ?? ???? ?????? ?? ??? ??????? ??? ??? ???? ????? ?? Visual Basic ??? ???? ???? ???? ??? ??? ?????? ?? ???? ?????. ????? ???? ?????? ??? ???????? ????? ??? ????? ?????? ??? ?????? ?????? ??? Visual Basic ????? ????????? ???????? ????? ??.

????? ?????? ???? DTS

??????? ????????? Parallel

DTS ???? ??? ????? ???? ?????? ?? ??? ?????. ??? ???? ???? ??? ?????? ?? ????? ?? ???? DTS ???? ????? ???? ?? ?? ???. ???? ???? ?? ????? ???????? ?????? ?? ???? ??? ???? ?????:

A-> B ? A-> B
A-> B ? A-> C
A-> B ? C-> B

?? ??? ??????? ???? ??? ?? ?????? ??????? ???? ?? ???? ??????.

??????? ??????? ?????? ??? ??????? ???????? ?? ?????? ?? ????? ??????? ?????? ??? ??? ????? ???????? ?? ????? ??????. ??? ???? ??????-> B ? C-> D ??? ??????? ?? ??? ????? ??? ??? ??? B ? D ??????? ?????? ??? ??? ?????? ?????? ???????? ?????? ??????.

???? ??????? ???? ???????? ??? ????? ????? ?????? ???? parallelism ?????? ??????? ??? ???????.

????? ??? ?????

??????? ?????? ????? ?? ???? ???? ???????? ?? ????? ??? ????????. ?? ??? ??????? ??? ????? ??? ????? ???? ?????? SQL Server. ?????? ?? ??? ?????? ??? ??????? ??? ?? ????? ????????? ????? ?????. ???? ??????? ??? ?? 0; ???? ?????? ??? ?? ?????? ?????. ??? ?? ??????? ?????? ????? ??? ???? ??? ??? ????? SQL Server ?????? ????? ???? ?????????. ??? ???? ???? ???? ????? ??? ??????? ???? ???? ? ???? ??? ????? ???? ??? ??????? ??? ????? ???? ? ???? ????? ??????? ??? ?? ???? ?? ????? ??????? ???? ???? ????? ??????? ??? ???. ??? ?????? ????? ???? ??????? ?? ????? ?? ???? ???? ???????? ????? ??? ????? ??????. ??? ??????? 0 ????, ???? ??? ??? ???? ???? 10,000, 1 ? 1000 ?? ????? ????? ????. ???? 1 ??? ??????? ?? ?? ???? ??? ??? ?? ???.

???? ?? ????? ??? ????? ??? ?? ??? > 1 ?? ????? ??? ??? ??? ???????? ????? 0. ??? ????? ????? ??? ????????? ?? ???? ??? ?? ??? ??????.

?? SQL Server 7.0 ???? ????? ???? ????? ??? ????? ?? ?????? ???? ???????? ?? ????? ??????? ?????? ?????? ?? ????? ?????? ???????? ???????.

DTS "?" ????????? ???????

????? ??? DTS ?????? ????????? ??????? ?????? ??? ???? ???? DTC. ??? ????? ???? DTC ?? ????????? ???? ?? ????? ??? ?????. ???????? ??? ???? ??? ?? ????? ???? ?? ?? ???????? DTC.

??? ?????? ?? ????? ???????? ???? ?? ????? ??????? ?????? ?????? ?? ????? ??????.

?????????? ?? ???? ?? ???? ?????? ????????? ?????? ?? ?????? ?? ?? ????? ????????? ?????? ?? ??? DTC. ?????? ???? ?? ??????? DTC ??? ???? ????? ???? ???????? "???????? ???????? ??? ??? ???????" ?? ????? ??? ????? ??????. ?????? ??????? DTC ?????? ???? "????? ???????? ??? ??????? ?????? ??? ??????" ? "????????? ???????? ??? ?????."

???? ?? ????? ?? ???? ???? ????????? ?? Microsoft "(MTS).

???? ????? ???

??? ??????? ???? ????? ????? ?????? ??????? ?? ???? ??? ?? ??? ????? ?????? ?? ???? ??? ???? ??? ????? ???? ??????? ? ???? ????? ????? ???????:
???? ?????: "????" Microsoft OLE DB ?? SQL Server ??? ???: ?? ???? ??? ????? ???????? ???????? ?? ????? ?????? 'xxxxxxx'. ??? ????? ??????."

???????

???? ???????: 242391 - ????? ??? ??????: 20/?????/1423 - ??????: 1.2
????? ???
  • Microsoft SQL Server 7.0 Standard Edition
????? ??????: 
kbmt kbinfo KB242391 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????242391

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com