Running Access Macro from SSIS
Project deployment to test and production
Hi!
We have the development and test server on one domain and the production server on different domain. I am not allowed to create thrust between the domains.
I create a .ispac file that is deployed to the test server with protectionLevel for the project set to EncryptSensitiveWithPassword. When testing is finished I want to get the project in to production. My prefered method would be to go to the production server right click the folder Integration Services Catalogs --> SSISDB--> Projects, chose Deploy Project and then chose Integration Services catalog in the wizard to connect directly to the test server and get the project.
But it seems this is impossible because of the different domains.
My next solution was to open the test server right click the folder Integration Services Catalogs --> SSISDB--> Projects--> <name of project>, chose Export and export the project to an .ispac file. Then copy the file from the test server to production and then deploy the package on the production server. But it seems that when I export the file on the test server the project is automaticly encrypted with the user key belonging to the user exporting the data, so when I copy the file to the production domain the user is different and I get an error that all the nodes could not be decrypted. Is it easy/possible to change the protectionLevel and set a password for all files in an ispac file so I can use this method to deploy?
My last choice is to deploy the same .ispac file as was deployed to test. This works fine, but is not preferred.
SSIS Oracle Char DataType Client?
Kim B.
SSIS Package - Running Status
Logging Maintenance Cleanup Task
I have an SSIS project setup which creates my new backups, and ends with a Maintenance Cleanup Task which removes backups older than 3 days old. What I'd like to see in my logs are the files being deleted in that last task. Since this task executes a single T-SQL "xp_delete" command, as opposed to a looping structure within SSIS, is there a way that I can get the names of the files deleted into even my SQL Server logs, where I could access that information via xp_readerrorlog? I don't have to have these go to the Windows Event logs (since they can't, as currently designed).
--=Chuck
how are you cleaning up SSISDB?
Anyone else finding that cleaning up SSISDB using the Agent job "SSIS Server Maintenance Job" is a very slow and near impossible task?
EDIT: Let let qualify that a bit... there is a clean up retention window that you can set on the SSIS catalog. This rentention window get used by the cleanup job to figure out how much to delete with each run. The default seems to have been set at 365 days. I have about 80 days built up so far which is about how long I've been using SSIS 2012. And in some days I can have 1000's of executions. And when I try to delete one day's worth of stuff, it seems like it will take a while.
Updating a table with billion rows
svk
Pass parameters to SSIS Execute Process Task
Hi, Got a powershell script to split a large XML file to split in smaller chunks. I have Execute ProcessTask in SSIS with:
Executable: %windir%\system32\WindowsPowerShell\v1.0\powershell.exe
argument: -ExecutionPolicy ByPass -command ". 'C:\Workspaces\SplitToytPMFile.ps1'"
I need to pass File Name as parameter to the PS script. I tried using the StandardInputVariable but it doesn't work.
Issue when deploying a SSIS package from Local Machine to domain
There is an SSIS package on a laptop which is not in a domain. I am trying to use SQL authentication to get connected from my laptop to the server and debug the package. It runs fine. When i try to deploy it to a server in a domain it is not recognizing
the server. So i was not able to deploy the SSIS package.
I am getting the below mentioned Error Message.
Failed to connect to server. Microsoft sqlserver.ConnectionInfo)
Login failed. The login is from an untrusted domain and cannot be used with windows authentication. (Microsoft sql Server,Error :18452)
Destination server:
SQL Server 2012 Enterprise edition 64 bit version 11.0.2100.60)
Windows and SQL Server Authentication
Named Instance
SQL Server Browser is started and is setup to running , automatic
all services are running. Protocols are enabled. The service accounts are nt service accounts. They are not domain user accounts.
Source server:
SQL Server 2012 Enterprise edition 64 bit version 11.0.2100.60)
The sys admins may not honor the request to keep the server and the latop in a same domain.
If they are in the same domain there would not be a problem.
Am i missing any checks. I checked the SQL Server logs and Windows Application Logs.
I was able to deploy the package using ISDeploymentWizard.exe on the destination server. There is a flat file which is used as a source in the package. when the package is deployed on the destination server there are problems when connecting to that file. As a result the deployed package is failing.
Can you help me please.
Thank You
Using a Parameter in SQL Command
Hi,
I have a Data Flow task Within a for loop Container.. the for loop container receives the result of sql query , iterates over the result set and passes each variable to the OLE DB Source.. Now based on the parameter passed I need to execute a query.. say for example if the parameter passed is P1 execute SQL S1 , P2 then S2 & so on.. How do I use the Parameter passed in SQL Query?
Compress multiple .bak files to .zip
Hello,
1. SQL 2008 R2
2. Maintenance Plan -
a. Daily, Weekly, Monthly schedule
b. Full Back Up - All Database, To Disk, for every database and Disk:\Directory\SubDirectory\*.bak Compress backup
3. SQL Agent Job
a. Runs the Sub_Plan's at scheduled time I've allocated for each Maintenance Plan.
4. These creates Multiple .bak for all database's that list in the directory.
How can I zip them into a compressed Directory.
Thanks for your help!!
Warm Regards, Richard
Unable to connect to a Web page from SSIS (SQL Server)
Alright! After a lot of research on web, I couldn't find any of the solution working for me. I am trying to connect to a Web page from SSIS and I've tried both http connection manager and a Script Task but none of them seems to be working.
I get the following errors:
Through Script Component:Exception has been thrown by the target of an invocation.
Through http connection manager:The remote server returned an error: (503) Server Unavailable.
Here is one of the VB code I've tried:
Public Sub Main() Dim MyWebClient As New System.Net.WebClient() Dim proxyObject As New System.Net.WebProxy("BANANA:8080", True) MyWebClient.Proxy = proxyObject MyWebClient.Proxy.Credentials = CredentialCache.DefaultCredentials Dim remoteURi As String remoteURi = "http://www.fhfa.gov/DataTools/Downloads/Pages/Conforming-Loan-Limits.aspx" Dim filename As String filename = "C:\LoanLimits.html" MyWebClient.DownloadFile(remoteURi, filename) End Sub
And, here is one of the C# codes I've tried:
public void Main() { Variables varCollection = null; Dts.VariableDispenser.LockForRead("User::RemoteUri"); Dts.VariableDispenser.LockForRead("User::LocalFolder"); Dts.VariableDispenser.GetVariables(ref varCollection); varCollection.Unlock(); System.Net.WebClient myWebClient = new System.Net.WebClient(); string webResource = varCollection["User::RemoteUri"].Value.ToString(); string fileName = varCollection["User::LocalFolder"].Value.ToString() + webResource.Substring(webResource.LastIndexOf('/') + 1); myWebClient.DownloadFile(webResource, fileName); Dts.TaskResult = (int)ScriptResults.Success; }
I could open the same web page mentioned in the code manually in all my browsers (IE, Firefox, Chrome).
FYI, I am using SQL Server 2014. Please let me know if you need any other information that I can give you to help me.
Thanks,
Bangaaram
Known is a DROP, Unknown is an OCEAN.
How to create script for deploying SSIS package using sp_ssis_putpackage
Hello All ,
I am new to this Topic. I want to deploy SSIS package through wix Setup and for that I Need to create a script which deploys ssis package using sp_ssis_putpackage. There are many Parameters (rather all) and I dont know which values to pass and where can I find values for those. I tried to find out but it seems there is very less documentation about this.
exec msdb..sp_ssis_putpackage
@name = N'Package 0900',
@id = ?
@description = N'SSIS package',
@createdate = N'20150930',
@folderid = ?
@packageformat = 0,
@packagetype = 5
@vermajor = 1,
@verminor = 0,
@verbuild = 0,
@vercomments = N'',
@verid = ?
@packagedata = ?
Combining Duplicate Data
Hello All,
Please help...I have two tables that I UNION to retrieve data for users. A combination of these should have only one employee in the table. The problem is there is a unique id created for the position of instructors. In the other table, it holds all employees with an employee number. Some data such as username, email address, etc., does not change. So even though UNION should remove duplicates, I still have duplicates because of usernames is what I'm filtering on, it is the same in each table. In the combined table I'm only selecting specific employees based on Job class and Job code. For employee id in the first table it is preceeded with 'B', and the second by 'T' (this is only to identify which table the data is taken from). Here is what I am getting when I Union both tables.
Thank you in advance for any assistance and consideration given!
--------------------------query
SELECTdistinct'B-'+ Employee_ID as Employee_ID
, Username
,Last_Name
,First_Name
From InstructorsOffCampus
UNION
SELECTdistinct'T-'+ Employee_ID as Employee_ID
, Username
,Last_Name
,First_Name
From EmployeesAll
--------------------------------Results below
T-23456 | haynesistr | haynesistr@abcdefg | Haynes | Sister |
B-12345 | haynesistr | haynesistr@abcdefg | Haynes | Sister |
T-78910 | johnsoncolecr | johnsoncolecr@abcdefg | Johnson | Colebear |
B-45678 | johnsoncolecr | johnsoncolecr@abcdefg | Johnson | Colebear |
T-24681 | lowellpm | lowellpm@abcdefg | Lowell | People |
B-13579 | lowellpm | lowellpm@abcdefg | Lowell | People |
SSIS 2008R2 Configurations Conundrum
Hi
An age - old question I know, but I'm trying to help a client currently with a historic set up overcome a limitation, and at the moment I can't think past the brick walls - perhaps because there isn't a way around it.
The current configuration set up, for many SSIS packages that ideally should not be changed, follows the pattern of
1) Load a Connection manager's connection string from an environment variable
2) Use that connection to fetch various settings and connections from a SQL Server table
The dev hardware architecture currently shares few app servers (SSIS) between many database servers. As a result, using one app server requires the use of several service accounts, each with it's own user environment variable to separate the configurations
being picked up for step 1) above allowing simultaneous executions to take place.
Ideally, without changing the packages in any way, we want to allow the passing in of the connection string at runtime (from the job engine) to avoid having to use environment variables at all. This we have achieved easily enough by removing the environment
variable and passing in a command line /CONN in the DTEXEC command. Since the environment variable is not found, it is not used (just produces a warning) and the /CONN value is used. The application order of configurations does not have a negative
affect since the design time re-load at the final phase again does not find a env variable, so does nothing to override that passed in by /CONN. /SET would behave similar in this respect, and overall we have achieved the effect of removing the env variable
reference without having to touch any packages.
The issue arises when using this technique in the OAT environment, where the OAT service account does not have permissions to the connection strings as saved in the package at design time. Therefore:
1) Phase 1 loads the design time env variable (no longer exists, nothing is changed). Then attempts to apply the settings from the SQL table using the saved dev connections (gets permissions error)
2) Phase 2 loads the /CONN value, succeeds
3) Phase 3 changes nothing as the env variable doesn't exist, and re-uses the /CONN setting. All good.
The package then runs it's tasks successfully, but returns an overall failure result to the job engine due to the permissions error generated during phase 1. Adding the env variable back of course does not help unless it is correct (defeating the object). We can't use a "generic" config here either as ultimately it is the one that gets applied in phase 3.
Any ideas on how this can be worked around, without modifying the many packages (or granting permissions on Dev servers to OAT accounts). Unfortunately the SuppressConfigurationWarnings package property does not help with errors - but if there was a way just to ignore config errors this might be acceptable.
Thanks for any help!
Additional option in the Lookup "Fail component on matching records"
Hi,
This is a question from: Vino Kannan
=========================================================
I have an Excel file which contains some data. I want to load that into a SQL server Table. Here are my conditions :
1. If the table doesn't have any matching records from the Excel file, then my DFT should load the data from that Excel to the Dest Table.
2. If the table has even one or more matching records, then the DFT should not process at all, instead I should send an email to the business stating that there are some matching records and hence the package is not process...ed.
P.S. If i use Lookup, I have two matching and non-matching output. which will process the non matching records into the table and matching can be redirected to any flat/Excel file. But i don't want to do this. I just want to lookup the Sql Server table and excel.
It'll be good if there is an additional option in the Lookup "Fail component on matching records". - I understand there is no any option like this. But please let me know if there is any alternative opion to do this.
============================================================
Full thread can be found here.
Thanks!
Debarchan Sarkar - MSFT ( This posting is provided AS IS with no warranties, and confers no rights.)
Plz Help Me - How to convert .txt (Pipe delimited) to excel and csv(comma delimited ) in SSIS
Hi,
I have created SSIS package where it generates .txt output file. But my client added new requirement that generated .txt has to be convert into excel or CSV (Depends on client selection on portal where it stores values in table to know in which format they requires).
Please help me how to do that?
thanks in advance.
HarSan
Best way to process/manipulate a large number of records without writing to disk... and only process in memory
I want to import several text files, process them at once and generate several output files depending on the results. I can't store the data anywhere in the interim, processing needs to be done solely in memory. It seems that a recordset destination should be used to concatenate the data while running through my for loop. My issue is that the recordset destination then is processed one record at a time. Is there a better way to consolidate data and process in memory without the recordset destination that would be faster?
Thanks in advance!
SSIS Package with SharePoint Doesn't Execute In Agent Job (Fine when ran manually from SSIS Store)
So I've created a neat SSIS package which essentially reads a SharePoint 2010 list, moves the data into a 'Delete' list, (thus deleting the contents), then populates the list with fresh data pulled from a SQL Database.
It works in Visual Studio just fine, it works if I'm logged into Integration Services and run the package manually fine, but when I place it into a SQL job I get nothing.
At first I thought maybe it was that I didn't install the SharePoint destination connection manager thing on the server, so I did, only quickly then realizing that if that was the cause, running the package manually from SSIS would have failed.
Then I figured it was the account it was being executed under (SSIS Service Account), so I created a proxy (SharePoint Admin) and added the credential, still no go. Then I added my own credentials, just to be sure, and still no go.
The job doesn't fail either, it just sits there spinning and spinning. I'm stumped.
The server can run the job, I've seen it do it. Any ideas why SQL agent has a difficult time with it? Even when running under the context of my own account?
Excel shared path connection issue
Dear All,
I am having issue in running a ssis package which connects to an excel file from shared location.
It works fine on the machine of the person who has developed it as he has access to that shared drive.
After deploying the ssis package to SSISDB and creating a proxy account with the developer's credential, and running the ssis package using the proxy under SQL Agent Jobs, it is failing with error :
Load XXXXXXXXXX :Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "XXXXXXXXXX.xlsx" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
XXXXXXXXXX:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "Failure creating file.".
Anky