Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

Deploy SSIS 2012 projects to IS catalog using T-SQL

$
0
0

Hi All,

I have couple of SSIS 2012 projects having protection level set to encrypt sensitive with password. I have used the inbuilt stored procedure catalog.deploy_project sp to deploy the project  to IS catalog. Now, when a SQL agent job is build on top of this package, it errors out saying "Failed to decrypt an encrypted XML node because the password was not specified or not correct. Package load will attempt to continue without the encrypted information."

http://msdn.microsoft.com/en-us/library/ff878004.aspx  Remarks on this page: During a project deployment or update, the stored procedure does not check the protection level of individual packages in the project.

If I use the deployment wizard to deploy the package to the IS catalog, and create a job on top of it, it works fine. It is so becuase wizard prompts me to enter the project password while deploying.


Thanks, hsbal


Executing commands on MS Access connection in Script Component

$
0
0

Hi,

My scenario is this:

I have a set of SQL commands coming from an OLE Source (bunch of records where each record is a SQL command).
These commands are received by a Script Component (within a Data Flow), which parses them and then needs to execute them on an MS Access file. The commands have a chance to fail, and I need to be able to log these errors but not fail the whole process (the process should continue to the next command even if the previous command failed).
Any errors that occurred will be added to an Error Output and inserted in a log table.

Here's the snippet from my Script Component:

if (m_conn == null)
{
    m_connMgr = this.Connections.Connection;
    m_conn = (IDbConnection)m_connMgr.AcquireConnection(null);
}

if (m_conn.State != ConnectionState.Open)
    m_conn.Open();

try
{
    using (IDbCommand cmd = m_conn.CreateCommand())
    {
        cmd.CommandText = newCommand.ToString();

        ComponentMetaData.FireInformation(0, Variables.TaskName, "Executing...", "", 0, ref fireAgain);
        int rows = cmd.ExecuteNonQuery();
        ComponentMetaData.FireProgress(rows.ToString() + " row(s) affected.", 0, 0, 0, Variables.TaskName, ref fireAgain);
    }
}
catch (Exception e1)
{
    ComponentMetaData.FireProgress("Error Running Command: " + e1.Message, 0, 0, 0, Variables.TaskName, ref fireAgain);

    ErrorOutputBuffer.AddRow();
    ErrorOutputBuffer.COMMAND = newCommand.ToString();
    ErrorOutputBuffer.MESSAGE = e1.Message;
    ErrorOutputBuffer.TIMESTAMP = DateTime.Now;
}

My MSAccess data source is OLEDB Provider "Microsoft Office 12.0 Access Database Engine".

When the script tries to connect to the Access file, the following exception occurs:

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'System.Data.IDbConnection'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9BB226F4-2AF3-37E7-B91D-3BB936FC0A7E}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I also tried using a .NET provider for OLEDB, but then received the error message when trying to connect:

System.Data.OleDb.OleDbException: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.     at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)

As you can see from the script, I'm using the IDbConnection interface because I had the same error with the OleDbConnection class, so I thought maybe I'd use the most generic interface possible (but it didn't help).
Also, obviously I'm the only one accessing the file so it shouldn't be open by another user.
I don't know how to proceed. Any help would be appreciated.

Thanks,

Eitan


Eitan Blumin; SQL Server Consultant - Madeira SQL Server Services; http://www.madeira.co.il/author/eitan/

SQL Server Agent - Email on job failure

$
0
0
Hi,

I have a SSIS package that is scheduled to run every midnight. Is there a way to send an email to a particular user when the package fails to run? I know there is a Notification on the package, I tried once but it didn't send anything. Is there an article that explains the step by step process? 

Thanks!

Akshay Adivarekar


Derived column syntax help needed

$
0
0
I am struggling getting the following case statement into the derived column format in SSIS




CASE 
WHEN SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(Data AS VARCHAR(9)), 4, 6) IS NULL
THEN 0
ELSE RTRIM(SUBSTRING(REPLICATE('0', 9 - LEN(Data)) + CAST(Data AS VARCHAR(9)), 4, 6))
END

Here are examples for the data in Data
row 1 - 1201303
row 2 - 123456789
row 3 - null
row 4 - 12345678
the first row result would be 201303
row 2 result would be 456789
row 3 result would be 0
row 4 result would be 345678

