Importng files into SQL

I dont know I have gotten these from the internet forums but non of them successfully import file into SQL.

dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /decrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\;2;1234



dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /DestServer PCSQDWSSIS SQL;\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad;

DTUtil /QUIET /FILE "\\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx" /Encrypt SQL;"DWH\TEST\IS_DWH_ClaimReductionsLoad";0 /DestS PCSQDWSSIS


dtutil /QUIET /FILE "\\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx" /DestServer PCSQDWSSIS /Copy DTS;"\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx" /Encrypt SQL;"DWH\TEST\IS_DWH_ClaimReductionsLoad"

Open in new window


Errors

Argument "SQL" for option "encrypt" is not valid.
The term 'PCSQDWSSIS\DWH\TEST\' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:191
+ dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH
_ClaimReductionsLoad.dtsx /decrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\ <<<< ;2;1234
    + CategoryInfo          : ObjectNotFound: (PCSQDWSSIS\DWH\TEST\:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

2
1234
PS Microsoft.PowerShell.Core\FileSystem::\\pcna-02\mydocs\ltorres\My Documents\SSIS_Migration> dtutil /QUIET /FILE \\pcn
a-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /d
ecrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\;2;1234
Microsoft (R) SQL Server SSIS Package Utilities
Version 10.50.4000.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Argument "SQL" for option "encrypt" is not valid.
The term 'PCSQDWSSIS\DWH\TEST\' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:191
+ dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH
_ClaimReductionsLoad.dtsx /decrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\ <<<< ;2;1234
    + CategoryInfo          : ObjectNotFound: (PCSQDWSSIS\DWH\TEST\:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

2
1234
PS Microsoft.PowerShell.Core\FileSystem::\\pcna-02\mydocs\ltorres\My Documents\SSIS_Migration> dtutil /QUIET /FILE \\pcn
a-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /d
ecrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\;2;1234
Microsoft (R) SQL Server SSIS Package Utilities
Version 10.50.4000.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Argument "SQL" for option "encrypt" is not valid.
The term 'PCSQDWSSIS\DWH\TEST\' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:191
+ dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH
_ClaimReductionsLoad.dtsx /decrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\ <<<< ;2;1234
    + CategoryInfo          : ObjectNotFound: (PCSQDWSSIS\DWH\TEST\:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

2
1234
PS Microsoft.PowerShell.Core\FileSystem::\\pcna-02\mydocs\ltorres\My Documents\SSIS_Migration> dtutil /QUIET /FILE \\pcn
a-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /d
ecrypt 1234 /encrypt SQL;PCSQDWSSIS\DWH\TEST\;2;1234

Open in new window

LVL 8
Leo TorresSQL DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>import file into SQL.
Without looking at the code you've posted (sorry, not my language), define 'file'.

In SSMS you should be able to...
(1)  Right-click on any database, select Tasks..., then select Import Data...SSMS Import Data(2)  Follow the prompts to define your data source (aka import file), then destination (aka table).  Then execute the wizard, and if you want it'll save it as an SSIS package.

If you wish to do anything custom, you'll need SSIS to edit the above-created package, or to create a new one.
0
Anthony PerkinsCommented:
Andy reason you are using dtutil ?  Do you understand that app is for managing SSIS packages and not for actually importing the data?  In order to import data you use the dtexec command line application.
0
Mark WillsTopic AdvisorCommented:
Seems that DTSX packages have already been created. The package name is IS_DWH_ClaimReductionsLoad.dtsx

Can you run that package via BIDS ?

acperkins is right, if you want to "manage" a dtsx package, then use dtutil. If you want to "execute" then use dtexec.

So, what are your trying to do ? Are you moving packages, or, wanting them to run ?

Note also you seem to be using the 64 bit version and there can be some challenges with mixing up 32 bit and 64 bit. So best to always use the full path...

Would be worthwhile reading through the manual for dtutil, your syntax doesn't seem too bad for cmd : http://technet.microsoft.com/en-us/library/ms162820.aspx 

And same again for the dtexec : http://technet.microsoft.com/en-us/library/hh231187.aspx

There is also the interactive dtexec called dtexecUI : http://technet.microsoft.com/en-us/library/ms180378.aspx and this is where the main confusion for 32 bit and 64 bit stems from because the UI is only 32 bit... It is the same utility if run from the Integration Services node in SQL Server Management Studio.

Anyway if you could clarify exactly what you are trying to do, we should be able to help a bit more...
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Brendt HessSenior DBACommented:
Your command lines above seem to be for differing conditions.  Nonetheless, after testing, I had success with importing the .dtsx file into the MSDB repository with a command like this:

dtutil /QUIET /FILE \\pcna-02\InformationTechnologyServices\PackageMigration\SSISPackages1\PCSQDWSSIS\DWH\TEST\IS_DWH_ClaimReductionsLoad.dtsx /decrypt 1234 /encrypt SQL;\DWH\TEST\;2;1234 /DestS PCSQDWSSIS

Open in new window

Note, however, that these commands assume that the folder \DWH\TEST\ already exists in the destination server.  If it does not, then you will need to create the folder, either manually through SSMS, or via additional dtutil commands (and, if needed, error checking).  Assuming that neither of the specified folders exist, you can use these commands to set them up:

dtutil /FC SQL;\;"DWH" /sources PCSQDWSSIS
dtutil /FC SQL;\DWH;"TEST" /sources PCSQDWSSIS

Open in new window

After these folders exist, you should be able to import the package.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brendt HessSenior DBACommented:
Also note that the Decrypt command seems to not be mandatory if you are re-encrypting with the same password inside of the server.  Excluding the /decrypt switch worked for me.
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
So, how's it going?  Five good expert comments here, do you have a response?
0
Leo TorresSQL DeveloperAuthor Commented:
Sorry for the delay guys. The reason we are using Dutil command line was because there is a script generating command for 300 packages to different locations. I found out Why I was having this issue the reason was Powershell does not like the syntax once I ran the same command in a cmd window it worked without a hitch.
0
Leo TorresSQL DeveloperAuthor Commented:
Thank for all the great Help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.