Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Thursday, March 29, 2012

DTS FTP problem

Is there any way to enter file names in the DTS FTP task even if the files are not presently there in the remote machine?I always implement FTP via t-sql e.g.
http://www.nigelrivett.net/s_ftp_PutFile.html

But in dts you can access the object model in an activex script and change the filename.

DTS From SQL Server 2000 to Btrieve

Hi,

This is my 1st time out here so please bear with me.

I am trying to transfer data from a SQL Server 2000 DB to a Btrieve file. I have everything set up and used the Import/Export Utility to create the DTS Package. Everything seems to wotk fine until I hit a field in the SQL Server 2000 DB that has a signle quote (') in a name field. Btrieve seems to bomb on that record. If I take the single quote out, it works fine until the next name with a single quote. What can I do to get these records imported?

Thanks much,
Rayuse the following function

ltrim(replace(columnname,'''',''))

you are replacing a single quote in a column with a null and you trimming that with ltrim function.......|||Thanks for the info, but I actually need the single quote. I have set my transformation to change the signle quote into a ~ (tilde). My C program the changes the ~ back to a single quote when updating the main data file from the temp one SQL Server updated.

Ray Fantasia

DTS from mapped drive problem

Hey guys

I am having a problem with a DTS package that pulls from a flat file off a mapped drive. When the package is ran alone, it runs perfectly but the stored proc that I took from an example from the net will not execute the DTS properly and I am unsure as to why it will not do so.

CREATE PROC spExecuteDTS
@.Server varchar(255),
@.PkgName varchar(255), -- Package Name (Defaults to most recent version)
@.ServerPWD varchar(255) = Null, -- Server Password if using SQL Security to load Package (UID is SUSER_NAME())
@.IntSecurity bit = 0, -- 0 = SQL Server Security, 1 = Integrated Security
@.PkgPWD varchar(255) = '' -- Package Password
AS

SET NOCOUNT ON
/*
Return Values
- 0 Successfull execution of Package
- 1 OLE Error
- 9 Failure of Package
*/
DECLARE @.hr int, @.ret int, @.oPKG int, @.Cmd varchar(1000)

-- Create a Pkg Object
EXEC @.hr = sp_OACreate 'DTS.Package', @.oPKG OUTPUT
IF @.hr <> 0
BEGIN
PRINT '*** Create Package object failed'
EXEC sp_displayoaerrorinfo @.oPKG, @.hr
RETURN 1
END

-- Evaluate Security and Build LoadFromSQLServer Statement
IF @.IntSecurity = 0
SET @.Cmd = 'LoadFromSQLServer("' + @.Server +'", "' + SUSER_SNAME() + '", "' + @.ServerPWD + '", 0, "' + @.PkgPWD + '", , , "' + @.PkgName + '")'
ELSE
SET @.Cmd = 'LoadFromSQLServer("' + @.Server +'", "", "", 256, "' + @.PkgPWD + '", , , "' + @.PkgName + '")'

EXEC @.hr = sp_OAMethod @.oPKG, @.Cmd, NULL

IF @.hr <> 0
BEGIN
PRINT '*** LoadFromSQLServer failed'
EXEC sp_displayoaerrorinfo @.oPKG , @.hr
RETURN 1
END

-- Execute Pkg
EXEC @.hr = sp_OAMethod @.oPKG, 'Execute'
IF @.hr <> 0
BEGIN
PRINT '*** Execute failed'
EXEC sp_displayoaerrorinfo @.oPKG , @.hr
RETURN 1
END

-- Check Pkg Errors
EXEC @.ret=spDisplayPkgErrors @.oPKG

-- Unitialize the Pkg
EXEC @.hr = sp_OAMethod @.oPKG, 'UnInitialize'
IF @.hr <> 0
BEGIN
PRINT '*** UnInitialize failed'
EXEC sp_displayoaerrorinfo @.oPKG , @.hr
RETURN 1
END

-- Clean Up
EXEC @.hr = sp_OADestroy @.oPKG
IF @.hr <> 0
BEGIN
EXEC sp_displayoaerrorinfo @.oPKG , @.hr
RETURN 1
END

RETURN @.ret
GO

that is the stored proc that i am using along with a couple error trapping ones but this being the one that does the actual execution. Is there anything i can change about this in order for it to run the DTS properly from the mapped drive?

thank youAre you getting an error message?|||Are you getting an error message?

*** LoadFromSQLServer failed
OLE Automation Error Information
sp_OAGetErrorInfo failed.
*** LoadFromSQLServer failed
OLE Automation Error Information
sp_OAGetErrorInfo failed.
*** LoadFromSQLServer failed
OLE Automation Error Information
sp_OAGetErrorInfo failed.|||Use the UNC path|||Does the login you are executing the OA_ stored procs as have permission to execute them?|||Wow

What to say

Usually people use DTS to avoid sprocs...but you're combing the 2

Why?

What does the sproc do?

Just load a flat file?

Why not just use bcp and xp_cmdshell?

DTS from excel file (excel filename is different everyday)

Good Day to all,
Hope you could help me w/ my project.
Im creating a DTS Package. The source data will be coming from an excel file going to my SQL table. The DTS package is scheduled to execute daily, but the source data will be coming from different excel filename.
Example, today the DTS will get data from Data092506.xls. Then tomorrow, the data will be coming from Data092606.xls.
How can I do this? The DTS I've already done has a fixed source data file.
Please help.
Thank you so much.
God Bless.You will need to create a variable in your DTS package for the file name, and then construct the filename dynamically.|||Hi blindman,
I can't seem to figure out how will I do that.
Could you be more specific, pls.
Thanks for taking the time to answer my queries.
God Bless.|||Look here:

http://www.sqldts.com/default.aspx?234|||use the following DTS steps for this

1) create a Global variable of name say "aa" of string type
2) add a ActiveX Task where u assign the value of global variable from system date. something like
DTSGlobalVariables("aa").Value = "d:\Data" & "0" & month(date()) & day(date()) & year(date()) & ".xls"
3) add a Dynamic Property task. select the Excel connection and assign the "data Source" to that global variable.
4) place a work flow so that the execution sequence is ActiveX>>Dynamic Prop>>Other Steps that u already have.|||Hi,
I can't seem to get it yet. I am presented w/ so many information from all the websites and help files that I am reading, and I end up more confused. :eek:
I'm a newbie in SQL and I need instructions for dummies. :D

Here's what I did:
1.) I created a global variable named gVarPath through the DTS Package Properties.
2.) I'm adding now a "ActiveX Script" Task in the DTS Designer. Here's my script:
'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
Main = DTSTaskExecResult_Success
DTSGlobalVariables("gVarPath").Value="D:\PROJECTS\Attendance-Excel\" & RIGHT('0'+ RTRIM(CAST(MONTH(GETDATE()-2) AS CHAR)),2) & RIGHT('0'+ RTRIM(CAST(DAY(GETDATE()-2) AS CHAR)),2) & RIGHT(YEAR(GETDATE()-2),2) & "_ALB.xls"
End Function

There's a syntax error. I will debug this later.

3.) I'm adding a "Dynamic Properties" task.
Question: Where can I select the excel connection? And how can I assign the data source to my global variable?
4.) And how can I place a workflow.

Please help :o|||Hi upalsen,

I got it already!
I followed your instructions. Many thanks to you. :)

Now, I have another question.:D
I need to import data from 24 excel files everyday. Excel filenames are like these:

100206_AAA
100206_BBB
100206_CCC
up to
100206_XXX

wherein 100206 is a date which I already knew how to alter for everyday DTS package execution. The last 3 characters are the branch code, in which we have 24 branches (ex. 100206_AAA, 100206_BBB,...100206_XXX).
How can I make a loop, so I can run the DTS package 24 times. Each run will get data from each excel files.

Here's how my ActiveX Script looks like:

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* *********************

Option Explicit

Function Main()
Dim vDay, vMonth, vYear, vDate

vDay=RIGHT(RTRIM("0" & DAY(DATE()-2)),2)
vMonth=RIGHT(RTRIM("0" & MONTH(DATE()-2)),2)
vYear=RIGHT(YEAR(DATE()-2),2)
vDate=vMonth & vDay & vYear

DTSGlobalVariables("gVarPath").Value=vDate & "_AAA.xls"

Main = DTSTaskExecResult_Success
End Function

Thank you so much... :)
God Bless.|||i am not sure if those branch codes r really fixed and hardcoded as AAA, BBB etc? or they will come from another table? assuming they are hard coded, u can ...
create another global variable, say vCounter. start with vCounter=1. add another ActiveX step. put it at the end of the existing workflow. add the following code

Function Main()
if vCounter <= 24 then
vCounter = vCounter+1
DTSGlobalVariables.Parent.Steps ("<NAME_OF_STEP1>").ExecutionStatus = DTSStepExecStat_Waiting
end if

Main = DTSTaskExecResult_Success
End Function

in your starting ActiveX script consider vCounter and write code to get branch code for each value

if vCounter = 1 then
BrCode = "AAA"
elseif vCounter .....

.......
DTSGlobalVariables("gVarPath").Value=vDate & "_" & BrCode & ".xls"|||Hi upalsen,

Yup. The branch codes are fixed and will be hardcoded.
Following your instructions, I created another global variable named "gVarCounter". How can I referenced "gVarCounter" in my Dynamic Properties Task? In my first global variable "gVarPath", I referenced it by assigning the data source of the excel connection to it.

And another question, how will I know the ("<NAME OF STEP1>")?
Here's my ActiveX script:
IF gVarCounter<=24 then
gVarCounter=gVarCounter+1
DTSGlobalVariables.Parent.Steps("DTSStep_DTSActiveScriptTask_1").ExecutionStatus=DTSStepExecStat_Waiting
END IF

I saw it in the Dynamic Property Task under Steps. Am I correct?

Thank you so much. :)|||u need not reference gVarCounter in your dynamic property task. all that u need to do is use gVarCounter in preparing the value of your previous gVarPath variable. like below. and dynamic prop will still use only gVarPath.

if gVarCounter = 1 then
BrCode = "AAA"
elseif gVarCounter=2 then
BrCode = "BBB"
.....

DTSGlobalVariables("gVarPath").Value=vDate & "_" & BrCode & ".xls"

yes, u r right. step names r listed in dynamic prop under "steps" heading.

DTS from 2000 to 2005

I migrated a DTS package from my 2000 test server to my 2005 test server and
I seem to be lost... The log file shows that everything converted fine,
where will I find that package? PLEASE HELP ME!!!1 THANK YOU>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
In SQL Server Management Studio, in Object Explorer, connect to the
Integration Services. Then chack whether the paclage is registered in the
local msdb database. If it is somewhere on the file system, search for the
*.dtsx files with Windows Explorer.
--
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||Im SSMS click on connect and choose Server Type-- Integration Services
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:ujXNdIX8GHA.1188@.TK2MSFTNGP05.phx.gbl...
>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
>|||something just doesn't seem right here >> I have SQL2000 installed as the
default instance, and 2005 as a named instance, when I register integration
services I only see the server name (which is by default the default
instance) I do not see, and can not find the 2005 named instance. So I
tried to work with that and I registered it and drilled down to the MSDB
container, when I open that container I get this error >>
TITLE: Microsoft SQL Server Management Studio
--
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
--
ADDITIONAL INFORMATION:
The SQL server specified in SSIS service configuration is not present or is
not available. This might occur when there is no default instance of SQL
Server on the computer. For more information, see the topic "Configuring the
Integration Services Service" in Server 2005 Books Online.
Client unable to establish connection
Encryption not supported on SQL Server. (MsDtsSrvr)
--
BUTTONS:
OK
--
<< I am just guessing here but is this because I have the wrong SQL server
registered in integration services '
ANYbody have any ideas, pleases... Thank you!!
========================================================"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
> >I migrated a DTS package from my 2000 test server to my 2005 test server
> >and I seem to be lost... The log file shows that everything converted
> >fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
> In SQL Server Management Studio, in Object Explorer, connect to the
> Integration Services. Then chack whether the paclage is registered in the
> local msdb database. If it is somewhere on the file system, search for the
> *.dtsx files with Windows Explorer.
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of
> the sender.
> This message does not imply endorsement from Solid Quality Learning, and
> it does not represent the point of view of Solid Quality Learning or any
> other person, company or institution mentioned in this message
>|||I'm a bit confused but I think your issue is that you are
using a named instances for 2005 and possibly didn't modify
the configuration file as indicated in the Books Online
topic so that SSIS would work with the named instance.
Locate the file MsDtsSrvr.ini.xml in your 2005 installation
path Program Files\Microsoft
SQL Server\90\DTS\Binn
The server name entry for a named instance should be
something along the lines of:
<ServerName>YourServer\YourInstanceName</ServerName>
-Sue
On Tue, 17 Oct 2006 09:39:53 -0500, "WANNABE" <breichenbach
AT istate DOT com> wrote:
>something just doesn't seem right here >> I have SQL2000 installed as the
>default instance, and 2005 as a named instance, when I register integration
>services I only see the server name (which is by default the default
>instance) I do not see, and can not find the 2005 named instance. So I
>tried to work with that and I registered it and drilled down to the MSDB
>container, when I open that container I get this error >>
>TITLE: Microsoft SQL Server Management Studio
>--
>Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
>For help, click:
>http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
>--
>ADDITIONAL INFORMATION:
>The SQL server specified in SSIS service configuration is not present or is
>not available. This might occur when there is no default instance of SQL
>Server on the computer. For more information, see the topic "Configuring the
>Integration Services Service" in Server 2005 Books Online.
>Client unable to establish connection
>Encryption not supported on SQL Server. (MsDtsSrvr)
>--
>BUTTONS:
>OK
>--
><< I am just guessing here but is this because I have the wrong SQL server
>registered in integration services '
>ANYbody have any ideas, pleases... Thank you!!
>========================================================>"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
>message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
>> >I migrated a DTS package from my 2000 test server to my 2005 test server
>> >and I seem to be lost... The log file shows that everything converted
>> >fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
>> In SQL Server Management Studio, in Object Explorer, connect to the
>> Integration Services. Then chack whether the paclage is registered in the
>> local msdb database. If it is somewhere on the file system, search for the
>> *.dtsx files with Windows Explorer.
>> --
>> Dejan Sarka, SQL Server MVP
>> Mentor, www.SolidQualityLearning.com
>> Anything written in this message represents solely the point of view of
>> the sender.
>> This message does not imply endorsement from Solid Quality Learning, and
>> it does not represent the point of view of Solid Quality Learning or any
>> other person, company or institution mentioned in this message
>>
>

DTS from 2000 to 2005

I migrated a DTS package from my 2000 test server to my 2005 test server and
I seem to be lost... The log file shows that everything converted fine,
where will I find that package? PLEASE HELP ME!!!1 THANK YOU
>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
In SQL Server Management Studio, in Object Explorer, connect to the
Integration Services. Then chack whether the paclage is registered in the
local msdb database. If it is somewhere on the file system, search for the
*.dtsx files with Windows Explorer.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message
|||Im SSMS click on connect and choose Server Type-- Integration Services
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:ujXNdIX8GHA.1188@.TK2MSFTNGP05.phx.gbl...
>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
>
|||something just doesn't seem right here >> I have SQL2000 installed as the
default instance, and 2005 as a named instance, when I register integration
services I only see the server name (which is by default the default
instance) I do not see, and can not find the 2005 named instance. So I
tried to work with that and I registered it and drilled down to the MSDB
container, when I open that container I get this error >>
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?ProdN...r&LinkId=20476
ADDITIONAL INFORMATION:
The SQL server specified in SSIS service configuration is not present or is
not available. This might occur when there is no default instance of SQL
Server on the computer. For more information, see the topic "Configuring the
Integration Services Service" in Server 2005 Books Online.
Client unable to establish connection
Encryption not supported on SQL Server. (MsDtsSrvr)
BUTTONS:
OK
<< I am just guessing here but is this because I have the wrong SQL server
registered in integration services ?
ANYbody have any ideas, pleases... Thank you!!
================================================== ======
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
> In SQL Server Management Studio, in Object Explorer, connect to the
> Integration Services. Then chack whether the paclage is registered in the
> local msdb database. If it is somewhere on the file system, search for the
> *.dtsx files with Windows Explorer.
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of
> the sender.
> This message does not imply endorsement from Solid Quality Learning, and
> it does not represent the point of view of Solid Quality Learning or any
> other person, company or institution mentioned in this message
>
|||I'm a bit confused but I think your issue is that you are
using a named instances for 2005 and possibly didn't modify
the configuration file as indicated in the Books Online
topic so that SSIS would work with the named instance.
Locate the file MsDtsSrvr.ini.xml in your 2005 installation
path Program Files\Microsoft
SQL Server\90\DTS\Binn
The server name entry for a named instance should be
something along the lines of:
<ServerName>YourServer\YourInstanceName</ServerName>
-Sue
On Tue, 17 Oct 2006 09:39:53 -0500, "WANNABE" <breichenbach
AT istate DOT com> wrote:

>something just doesn't seem right here >> I have SQL2000 installed as the
>default instance, and 2005 as a named instance, when I register integration
>services I only see the server name (which is by default the default
>instance) I do not see, and can not find the 2005 named instance. So I
>tried to work with that and I registered it and drilled down to the MSDB
>container, when I open that container I get this error >>
>TITLE: Microsoft SQL Server Management Studio
>--
>Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
>For help, click:
>http://go.microsoft.com/fwlink?ProdN...r&LinkId=20476
>--
>ADDITIONAL INFORMATION:
>The SQL server specified in SSIS service configuration is not present or is
>not available. This might occur when there is no default instance of SQL
>Server on the computer. For more information, see the topic "Configuring the
>Integration Services Service" in Server 2005 Books Online.
>Client unable to establish connection
>Encryption not supported on SQL Server. (MsDtsSrvr)
>--
>BUTTONS:
>OK
>--
><< I am just guessing here but is this because I have the wrong SQL server
>registered in integration services ?
>ANYbody have any ideas, pleases... Thank you!!
>================================================= =======
>"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
>message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
>

DTS from 2000 to 2005

I migrated a DTS package from my 2000 test server to my 2005 test server and
I seem to be lost... The log file shows that everything converted fine,
where will I find that package? PLEASE HELP ME!!!1 THANK YOU>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
In SQL Server Management Studio, in Object Explorer, connect to the
Integration Services. Then chack whether the paclage is registered in the
local msdb database. If it is somewhere on the file system, search for the
*.dtsx files with Windows Explorer.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||Im SSMS click on connect and choose Server Type-- Integration Services
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:ujXNdIX8GHA.1188@.TK2MSFTNGP05.phx.gbl...
>I migrated a DTS package from my 2000 test server to my 2005 test server
>and I seem to be lost... The log file shows that everything converted
>fine, where will I find that package? PLEASE HELP ME!!!1 THANK YOU
>|||something just doesn't seem right here >> I have SQL2000 installed as the
default instance, and 2005 as a named instance, when I register integration
services I only see the server name (which is by default the default
instance) I do not see, and can not find the 2005 named instance. So I
tried to work with that and I registered it and drilled down to the MSDB
container, when I open that container I get this error >>
TITLE: Microsoft SQL Server Management Studio
--
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?Prod...er&LinkId=20476
--
ADDITIONAL INFORMATION:
The SQL server specified in SSIS service configuration is not present or is
not available. This might occur when there is no default instance of SQL
Server on the computer. For more information, see the topic "Configuring the
Integration Services Service" in Server 2005 Books Online.
Client unable to establish connection
Encryption not supported on SQL Server. (MsDtsSrvr)
--
BUTTONS:
OK
--
<< I am just guessing here but is this because I have the wrong SQL server
registered in integration services '
ANYbody have any ideas, pleases... Thank you!!
========================================
================
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
> In SQL Server Management Studio, in Object Explorer, connect to the
> Integration Services. Then chack whether the paclage is registered in the
> local msdb database. If it is somewhere on the file system, search for the
> *.dtsx files with Windows Explorer.
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of
> the sender.
> This message does not imply endorsement from Solid Quality Learning, and
> it does not represent the point of view of Solid Quality Learning or any
> other person, company or institution mentioned in this message
>|||I'm a bit confused but I think your issue is that you are
using a named instances for 2005 and possibly didn't modify
the configuration file as indicated in the Books Online
topic so that SSIS would work with the named instance.
Locate the file MsDtsSrvr.ini.xml in your 2005 installation
path Program Files\Microsoft
SQL Server\90\DTS\Binn
The server name entry for a named instance should be
something along the lines of:
<ServerName>YourServer\YourInstanceName</ServerName>
-Sue
On Tue, 17 Oct 2006 09:39:53 -0500, "WANNABE" <breichenbach
AT istate DOT com> wrote:

>something just doesn't seem right here >> I have SQL2000 installed as the
>default instance, and 2005 as a named instance, when I register integration
>services I only see the server name (which is by default the default
>instance) I do not see, and can not find the 2005 named instance. So I
>tried to work with that and I registered it and drilled down to the MSDB
>container, when I open that container I get this error >>
>TITLE: Microsoft SQL Server Management Studio
>--
>Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
>For help, click:
>http://go.microsoft.com/fwlink?Prod...er&LinkId=20476
>--
>ADDITIONAL INFORMATION:
>The SQL server specified in SSIS service configuration is not present or is
>not available. This might occur when there is no default instance of SQL
>Server on the computer. For more information, see the topic "Configuring th
e
>Integration Services Service" in Server 2005 Books Online.
>Client unable to establish connection
>Encryption not supported on SQL Server. (MsDtsSrvr)
>--
>BUTTONS:
>OK
>--
><< I am just guessing here but is this because I have the wrong SQL server
>registered in integration services '
>ANYbody have any ideas, pleases... Thank you!!
> ========================================
================
>"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
>message news:eJGXbXb8GHA.2128@.TK2MSFTNGP05.phx.gbl...
>

DTS Fixed Field length File Limitations

Hi,
I am trying to upload a fixed field text file to a sqlserver table using the DTS wizard. The txt file has 111 columns and the total length of a single row is 5897. The problem is when I use the wizard to specify the starting and ending of each column, its not allowing me to specify the columns beyond the position 4095.
Is there a limitation on this? if so is there a work around ? to solve this.
Any help on this is truly appreciated.

Thanks much. :)I've never encountered this problem but then I have never had a file quite that wide....

Personally what I would do is write a quick wee app or ActiveX Script to slice the file in half and then do the import in two stages... probably doesn't help much but it's the best suggestion I can give you.

DTS file name to include System Date/Time

We have an application group that wants to pull date from SQL Server and write it to text file on the server. They want the file format to be 12100_YYYMMDDHHMM.fr1 for one set of data, 12100_YYYMMDDHHMM.fr2 for a second set...and so on. The '12100' is fixed, but the rest of the file name will always have to include the system date/time. Is there an easy way to do this within a DTS package (when writing to the output file)?

I would really appreciate help on this. Thank you.Hi

You can set a global variable to the fixed part at the start of the process. This should help http://www.sqldts.com/default.aspx?200 although you want to set a global variable rather than a local one.

John
"steven virnig" <pezguy@.mn.rr.com> wrote in message news:o1ovd.114089$ye4.34831@.twister.rdc-kc.rr.com...
We have an application group that wants to pull date from SQL Server and write it to text file on the server. They want the file format to be 12100_YYYMMDDHHMM.fr1 for one set of data, 12100_YYYMMDDHHMM.fr2 for a second set...and so on. The '12100' is fixed, but the rest of the file name will always have to include the system date/time. Is there an easy way to do this within a DTS package (when writing to the output file)?

I would really appreciate help on this. Thank you.

DTS File Created After Stored Proc executed now what?

I'm trying to fire a DTS package through a stored procedure.

After running my one stored procedure I got my DTS file to create just fine. However after this point I'm stuck...I can't do anything else with this file and I need to update data with it.

How would I use the DTS file to update my data.

Thanks,

RB

RB,

There is no direct way to do this via a SP. In my experience, I've seen three ways to work around this:

1) Use xp_cmdshell. This simply executes a command in the command shell. Usefull if you already have a batch script running your DTS.

2) Use OLE. You can create and work with Com objects via the sp_OA* methods. You will need to create the DTS objects and run properties from them.

3) Use a scheduled Job. Saw this recently, the idea is to create a new scheduled job that runs your DTS, then run the job, then delete the scheduled job.

None are pretty, but they all work.

-- Alex

DTS file

I find some .DTS file and I want to know what it is doing , but I don't
know how to open them, any one know how to do this? thanks a lotAnswered in .dts. Please do not multipost.
--
Jacco Schalkwijk
SQL Server MVP
"Catelin Wang" <Catelin Wang@.discussions.microsoft.com> wrote in message
news:50232336-1890-42F8-9139-348BEFB871CD@.microsoft.com...
>I find some .DTS file and I want to know what it is doing , but I don't
> know how to open them, any one know how to do this? thanks a lotsql

Tuesday, March 27, 2012

DTS Fails as JOB

Hi Freinds,
SQL 2000
I have a DTS where reads a file from other server:
\\server2\uploads\tree.csv
When I'm inside the DTS and running it, then everything is fine. Even if I
right click on DTS and run , works fine.
The problem comes when I schedule the DTS as a job. JOB Fails : INVALID PATH
for \\server\.....
Is this a security issue? How can I solve it
Thanks in advance,
Patrick
Patrick
2 things. First make sure that the scheduled task is running either as SA or the Domain ID that the SQL Server is running under.
2 make sure that the ID that SQL is running as has access to the directory in question.
Jeff
MCDBA, MCSE+I
|||Also make sure that the SQL Agent Windows Service is configured to run under
the context of a domain user account. If it's configured to run under
LocalSystem context, the service can't see any network addresses.
Regards,
Greg Linwood
SQL Server MVP
"Patrick" <pashour@.mail.all-in-1.com> wrote in message
news:OYEQ4DxIEHA.3556@.TK2MSFTNGP10.phx.gbl...
> Hi Freinds,
> SQL 2000
> I have a DTS where reads a file from other server:
> \\server2\uploads\tree.csv
> When I'm inside the DTS and running it, then everything is fine. Even if I
> right click on DTS and run , works fine.
> The problem comes when I schedule the DTS as a job. JOB Fails : INVALID
PATH
> for \\server\.....
> Is this a security issue? How can I solve it
> Thanks in advance,
> Patrick
>

DTS Fails as JOB

Hi Freinds,
SQL 2000
I have a DTS where reads a file from other server:
\\server2\uploads\tree.csv
When I'm inside the DTS and running it, then everything is fine. Even if I
right click on DTS and run , works fine.
The problem comes when I schedule the DTS as a job. JOB Fails : INVALID PATH
for \\server\.....
Is this a security issue? How can I solve it
Thanks in advance,
PatrickPatrick
2 things. First make sure that the scheduled task is running either as SA o
r the Domain ID that the SQL Server is running under.
2 make sure that the ID that SQL is running as has access to the directory i
n question.
Jeff
MCDBA, MCSE+I|||Also make sure that the SQL Agent Windows Service is configured to run under
the context of a domain user account. If it's configured to run under
LocalSystem context, the service can't see any network addresses.
Regards,
Greg Linwood
SQL Server MVP
"Patrick" <pashour@.mail.all-in-1.com> wrote in message
news:OYEQ4DxIEHA.3556@.TK2MSFTNGP10.phx.gbl...
> Hi Freinds,
> SQL 2000
> I have a DTS where reads a file from other server:
> \\server2\uploads\tree.csv
> When I'm inside the DTS and running it, then everything is fine. Even if I
> right click on DTS and run , works fine.
> The problem comes when I schedule the DTS as a job. JOB Fails : INVALID
PATH
> for \\server\.....
> Is this a security issue? How can I solve it
> Thanks in advance,
> Patrick
>sql

DTS Fails as JOB

Hi Freinds,
SQL 2000
I have a DTS where reads a file from other server:
\\server2\uploads\tree.csv
When I'm inside the DTS and running it, then everything is fine. Even if I
right click on DTS and run , works fine.
The problem comes when I schedule the DTS as a job. JOB Fails : INVALID PATH
for \\server\.....
Is this a security issue? How can I solve it
Thanks in advance,
PatrickPatric
2 things. First make sure that the scheduled task is running either as SA or the Domain ID that the SQL Server is running under
2 make sure that the ID that SQL is running as has access to the directory in question
Jef
MCDBA, MCSE+I|||Also make sure that the SQL Agent Windows Service is configured to run under
the context of a domain user account. If it's configured to run under
LocalSystem context, the service can't see any network addresses.
Regards,
Greg Linwood
SQL Server MVP
"Patrick" <pashour@.mail.all-in-1.com> wrote in message
news:OYEQ4DxIEHA.3556@.TK2MSFTNGP10.phx.gbl...
> Hi Freinds,
> SQL 2000
> I have a DTS where reads a file from other server:
> \\server2\uploads\tree.csv
> When I'm inside the DTS and running it, then everything is fine. Even if I
> right click on DTS and run , works fine.
> The problem comes when I schedule the DTS as a job. JOB Fails : INVALID
PATH
> for \\server\.....
> Is this a security issue? How can I solve it
> Thanks in advance,
> Patrick
>

DTS Export to TEXT File

Okay,

Here the issue...

I am exporting a table to a text file using DTS. Such an easy task.

This process I had in place worked, then I added a new column to the table. So I had to remap the destination and source column. When I try to do this Enterprise Manager just gives me some type of mme.exe error that relates to memory and closes.

This column made column number 22. Everytime I do this to any table with 21 columns or less it works fine, tried to do this against some tables with 22 or more and ran into the same problem.

I searched Microsoft and did not find this as a limitation. So does anyone have some insight.

Thanks for you assistance.http://support.microsoft.com/default.aspx?scid=KB;EN-US;814113

DTS Export format, please help

I have a table (tblstudent) with four fields, Fname, Lname, City, Zip.
I want to run a DTS export nightly that export the records out to a file.
The kick is that I would like the text file to list the fields on their own
line like:
Fname
Lname
City
Zip
Instead of across like: Fname, Lname, City, Zip.
How can I accomplish this?
Thanks for your time!
TonyHopefully this will solve your issue. write the code in Axtivex script in DT
S.
========================================
=========
'***************************************
*********************
' Visual Basic ActiveX Script
'***************************************
*********************
Function Main()
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "sqloledb"
Conn.Properties("Data Source").Value = "(local)"
Conn.Properties("Initial Catalog").Value = "Testing"
Conn.Properties("Integrated Security").Value = "SSPI"
Conn.CommandTimeout = 0
Conn.Open
'--get students record set
SqlQuery ="select * from tblStudent"
Set RsStudent = Conn.Execute(SQLQuery)
'--ourt vars
ourputString = ""
Path = "C:\test\"
'-- create output folder
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FolderExists(path) Then
objFSO.CreateFolder (path)
End If
'--Create Traget file
Set TargetFile = objFSO.CreateTextFile(Path &"Report.txt", True)
IF not RsStudent.eof Then
While not RsStudent.eof
ourputString=""
ourputString="Fisrt Name: " & RsStudent("FName") & vbcrlf & _
"Last Name:" & RsStudent("Lname") & vbcrlf & _
"City :" & RsStudent("City") & vbcrlf & _
"Zip :" & RsStudent("Zip") & vbcrlf & _
"----
--" & vbcrlf
TargetFile.WriteLine(ourputString)
RsStudent.moveNext
Wend
End If
Set TargetFile=Nothing
Set objFSO=Nothing
Set RsList =Nothing
Conn.close
set conn = nothing
Main = DTSTaskExecResult_Success
End Function
========================================
=========
"tony tuso" wrote:

> I have a table (tblstudent) with four fields, Fname, Lname, City, Zip.
> I want to run a DTS export nightly that export the records out to a file.
> The kick is that I would like the text file to list the fields on their ow
n
> line like:
> Fname
> Lname
> City
> Zip
> Instead of across like: Fname, Lname, City, Zip.
> How can I accomplish this?
> Thanks for your time!
> Tony
>
>

DTS Export Data Pump appending file

Hi!!
I've a "little" problem...
I must generate a txt file with this structure:

- one header
- n details

Header and details have different structure and i must write header before details.. I've already a table with details.. i could create table for header, but this table design it's too different than details design.. and i can't use the union statement in the output query..
Can i write the header line and write details in append on a txt file??
with data pump i can create and replace file.. but not append??
I know that i could use the filesystem object to modify the file, but i would bypass it with tasks of SQL server..
it's possible?

Thanks!!!

PS: I hope that you understand my problems..
I know poor english.. ;-)Why not post your DDL and DML...

Check out

SELECT Data_Row FROM (
SELECT '"Owner","Job"' As Data_Row, 1 AS Row_Group
UNION ALL
SELECT '"' + l.Name+ '","' + j.Name + '"', 2 AS Row_Group
FROM msdb..sysjobs j
INNER JOIN master..syslogins l
ON l.sid = j.owner_sid
) AS XXX
ORDER BY Row_Group|||thanks..
i've already done in that mode... ;-)sql

Dts Export

I am trying to export all the records from 6 different tables from sql server to a text file using the DTS wizard. I want all the info of the first table to appear first, then all the info of the second table, etc.
Any ideas on how to do this type of query?
thanks in advance.Quote
"I am trying to export all the registries from 6 different tables"

what do you mean by registries?|||I think I made the wrong translation...

I ment all the data in each table|||How about
Select 1 as 'Sort' , T1.* from table1 T1
Union
Select 2 as 'Sort' , T2.* from table1 T2
.
.
.
.

order by sort

??|||I get the following error trying to use the UNION operator:

"All queries in an SQL statement containing a UNION operator must have an equal number of expressions in their target lists."

The number and the order of the columns are not identical in all queries...

Sunday, March 25, 2012

DTS excution error from ASP Page

Hi,
I have to execute the DTS package from ASP file.
But the following line throws error
Set oPkg = Server.CreateObject("DTS.Package")
Error type:
Server object, ASP 0177 (0x800401F3)
Invalid ProgID.
Does anybody know the solution?
Thanks,
Mamatha
--
Message posted via http://www.sqlmonster.comHi
At a guess you need the DTS redistributables on the web server. This method
seems to be a better one:
http://www.sqldts.com/default.aspx?207,2
Alteratively you may want to run it through a stored procedure.
John
"Mamatha MD via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:7aefeb75208d4814b21443be6e91a5dd@.SQLMonster.com...
> Hi,
> I have to execute the DTS package from ASP file.
> But the following line throws error
> Set oPkg = Server.CreateObject("DTS.Package")
> Error type:
> Server object, ASP 0177 (0x800401F3)
> Invalid ProgID.
> Does anybody know the solution?
> Thanks,
> Mamatha
> --
> Message posted via http://www.sqlmonster.com

DTS- excel option missing

I am a senior DBA using SQL Server 2000.

I just did a clean install of SQL 2000 Personal edition. I am trying to DTS an excel file in but the excel icon is not there!!!!! There are the other excel ODBC sources but they each require me to setup a DSN (not normal!!!)

Anyone had this problem before? I am uninstalling and reinstalling.

-KevinI don't understand...DTS in or out?

Are you using the wizard?

When open the menu option connection, what do you see?|||I am trying to import with DTS.
When I choose the "source" drop down list I am expecting to see a little excel icon with Excel 97-2000 next to it.

I see a bunch of data direct closed icons and the excel treiber , and the WINSQL excel workbook. All of those options require me to define a DSN.

The normal excel option just lets you choose the excel file.

?!?!?!?!?|||So you're in EM and you right click on DTS and SELECT

>>ALL Tasks >>IMPORT DATA...

Then you use the wizard and change the data source drop down...

and you don't see the teal "X" for Excel?

It's half way down the list...

What if you try to build one from scratch?|||No luck.

I am going to try to do it with Informatica.
I applied mdac 2.8 and SP3a.|||Do you have excel installed on the local machine?|||Yes. Thanks for your help. I found another work-around using Erwin instead of SQL Server.
Thanks anyway.

-Kevinsql