Andre Toerien

Opening BIDS causes disk queue length to shoot up

$
0
0

Hi,

I have a SSIS package and I noticed that when I open it in Visual Studio the Avg Disk Queue Read Length briefly shoots up on both my data and tempdb drives. Is there a potential issue here or how would I investigate this?Cheers

Paul

partitions are created dynamic ssis packages.

$
0
0

HI.

 iam creating  dynamic partitions in ssis packages  . but  i got  have  below type of error . i have 3 data sources  .iam creating packages  daywise 

As per 1st data source on 15 th jan the starting data is 126058, but the data should be 12098.Due to which the rest of the data in other following partitions is getting affected.

As per 2nd data source on 15<sup>th</sup> jan the starting data is 296815, but the data should be 296785 which is exceeding by 30 records. Due to this reason the rest of the data in other following partitions is also getting affected.

As per 3rd  data source on 15th jan  the starting data is 957751, but the data should be 956690 which is

Exceeding by 1061 records. Due to this reason the rest of the data in other following partitions is getting affected.

 how can solve this problems   . please help me..

 

 

SSIS - ODBC Parameter Size

$
0
0

I have created a SSIS package which runs every hour from my Machine. First part of my Package runs a Execute SQl Task and result set (single row, single column) is a comma separated list of Unique Record Ids which have been updated in last hour. (i.e. FJ1,FJ2,FJ3) I capture this result in a variable and when I User script taks to display the value of this property, it appears as it should be.

I pass this Variable to Execute SQL Task on Different ODBC Server using a Stored Procedure

My SQL Statement is as Following

call DeleteRowsById(?)

And then I have assigned my Variable (as SQL_Longvarchar) to Parameter 1 in Parameter mapping Section. (ParameterSize is -1) but it doesnt delete the records from the table. (I ran the SP manually in Workbench and it works as expected) Then i had an Idea and as part of my SP I started making entries in a Temp table just to see whats coming up as variable. Insert in the table shows only first Charecter from the variable and which is why its not deleting any records.

Can someone please point me to the right direction as I can not find why my variable is being truncated.

Regards,

Maulin Thaker.

No Column Information was returned by the SQL Command

$
0
0

Hello, I'm working on a simple SSIS package for ETL, I'm trying to do an "UPSERT" using the classic lookup trick, the Insert works fine (Lookup error Output), the problem that I have is with the Update (Lookup Match Output), It doesn't let me map the parameters for the update query and keep throwing this error "No column information was returned by the SQL Command", I'm not using store procedures or dynamics queries, just two simple tables, the source and destination databases are different, both are SQL Server databases running in the same server.

My query is as follow:

UPDATE DimCustomer
SET [Name] = ?, [Search Name] = ?, [City] = ?, [Territory Code] = ?, [Customer Posting Group] = ?, [Currency Code] = ?, [Customer Price Group] = ?, [Customer Disc_ Group] = ?, [Country_Region Code] = ?, [Location Code] = ?, [County] = ?, [Post Code] = ?, [Tax Area Code] = ?, [VAT Bus_ Posting Group] = ?, [Partner Type] = ?, [Responsibility Center] = ?, [Service Zone Code] = ? WHERE [No_] = ?

Am I doing something wrong?

Thanks in advance.


Unable to Run SSIS Package Through SQL Agent Job

$
0
0

Hi,

I recently upgraded SQL server 2008 R2 to SQL Server 2012. I also upgraded all the packages on the server. The package runs fine from BIDS. However when I try to run the package through the SQL Agent Job it fails with the error below:

Executed as user: A. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  11:43:04 PM  Could not load package "\FolderA\Package.dtsx" because of error 0xC00160AE.  Description: Connecting to the Integration Services service on the computer "S2345WE" failed with the following error: "Access is denied."    By default, only administrators have access to the Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service.  Source:  Started:  11:43:04 PM  Finished: 11:43:04 PM  Elapsed:  0.016 seconds.  The package could not be loaded.

Using Windows Authentication I am able to login to Integration services through SSMS. In the SQL Agent job I am using package store to execute the package. I have admin permission on the server. The integration services currently uses my credentials while running.I am not sure why I am getting this error.

