February 2, 2004 at 10:18 pm
Hi,
I have a dts file on a particular drive which should be loaded to database through command line.From gui we generally follow follwing steps.
I need this task to be done from command line can any one guide me.
Thanks
Ramesh kondru
February 4, 2004 at 4:37 am
I have done this using VB code. I created this code in Access VBA after setting a reference to Microsoft DTS Package.
Dim pkg As DTS.Package2
Set pkg = New DTS.Package2
pkg.LoadFromStorageFile "\\FileServer1\Folder\MyFile.dts", ""
pkg.SaveToSQLServerAs "MyFileName", "MyServer", "", "", DTSSQLStgFlag_UseTrustedConnection
I believe that you can do this in vbscript as well.
Russel Loski, MCSD
Russel Loski, MCSE Business Intelligence, Data Platform
February 4, 2004 at 4:57 am
Hi russel,
Thanks for your response, but this to be achieved by back end scripts only.
Thanks
Ramesh
February 4, 2004 at 5:37 am
Is your backend script different from VBScript?
There is some scripting tool that will allow you to run visual basic script from a command line. You could also run this as an ActiveX script job in SQL Server. You could also use an ActiveX task.
You would alter my code by changing the following:
Dim pkg As DTS.Package2
Set pkg = New DTS.Package2
to
Dim pkg
Set pkg = createobject("DTS.Package2")
The rest should work. If you don't have a VBScript writer, then this will be difficult.
Russel Loski, MCSD
Russel Loski, MCSE Business Intelligence, Data Platform
February 4, 2004 at 5:52 am
Hi Russel,
Thanks for sparing time for this, my problem is this should be executed at client database server whrere only sql available. If you can suggest some commands or script which is purely sequel, that will be agreat help for me.
Thanks
Ramesh
February 4, 2004 at 8:00 pm
See my response to your duplicate post.
--------------------
Colt 45 - the original point and click interface
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply