Are you using the absolute path (\\server\folder\file.txt)of the file rather than a mapped drive location? That can throw it off if the mapped drive does not exist on the server.
Also, like Denny says - make sure the SQL server admin
account has rights to the path/file in question. If not...
...via T-SQL via xp_cmdshell, you would just run them in the same statement:
declare @sql varchar(1000)
--set first bcp
set @sql = 'bcp "SELECT * FROM Table" queryout "\\server\folder\filename.txt" -c -q -S"ServerName" -T'
exec master..xp_cmdshell @sql
--set second bcp
set @sql = 'bcp...
Thousands of good ideas for xml... One off the top of my head that I did was to create a web based application that reads an xml file to show active processes. Export the sysprocesses table to xml and then have the web app read the xml. Not sure if this is what you were looking for.
I believe this is how you would join your tables:
UPDATE [TBL-1]
SET [TBL-1].txtN = [TBL-2].txtN
FROM [TBL-1]
INNER JOIN [TBL-3] ON [TBL-1].txtACT = [TBL-3].txtACT
INNER JOIN [TBL-2] ON [TBL-2].txtID = [TBL-3].txtID
WHERE tblRelationships.txtRelationship = 'P'
But if...
Hi All -
I've got a job that bcp's a table out at night but the table is quite large (4.2 million rows) and the bcp takes around 15 minutes.
I want to make sure that there are no INSERT / UPDATE / DELETE statements executed on the table during the bcp out and it seems the -h"TABLOCK" switch...
Right-click on the properties of the linked server on the host server in Enterprise Manager -> Security -> Linked Servers. Go to the Server Options tab and check "Data Access" checkbox to allow Data Access. You might also want to enable RPC and RPC Out while you are there.
See if that works.
You can turn on Package Logging, right click the dts window and go to properties and enable package logging but it doesn't contain this level of detail.
Package logs will tell you what steps started, completed and their run-time, I belive.
To do this, to the level of granularity you...
Not sure but you might want to create the file and then move and/or rename it using an activex script bringing in the global variable you caught in the dynamic properties task.
Andy
Lonnie,
Not sure if you want to use activex scripts to accomplish this but here is a good page that lists many examples of how to accomplish things in vbscript, the language that activex controls use:
http://www.vba-programmer.com/#VBScriptBkmk
If you are using access vba now to update...
I i'm not sure there is a way with the vb script in the activex controls. I would suggest using VS.NET (or your preferred development environment) and build a windows app if you need a browser dialogue control.
...file to the name passed in in the Global Variable.
The code below does this and adds a date stamp to the file name.
Hope this helps,
Andy
'******************************
' Visual Basic ActiveX Script
'******************************
Function Main()
On Error Resume Next
Dim fso...
Try:
Declare @Counter int, @i int
Set @Counter = --# of rows you want to insert
Set @i = 0
While @Counter > @i
BEGIN
INSERT INTO TableCouponList ( TrackingNo, Name, ExpirationDate )
SELECT TrackingNo, Name, ExpirationDate
FROM TableCoupons;
Set @i = @i + 1
END
are you sysadmin on the box? I believe you cannot run activex scripts in DTS if you are not in the sysadmin group. Also might want to try re-registering the cdosys.dll with regsvr32 in a cmd prompt.
If you have used the Description field of the package to type a desription of the package, you can retreive that info from msdb.dbo.sysdtspackages. As for what each step does, I can't think of any way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.