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

Deploy button greyed out

$
0
0

Hi I copied a project from 2008 to 2017 , the package runs fine but i cannot deploy the project or package, the deploy button is greyed out. Please advice.


not exits vs. lelf join

$
0
0

Hi,

I think not exits same as left join, but why the results are different? -thanks

Query1- 1 record returned 

select*
    frommyorders a
    whereNOT EXISTS 
                (select *
                from mysal b
                where a.ordercd b.ordercd
                )
    and a.company =456

query 2: 500 records returned
select*
frommyorders a
 left join mysal b
 on a.ordercd b.ordercd
 and a.company =456

SSIS variable

$
0
0

Hi,

Can you please tell what did I have wrong from the syntax below?  Thanks

"select *
from myorder
where compID ="+ @[User::comp] +"
and
case 
when "+ @[User::comp] +"  =450
where   CONVERT(char(10), date_added,126) >'2018-10-05'
end


"

How to connect to Azure DB that uses authentication type “Active Directory - Password” from SSIS?

$
0
0

Using Visual Studio 2017 (SSDT), I'm attempting to create a SSIS package that will send data to an Azure DB that uses the authentication method "Active Directory - Password".

What type of a connection can be used in SSIS to connect to an Azure DB that uses that type of authentication? The only authentication options are "Windows Authentication" and "SQL Server Authentication" when using the "Native OLE DB\SQL Server Native Client 11.0" provider. Is there a different provider that works with Azure DBs that use the authentication method "Active Directory - Password"?

There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database serve

$
0
0

Hi

I deployed a SSIS package in SSRS 2012.

But sometimes the package failed with the error:

PkgMigracionUnicadoWebConectividad:Error: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server. PkgMigracionUnicadoWebConectividad:Error: An ODBC error -1 has occurred.


I executed the view with mysql workbench when the package failed but mysql workbench can select the view.

How can store the data from temp variable to Table dynamically

$
0
0

Hi Visakh,

Below is My Query

/*Declare Variable*/  
DECLARE @Column [nvarchar](max);  
DECLARE @Query [nvarchar](max);  
  
/*Select Pivot Column*/  
SELECT @Column= COALESCE(@Column+',','')+ QUOTENAME([Date]) FROM  
(SELECT DISTINCT [Date] FROM [TEST].[dbo].[Product])Tab 

SELECT @Query='SELECT [ProductID],[ItemID], '+@Column+'FROM   
(SELECT [ProductID],[ItemID], [Date] , [Qty] FROM [TEST].[dbo].[Product] )Tab1  
PIVOT  
(  
SUM(Qty) FOR [Date] IN ('+@Column+')) AS Tab2  
ORDER BY Tab2.ProductID,[ItemID]' 

I need to store @Query results in table.Like below is the example 

select *  into temppfrom [TEST].[dbo].[Product]

Regards,

Niranjan B

Linked Server Server Account works in SSMS but fails in a SQL Server Agent Job

$
0
0

So the Linked Server is setup on SERVER1. We run a SQL Server Stored Procedure from SERVER1 using [SERVER2].[msdb].[sp_send_dbmail] and it works like a charm. WahLah...Email comes through Outlook. If we try running via a SSIS Package using SERVER2 as Connection Manager and then setup a job on SERVER1 we get the following error...

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 11.0"  Hresult: 0x80040E4D  Description:"Login failed for user '(Service Account)'.".  End Error  Code: 0xC00291EC     Source: Execute SQL Task Execute SQL Task     Description: Failed to acquire connection "(Server).(Database Name)". Connection may not be configured correctly or you may not have the right permissions on this connection.  End Error  DTExec: The package execution returned DTSER_FAILURE (1). 

I have looke high and low to try and resolve this and cannot seem to find anything.

What security permissions are missing form the Linked Server Service Account? Is it something related to SQL Server Security? Or something related to the Service Account Active Directory set-up? A Server setup switch?

If I try running the same SSIS Package on SERVER2 as a SQL Server Agent Job, it runs like a charm! 