Please advice..

Thanks,


EVA05

SQL 2012 - Running job using Alias in connection string

$
0
0

We are moving our ETL Packages from SQL 2008R2 to SQL 2012 - but were having issues with alias.  We connect to external sources, and then store the data in a SQL Server Database.  The last step in the ETL is to "Reprocess" the cubes.

When using the following Data Sources connection string for the sql agent based job on sqlserver 2012:

Data Source=our_alias;User ID=test\service-user;Provider=MSOLAP.5;Integrated Security=SSPI;Impersonation Level=Impersonate;

We get the error message:

Executed as user: test\service-user. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  4:52:34 PM  Error: 2012-08-22 16:59:09.28     Code: 0x00000000     Source: Rebuild Dimensions Analysis Services Processing Task     Description: A connection cannot be made. Ensure that the server is running.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  4:52:34 PM  Finished: 4:59:09 PM  Elapsed:  394.589 seconds.  The package execution failed.  The step failed.

But, the job will succeed if I change the datasource to the actual hostname of the sqlserver:

Data Source=actual_hostname;User ID=test\service-user;Provider=MSOLAP.5;Integrated Security=SSPI;Impersonation Level=Impersonate; 

*Note:  This only applies to the step that "pokes" the cube to refresh, not the SQL Server RDB - which works with our alias.

Some notes related to our configuration and my testing:

-The RDB and SSAS database and the ETL Packages all live on the same server, and were using the default server - no named instances.

-SQL Server Browser service is running as user test\service-user

-Tracing with SQL Server Profiler on the analysis db shows that there is an attempt to login to the analysis database as user anonymous as opposed to the expected  test\service-user

-Aliases seems to work for connection to the RDB, but only fails when we attempt to connect to the SSAS database.

-We used the tool CliConfg.exe to create SQL Server alias, and even made host entries.  Worked fine in SQL2008R2 - does not work in 2012.

I hope I mad our issue clear, and thanks for any help.


Adam Talesky

What is the equivalent function in SSIS for the SQL query?

$
0
0

Hi,

    There are some special characters in my table. I am using the following query to correct them. here is the query.

REPLACE(EmpID,CHAR(26),'').

If i use this query, then all the special ASCII characters will become blank (space) .

When I try to use the same query in SSIS Derived column transformation , it does not work.

Can you please tell me what is the equivalent operation in SSIS for this query?

SSIS Scheduled Package

$
0
0

Please help....I have an SSIS package that was scheduled an have been running for awhile.  This package stopped executing.  The error message I get is:

Message
Executed as user: DWPRODDB2\SYSTEM. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4000.0 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  11:19:55 AM  Error: 2014-12-12 11:19:56.44    Code: 0xC0202009     Source: Populate Recruiter ODS Connection manager "RECRUITER_PRODUCTION"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'AD\DWPRODDB2$'.".  End Error  Error: 2014-12-12 11:19:56.44     Code: 0xC020801C     Source: Data Flow Task - Populate SPT_REC_ACAD_HISTORY OLE DB Source - SPT_REC_ACAD_HISTORY [1]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "RECRUITER_PRODUCTION" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2014-12-12 11:19:56.44     Code: 0xC0047017     Source: Data Flow Task - Populate SPT_REC_ACAD_HISTORY SSIS.Pipeline     Description: component "OLE DB Source - SPT_REC_ACAD_HISTORY" (1) failed validation and returned error code 0xC020801C.  End Error  Error: 2014-12-12 11:19:56.44     Code: 0xC004700C     Source: Data Flow Task - Populate SPT_REC_ACAD_HISTORY SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2014-12-12 11:19:56.45     Code: 0xC0024107     Source: Data Flow Task - Populate SPT_REC_ACAD_HISTORY      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  11:19:55 AM  Finished: 11:19:56 AM  Elapsed:  0.733 seconds.  The package execution failed.  The step failed.

Any help is appreciated. 

Regards

SSIS2008 in TFS 2013

$
0
0

Hi,

Can i bind ssis packages which are developed in 2008 to tfs 2013?


priyanka

SSIS - SQL Server Developer to Express Edition

$
0
0
Hi,

Does anyone know if it is possible to use SQL Server Developer Edition to produce SSIS packages that will operate on a remote SQL Server Express Edition database?

The situation is such that it is easiest to install a SQL Server Express Edition database on a remote server (for use within a company intranet) due to server availability and licensing restrictions.  It would be great to be able to do Excel round trips with the data though - would it be possible to use SQL Server Developer Edition to do this on another computer, and have it update the data in the Express database?

Thank you for your time.

Kind Regards,
Ray Muirhead

How best to round down decimal values in a string column?

$
0
0

Hi All,

Question: What's the best way to ID decimal values in a string column?  (Not every value contains a decimal point.)

Background: We have a string column that contains mostly decimal values like "12.050", "1.450", and "9.830", besides the occasional "NA" value.  I need to strip the final 0 out of the thousandths place wherever there is thousandths place.  (There's always a zero at the thousandths place as our business does not deal in thousandths.)

I can't simply convert the string because of the occasional "NA" values.  "NA" is the only non-numeric value that should ever occur in this column.  I assume I need to split the data set with "NA" records on one side and the remaining [numeric] values on the other side.  What's the proper way to do this?

We're using SQL 2008 R2 and SSIS 2008.

Thanks,
Erc


SSIS EXCEL source

$
0
0

hi , 

I  created a excel file with two columns one as general filed and other as text , and copied some data ,but when i use the excel as source i am getting text filed as unicode string  and truncating my data in the field.

how can we solve this ? 

do i need to change something in the excel file ..? or something in SSIS source  ?

any help will be appreciated . 

Error in Bulk Report Generation using SSIS and SSRS 2008 R2

$
0
0

Hello,

upon having solved development issues via this forum I am facing problem in practice. Namely, there are suppose to be created  200 .PDF files. I am facing "strange" outcome because, sometimes I am getting all the files created, sometimes less then 200 (different number of files produced) upon which I face this error related to DS2:

System.Web.Services.Protocols.SoapException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:Cannot read the next data row for the dataset DataSet2. ---> System.Data.SqlClient.SqlException: Internal Query Processor Error: The query processor encountered an unexpected error during execution.
   at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.InternalRender(String Format, String DeviceInfo, PageCountMode pageCountMode, Stream& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
   at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.Render(String Format, String DeviceInfo, PageCountMode pageCountMode, Byte[]& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
   at Microsoft.ReportingServices.WebServer.ReportExecutionService.Render(String Format, String DeviceInfo, Byte[]& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds).

Please, how to cope with this? Normally, run query (DataSet2) within either Report Builder or SSMS retrieves the data with no troubles. But, when I run it from SSIS (script component), it produces error as above.

How to load a comma seprated text file which contain address in to sql server table using ssis package

$
0
0

Hi,

I want to load a file which is comma separated and contain address .Problem is that address its self comma seprated so how do I differenciate whether comma used for column seprator or it used in address.

for eg.

One person having address like

"c/o AB corp,156 cross lane,USA"

Thanks.....

SSIS Server Crashes

$
0
0

Hi All,

We have 2 physical servers (Server-1 and Server-2). In Both the physical servers SSIS is installed.

If server 1 where SSIS is installed crashes , Can i pick up from server 2 where ssis is also installed ?

Is there any common place/repository where we can deploy the packages so that if SSIS crashes ,
So that it can pick from secondary SSIS.

Thanks in Advance

Dts.Events.FireInformation: Output not coming through to recordset

$
0
0

I am using SQL Server 2008.  I have a SQL Server T-SQL procedure that uses a shell command to execute a batch file.  The batch file uses DTExec to execute an SSIS package.  The T-SQL procedure is called from a Microsoft Access from end using ADODB.  All of this works satisfactorily, and the ADODB returns a result set that includes the execution results of the SSIS package and anything else that is in the batch file, such as 'Whoami'. 

The execution results returned to Access are basically the same as those generated in BIDS when the package is executed in debug mode.  However, I have included script tasks with Dts.Events.FireInformation commands.  This generates lines that are present in the debug mode execution results, but are not in the recordset returned to Access.  Do I have to log these lines and retrieve them from the log, or is there a simple way to force their inclusion in the resultset returned to Access.

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>