What am I missing here? And please don't come back and say just run it on SERVER2 because it truly has to run on SERVER1.

Thanks for your review and am hopeful for a reply.

Exception calling ".ctor" with "3" argument(s):

$
0
0

Hi,

I am deploying ISPAC through VSTS via power shell script 

Below is the powershell script that deploys ispac

param (
    [string] $ispacpath,
    [string] $projectname,
[string] $parameterName,
[string] $AccessKeyValue,
    [string] $foldername,
	[string] $targetServerName,
	[string] $catalogName
)

if ([string]::IsNullOrEmpty($targetServerName))
{
	$ServerName = "localhost";
}
else
{
	$ServerName = $targetServerName;
}

if ([string]::IsNullOrEmpty($catalogName))
{
	$SSISCatalog = "SSISDB";
}
else
{
	$SSISCatalog = $catalogName;
}

Write-Output "ispacpath        : $ispacpath";
Write-Output "projectname      : $projectname";
Write-Output "foldername       : $foldername";
Write-Output "targetServerName : $ServerName";
Write-Output "catalogName      : $SSISCatalog";

# Load the IntegrationServices Assembly
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.IntegrationServices")

# Store the IntegrationServices Assembly namespace to avoid typing it every time
$ISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"

Write-Output "Connecting to server ..."

# Create a connection to the server
$sqlConnectionString = "Data Source=$ServerName;Initial Catalog=master;Integrated Security=SSPI;Network Library=DBMSSOCN;"
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionString

$integrationServices = New-Object "$ISNamespace.IntegrationServices" $sqlConnection

$catalog = $integrationServices.Catalogs[$SSISCatalog]

$folder = $catalog.Folders[$foldername]

if (!$folder)
{
    #Create a folder in SSISDB
    Write-Output "Creating Folder ..."
    $folder = New-Object "$ISNamespace.CatalogFolder" ($catalog, $foldername, $foldername)            
    $folder.Create()  
}

# Read the project file, and deploy it to the folder
Write-Output "Deploying Project ..."
[byte[]] $projectFile = [System.IO.File]::ReadAllBytes($ispacpath)
$folder.DeployProject($projectname, $projectFile)

$project = $folder.Projects[$projectName]

 $project.Parameters[$parameterName].Set(
        [Microsoft.SqlServer.Management.IntegrationServices.ParameterInfo+ParameterValueType]::Literal,
        $AccessKeyValue)     

          $project.Alter()

In VSTS, we are using the task "PoweShell On Target Machines".

In PowerShell Script value is : D:\ReleaseManagement\AgentLib\DeployIspacToSSISDB.ps1

(DeployIspacToSSISDB.ps1 has the code that is pasted in code block)

In Script Arguments value is : "D:\ReleaseManagement\TestMart.ispac" "TestMart" "TestKey" "labcd/xyz=" "Test"

But when we try to deploy using VSTS, it is getting failed with the error 

System.Management.Automation.RuntimeException: Exception calling ".ctor" with "3" argument(s): "The property 'Name' contains invalid characters as an object name. Remove the invalid characters." ---> System.Management.Automation.RuntimeException: Exception calling ".ctor" with "3" argument(s): "The property 'Name' contains invalid characters as an object name. Remove the invalid characters."

LegacyVSTSPowerShellHost.exe completed with return code: -1.

NOTE:

ISPAC is successfullly deployed when powershell script is executed manually as below 

D:\ReleaseManagement\AgentLib\DeployIspacToSSISDB.ps1 "D:\ReleaseManagement\TestMart.ispac" "TestMart" "TestKey" "labcd/xyz=" "Test"



Raksha


An error occurred while assigning a value to variable, Single Row result set is specified, but no rows were returned

$
0
0

Hi all,

we have a server serving as a data warehouse, we extract flat files from different sources then we launch a load job in SQL Server Management Studio that loads every flat file in its correspondent database table. We have around 200 tables. The job that loads the data is called "Data Load". We use SQL Loaders for each file, all are .CTL. For example here are the first 5 lines of every CTL file :

OPTIONS ( ERRORS=50, ROWS=10000, BINDSIZE=50000,READSIZE=65536)
LOAD DATA
INFILE 'ACCOUNTS.DATA'

INTO TABLE "ACCOUNTS"
INSERT

Everything was working good, but yesterday, suddenly the Data Load job doesn't load anything into the database.

Here's the error we get :

Code: 0xC002F309     Source: EST Get Table Name Of Sequence Execute SQL Task     Description: An error occurred while assigning a value to variable "table_name": "Single Row result set is specified, but no rows were returned.".  End Error  DTExec: The package execution returned DTSER_FAILURE (1).

We didn't change anything in the CTL files nor the Data Load package. This job was working perfectly since 4 years.

I suspected it's something about the connection with the database, as it maybe couldn't get the Table Name.

It's an MIS server for work and we're totally blocked.

Thanks in advance.


error when creating table fast load for ms access

$
0
0

hi,

i created package in which data is loaded from sql server 2016 to ms access 2016 and it works ok for small amount of data.

now i have to load 2+ million of records and this way is very very slow so i tried to change in my ole db destination data access mode to "table or view - fast load" but i get this error:

Exception from HRESULT: 0xC0202040
Error at Data Flow Task [OLE DB Destination [2]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

Error at Data Flow Task [OLE DB Destination [2]]: Failed to open a fastload rowset for "Smanjenja_i_iskljucenja". Check that the object exists in the database.

my package data flow looks like this:

destination (ms access) connection manager "connSmanjenjaAcc":


and when I change to fast load error is thrown as mentioned above:

could someone tell me what am i doing wrong ?


Excel import - Error code: 0x80004005

$
0
0

We import data from an Excel (2010) file and it works on SSIS 2012 version.

Recently we upgraded to SSIS 2016 versions and we are getting following 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: "External table is not in the expected format.".

We tried to import a very simple Excel file and it works but this file in particular does not work.

The import of the same file is still working fine on the old server. And we made sure that we install 2010 32 bits drivers on the new server.

I would appreciate any help. Thank you in advance.

looking for a solution that is really dynamic

$
0
0

Hi we run 2016 enterprise. We have an ssis apparatus that thru metadata can load consecutive waves of 9 simultaneous source to destination data loads. As soon as the longest running load of wave x is done, wave x + 1 begins.

I don't like that any one wave blocks the next wave until its longest running load finishes.  I'd rather see a solution that starts up a load when a slot becomes available (we currently limit ourselves to 9 simultaneous slots) and all the prereqs for that task have been satisfied.  I assume 9 is a magical number for one ssis pkg so perhaps there is a solution out there that pushes the server to more than 9 by enlisting multiple pkgs.  Out loads are mostly incremental so too much traffic at one time especially on the same destination db shouldn't be a problem but we may want to limit some loads from running at the same time.  

Has anyone seen such a solution in ssis?  Or even part of such a solution?

SSIS Error : Unable to complete login process due to delay in opening server connection

$
0
0

Hi Gurus,

One of my packages which is called from a windows scheduled task is intermittently throwing the following error:

Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Unable to complete login process due to delay in opening server connection".
End Error

This happens once or twice a week, rest of the days the job runs fine. Since the source server is not owned by our team, can't change investigate much on their side however we tried moving our job execution time to an earlier hour but the problem stays.

Here is what I am planning to implement as a work around:

         -Trap the error if occurs

         -Then wait for 15 minutes and try executing the package again (repeat up to four times)

         -Fail and notify about the error

Does this approach look good and is this doable/feasible? Is there a better way to fix this issue? Your valuable inputs are highly appreciated.


HTH,
Cheers!!
Ashish
Please mark it as Answered if it answered your question or mark it as Helpful if it helped you solve your problem.


Help with SQL 2008 Maintenance Plan

$
0
0

Hoping this is the right forum...

We've been running a one-database SQL Server since converting from Access in 2010. The database backup type is Full. A Maintenance Plan was created at the outset consisting of 3 sub plans: Daily, Differential and Log Backups. The Daily runs overnight and performs these tasks: 1) Rebuild Index, 2) Update Statistics, 3) Check Database Integrity, 4) Maintenance Cleanup, 5) History Cleanup, and 6) Database Backup. Tasks 1 & 2 run against our one database named ALIS. The other tasks include the system databases. The Differential runs every 2 hours and the Log Backups every 15 minutes during business hours from 8 am to 9 pm, 7 days a week.

The database size is currently 21.5 GB. The log size has been growing in step with the database and lately crossed the 13 GB mark. With the company closed on Dec 26th, I used the opportunity to shrink the log down to its minimum, roughly 300 MB, then I resized it to 5 GB. This morning, after the Daily ran, the log size is back up to 13 GB with 98.7% log space used. After a Log Backup the log space used is 0.31%. I assume this is because the Full backup type is logging the Daily's Index work.

I'm asking for suggestions about how to avoid the Transaction Log bloat. My strategy would be to update the Daily sub plan by switching the database type from Full to Simple before Task 1 then switching it back from Simple to Full after Task 2. If anything happened during those tasks we could recover from the previous night's Full and the day's last Differential.

I'm not sure how I would accomplish this switching as I didn't author the original Maintenance Plan nor do I have any experience with these. I'm guessing that I would add an Execute T-SQL Statement task along the lines of:

ALTER DATABASE ALIS SET RECOVERY SIMPLE;
GO

and place it first in the list of Tasks. Then insert another of these between Tasks 2 and 3:

ALTER DATABASE ALIS SET RECOVERY FULL;
GO

Is this what you would do? Any other suggestions?

Thanks!

How to move valid records into main table and invalid records into another table.

$
0
0

Hi All,

   I am using VS 2015 Data tools.   I have a .csv file 

Empid,Ename,Sal
1,Rama,3400
r,Krishna,4500
2,Siva,ertt
3,Vishnu,3450

Initially I will load all the records into a table(Import_Emp). After that I want to validate each and every record while moving into main Table. I tried by placing Flat Filesource and 2 Ado.net Destinations . I am unable to identify how to move invalid records into another table and valid into main table. I am new to this concept. Please guide me on this




Cannot deploy SSIS packages to SQL Server 2017

$
0
0

I am getting an error when trying to deploy an SSIS package to a SQL Server 2017 machine. 

Environment:

Windows Server 2012 R2

.NET 4.7

SQL Server 2017

solution files local

visual studio 2017 w/SSDT

ssms 17.3

Action:  Hit deploy on Visual Studio 2017 or execute the following code:

DECLARE @ProjectBinary AS VARBINARY(MAX)
DECLARE @Operation_id AS BIGINT

SET @ProjectBinary = (SELECT * FROM OPENROWSET(BULK 'C:\Source\MyPackage.ispac', SINGLE_BLOB) AS BinaryData)

EXEC [catalog].[deploy_project] @folder_name = 'MyFolder', @project_name = 'MyProject', @project_stream = @ProjectBinary, @operation_id = @Operation_id out

The following error message is returned from the server:

Msg 6522, Level 16, State 1, Procedure internal.deploy_project_internal, Line 0 [Batch Start Line 0]
A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal":
System.ComponentModel.Win32Exception: A required privilege is not held by the client
System.ComponentModel.Win32Exception:
   at Microsoft.SqlServer.IntegrationServices.Server.ISServerProcess.StartProcess(Boolean bSuspendThread)
   at Microsoft.SqlServer.IntegrationServices.Server.ServerApi.DeployProjectInternal(SqlInt64 deployId, SqlInt64 versionId, SqlInt64 projectId, SqlString projectName)
.

I have found several articles talking about this issue and most refer to permissions, like this one https://blogs.msdn.microsoft.com/dataaccesstechnologies/2013/08/20/system-componentmodel-win32exception-a-required-privilege-is-not-held-by-the-client-while-deploying-ssis-project/

I have verified that all permissions referenced are available to the service accounts that run SQL Server and the SQL Agent.  SSIS is running with the NT Service\MsDtsServer140 account.

I have not seen anything in process monitor or event viewer that stand out as an issue, making me think this is some kind of SQL 2017/.NET 4.7/Visual Studio 2017 issue.  I know we are still in preview...hoping that a patch will soon fix this and wanted to report my issue and hope that someone may know of a fix...my upgrade is currently on hold until I can resolve this one.



SSIS Transaction Required

$
0
0

I have built a Master package 

Master Package has 2 Execute SQL task and Sequence Container1 then Execute SQL then another Sequence Container2 and lastly 1 more execute SQL task.

SQL task are to update a table with start and end time and few flag

Sequence Container  1 is to load Source files to Stagging tables ( first truncate and then load in all packages in Sequence Container )

Sequence Container  2 is for loading Stage table data to target tables (coontains almost 10 package executing in Serial)

I have enabled Transaction = required in Sequence Container 2 as I want to roll back in case package fails.

I am facing a issue in one of the package of Sequence Container 2 it always puts a lock and package never runs.

This package has a OlEDB Source then fuzzy Lookup and Lookups , Kindly suggest if someone has faced the same error


AJ

store sql connection string as a parameter in SSIS

$
0
0

Hi,

I am having a connection string specified within my script and now I want to store it as a dts variable so that i can change its value when i deploy to different servers.I tried to store the connection as a parameter of string type this way:

Data Source=xyz;Initial Catalog=Oracle;Provider=SQLNCLI10;Integrated Security=TRUE

And,my script reads the variable from  ReadOnly variable and following is in the script:

 var connectionString = Dts.Variables["$Package::Connection"].ToString();

I get the error here:

using (SqlConnection connection =
                                   new SqlConnection(connectionString))

This is the error: "Format of the initialization string does not conform to specification starting at index 0"

I dont know what is the exact format,pls help

Microsoft SSIS - Load a flat file (.csv) with multiple commas (,) and no double quotations (") - into a SQL Serve table

$
0
0

I have a situation in which our client has given a flat file (.csv) to be loaded into a SQL Server table using SSIS.

This huge raw .csv file (with about 400,000 records) does not have a proper format - particularly it does not have the double quotation ("), either in the column name header or in the row data. Please see an example below:  

Column 1, Column 2, Column 3,....

Z ,  342343242424  , 10.83  ,  000001001765  , 2018-12-03 , 2018-12-03 ,  ABCD  , XYZ,  ,  CA ,  001  ,  00  , ?  

(This is an instance of a data row, with the column header names as Column 1, Column 2,...There is no double quotation(") at all in this file)

I am using Visual Studio 2017 to work in SSIS. 

In the SSIS Flat File Connection Manager Editor - General page, I have set the following properties:

Format: Delimited
Text Qualifier: <none>
Header row delimiter:  {CR}{LF}

As you can see XYZ,    is desired as XYZ, in a single cell; instead I seeXYZ in once cell and a blank in the adjacent cell to the right. (I am currently de-bugging using a Data Viewer.)

Every cell gets shifted one place to the right side. In the last column on the right side, I get this:   00  , ?  in one cell

I do not have an idea on how to load this sort of an improperly formatted .csv file (without double quotations(")).

Is there a way I can load properly ? May be changing the file to a text file or something.

Any suggestions will be appreciated.



Dynamic connection strings in SSIS package

$
0
0

Hi,

    I am new to SSIS. I have requirement like below:

credentials required for connection string are placed in tableConfigInfo on one server containing columns-server name, Database name, username and password 
so when i
execute the package for eg if there are 4 server names in the tableConfigInfo, all 4 servers needs to be connected dynamically without stopping the execution.

CREATE TABLE ConfigInfo
(
	ServerName VARCHAR(100),
	DataBaseName VARCHAR(100),
	UserName VARCHAR(50),
	Pwd VARCHAR(50)
)
GO
INSERT INTO ConfigInfo('10.6.16.197','SNNew','sa','sh1234')
GO

     I tried but I am unable to create like that. Can any body help me out by giving an example on this. How can i create a package to take configuration values from SQL Server Table.

Thanks,

Vijay


Viewing all 24688 articles
Browse latest View live


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