I was creating an SSIS package, seemingly simple. One of the tasks I needed to do involved copying our production database to a seperate DB instance for staging. I wanted an SSIS package that would stage production so we could push and test changes.
My first problem is that I tried to create a simple Transfer Database task. When I tried to run the task, I got an error stating that our Stored Procedure, DtsRun, could not be scripted. It's an encrypted stored procedure.
A little annoyed, I decided that I'd do a transfer SQL objects instead. Now I don't want to hard-code my objects to xfer based on the current schema and edit this SSIS script every time we make a DB change; I just want it to copy ALL objects except for my encrypted proc. I'll just build a list with with another task.
I decided that I'll write a script that generates a list of proc names, and I'll pass that to the Copy SQL Server Objects task. Well apparantly I can't assign a collection value with a script. I have to create ANOTHER package that modifies THIS package because (1) The entire package isn't exposed to the script task and (2) object variables can't be used in expressions.
Am I missing something? So because I use a single encrypted stored procedure, I have to write 2 fairly complex packages to copy my database? That's just stupid. I can understand if SQL can't move the encrypted package while the database is online. I could deal with that. But the extremes I have to go to JUST to copy my database are truly rediculous.
I was really excited about SSIS, but I've been really dissapointed. The performance of the designer on my machine is really poor (I have a Core T2700 with 2GB RAM). Just about every error message I've gotten, both design-time and run-time, I've had to google because they're so obscure. And if you can only store blittable types and strings in variables, that severely limits the functionality of a package (without going to programmatic extremes).
Most of all, I'm really dissapointed in the expression system, If the CLR is loaded into the SSQL/SSIS runtime, then why am I coding it using ANOTHER proprietary coding syntax???? I thought .NET was meant to keep people from having to redesign the wheel???
Microsoft is constantly pushing C#, yet I can only script in VB.NET, which means I now have code-bases in different languages.
Overall, I'm really dissapointed with SSIS. The usefulness of the added functionality in SSIS packages is shrowded by the massive list of nuances.
I am new to SSIS. I wanted to do a daily ETL load from sourceA to targetB database
Please let me know the best method to that i should follow to do the below task
1. Get the Yesterday's date or last months's from-date & to-date dynamically. 2. Pass the from-date and to-date to my source SQL [e.g select emp_name, emp_dept from emp where hiredate between @param1 and @param2]. Acually my source sql has subquery and the parameters has to be passed to the subquery's where clause. 3. Insert the resultset into a staging table in the targetB database. 4. Join this targetB table with another table in sourceC db 5. finally load the result set in to the targetT database table 6. How to configure/schedule this package so that it runs daily, automatically pass the yesterday's date to the package.
I have done this using Oracle PL/SQL but my requirement is to do this in SSIS. I am not sure which control flow or transformation items to be used to do this in an effecient way.
hello experts, i have to create a table for user with 40 fields. these reuire one entry per user. like his interest hobbies professinal... information. do you recommend me create different tables or let it in one table if in one table will it create any speed problem? how many fields i should limit in one table.
secondly can i have my fields value initialized like int type to 0 and var type to space? is there any setting in sql for the same.
I am using SQL Server Express within visual studio and am needing to create a stored procedure. The proble is that every time I finish and close it then it asks me if I want to save the changes which of course I want to. But then it always comes up with a message box that says "invalid object name" followed with the name of the stored procedure. ??? why? I try creating a stored procedure from scratch or copying the code of another stored procedure. It alway gives me that message and does not let me save the stored procedure. I tried changing the default name of "dbo.storedprocedure1" or even leaving it as is and always I get the message that says "invalid object name: dbo.storedprocedure1" and it does not let me save the procedure. What am I doing wrong?
I am extremely new at SQL Server2000 and t-sql and I'm looking tocreate a simple trigger. For explanation sake, let's say I have 3columns in one table ... Col_1, Col_2 and Col_3. The data type forCol_1 and Col_2 are bit and Col_3 is char. I want to set a trigger onCol_2 to compare Col_1 to Col_2 when Col_2 is updated and if they'rethe same, set the value on Col_3 to "Completed". Can someone pleasehelp me?Thanks,Justin
I'm trying to create duplicates in a copy of a table in the same database by inserting rows from the original table. Seems easy but I can't get any sql to work. help?
As the users drill down one of the dimensions, I want to show the breakup of each sub member in terms of %age e.g.
Suppose total Sales are 300 and breakup is as follows: Category A = $ 120 Category B = $ 65 Category C = $ 115
I want that when the user drills down to the 2nd level in the Products dimension (let's say this Level is called Category) then I want the %age of Sales for each category - all adding up to 100
So this is what I should get (for the desired % breakup)
Category A = 40 Category B = 22 Category C = 38
I'll appreciate your help in making such a Calculated field.
Say I have 10 tables that need to be loaded from one database to another. There is minimal transformation from source to target and it's pretty much a column to column mapping.
Would you make 10 separate packages, each one loading a specific table, or 1 package that loads all 10 at the sametime?
My inclination is to make 10 separate packages because there mostly will be foregin key constraints on some of the tables. And if I created 10 packages, I would make a 11th package (I guess some people call this the master package) that sequuences the run order for the 10 individual ones.
In this scenario, say I need to have a configuration file that sets the environment (dev vs prod). Would you make a confiuration file for each of the individual packages (this would be repetative, setting the same name and value 10 times) or is there a way to have a configuration for the master package where you would set the value just once?
I am using the "Transfer SQL Server Objects Task" to copy some tables from database A to database B including data.
The tables, primary key constraints, Foreign key, data and all transfers nicely except for "DEFAULT CONSTRAINTS" on the tables.
I have failed to find any option in the "Transfer SQL Server Objects Task" task to explicitly say "copy default constraints". So I guess logically it should happen automatically but it doesn't. I hope it is not a bug :-)
In short, does the €œTransfer SQL Server Objects Task€? support distributed transactions?
In trying to use a €œTransfer SQL Server Objects Task€? in a container using a transaction on the container. The task is set to support the transaction. It is setup to copy table data from several tables from a non-domain server (sql server 2000) to a domain-based server (sql server 2005). I get an error stating, €œThis task can not participate in a transaction€?.
I am wondering if it means exactly what it says €“ this task in SSIS can€™t participate at all. Or does it mean that it won€™t in this scenario for some reason. I attempted a simple copy of data from mssql 2005 to mssql 2005 (same server) and the task still failed). MSDTC appears to be running properly on my machine and such (I can do a simple distributed transaction across linked server to the 2000 server in Query Analyzer (QA)). Also, MSDTC appears to be working on both servers with distributed transaction query tests in QA.
Here€™s the error info€¦
SSIS package "Development BusinessContacts and Products Migration.dtsx" starting. Information: 0x4001100A at Copy BusinessContacts Data: Starting distributed transaction for this container. Error: 0xC002F319 at Copy BusinessContacts database table data 1, Transfer SQL Server Objects Task: This task can not participate in a transaction. Task failed: Copy BusinessContacts database table data 1 Information: 0x4001100C at Copy BusinessContacts database table data 1: Aborting the current distributed transaction. Information: 0x4001100C at Copy BusinessContacts Data: Aborting the current distributed transaction. SSIS package "Development BusinessContacts and Products Migration.dtsx" finished: Failure. The program '[4700] Development BusinessContacts and Products Migration.dtsx: DTS' has exited with code 0 (0x0).
I've been running around in circles all afternoon trying to create one simple report using Reporting Services (with latest SP2 installed) and SharePoint 2007. To the best of my knowledge, I have everything configured correctly:
When I access http://<server>/ReportServer, I see the server name of my SharePoint site. When I click on the name of my SharePoint site, it shows me the directory structure I have created within my SharePoint Site When I drill down in the directory, I can ultimately see the forms I created in my forms library (created via InfoPath 2007).
The next step is to create one simple report from the data in one of these forms libraries and a report on all the items within a form library. I'm stuck at the first step of creating a report, namely what to enter as the Data Source and the connection string. With a SQL database this isn't an issue.
How does one create a data source that will allow reporting over SharePoint content with the setup described above? And, if you have information that is found in the SQL Books Online, please be kind and post links so others know where to find this information.
A common issue that I run across with clients is they want only want to process a file if it's finished transmitting to the server. This SQL Server 2005 task reads the properties of a file and writes the values to a series of variables. For example, you can use this task to determine if the file is in use (still be uploaded or written to) and then conditionally run the Data Flow task to load the file if it's not being used. You can also use it to determine when the file was created in order to determine if it must be archived.
I just recently ran into the problem of a memory leak using xp_sendmail with certain parameters. After going online with microsoft I found out this is a known bug. Is there anywhere that they list all the bugs currently known for SQL 7 after applying SP1
I currently have a simple cdosys email task that has been scheduled to send a simple email from ssis. The email is sent using an activex script in a "SQL 2000 DTS Package Task". When executed manually, the email is sent ok. When scheduled (and run under our SQL agent account), it fails. Can anyone point me in the right direction? Is this a permissions issue?
'-- this script seems to cause problems, but only when scheduled -- dim mailer set mailer = CreateObject("CDO.Message") dim cdoconfig const cdoDispositionNotificationTo = "urn:schemas:mailheader:disposition-notification-to" const cdoReturnReceiptTo = "urn:schemas:mailheader:return-receipt-to" set cdoconfig = CreateObject("CDO.Configuration")
with mailer set .Configuration = cdoconfig .BodyPart.charset = "unicode-1-1-utf-8" .BodyPart.ContentTransferEncoding = "quoted-printable" .Fields("urn:schemas:httpmail:importance").Value = 2 .Fields.Update
.Subject = "Notification" .From = "donotreply@test.com" .TextBody = "TEST" .Bcc = "someone@test.com" .Send end with '-------------
Also, since I have several DTS packages that are similar, I'd like to keep these packages in the SQL 2000 dts format, instead of converting them into SSIS format and using database mail.
Does anyone know if there is there a published list of outstanding SQL Server bugs? I keep coming across bugs and I would love to have link to where I can proactively review them.
I have a table contain a sub report . when I run on preview (visual studio), no problem . but when I run from my application , the report viewer just show "Report been generated" , never show the report .
after try and error I discover that when the query from main report return no records , plus the table contain a sub report , the problem occur only if you run it from your application using report viewer . not from visual studio . is this a bugs? anyway to resolve this or work around?
Here is another one thats been bothering me for quite some time and I believe for user with regional and language settings to non-US English.
I have my regional settings set to Canadian English. I am using Calender controls to pick up Start, End dates in my report. When I pick a date from calender it automatically converts it behind the scenes to US English I believe. Therefore when I run the report, I get the result set, say from Oct 8 instead of Aug 10. Further, if I select the date as 13 Aug, the following error gets thrown (as a result that the SSRS is not able to identify 13 being any month of course)
"An error occured during local report processing. The value provided for the report parameter 'StartDate' is not valid for its type".
Is there a solution to this problem? The underlying date type is DateTime, so why should it matter which regional setting I use?
I'd like to transfer some records between the following 2 tables. Surely this should be a no-brainer - what am i missing that is making this so impenetrable?
I am currently: Hoping someone can help me get here: (this is my first time of using SSIS btw).
here is the source table (MS Sql Server 2005, SP 2)
I used the SSIS Import and Export wizard to copy data between the two tables, and attempted to execute it. I use Sql Native Provider on source, and Native Ole DBOracle Provider for OLEDB. however, I get an error:
[Destination - IMAGINE_DIVS [37]] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-12571: TNSacket writer failure".
I notice that the wizard has created a data flow task with 3 steps: source - imagine_divs, Destination - IMAGINE_DIVS and "data conversion 1".
Data Conversion 1 seems to be taking my source nvarchar columns and converting them to DT_STR with twice the size (for example div_mnemonic become DT_STR, size: 22).
If I change the mappings in the OLE DB Destination Editor, such that only the numeric and date-typed columns are included in the transfer, it works fine.
If I include any string-typed column in the destination editor mappings, I get the TNS Packet Writer error. If I remove the Data Conversion step and connection teh source and destination tasks directly, i get validation errors saying that:
Error 2 Validation error. Data Flow Task: OLE DB Destination [294]: Columns "div_mnemonic" and "DIV_MNEMONIC" cannot convert between unicode and non-unicode string data types. Package4.dtsx 0 0
this is despite the fact that everything is unicode here (right?)
Has anyone done this? I can't find anything in the documentation that describes this. The closest I get is to the InnerObject property of the TaskHost class. There is an example of programming a bulk insert task. But I can't find anything on programmatically setting the column mappings (source to dest) of a simple data flow task. Any help is appreciated!
I've created my own posting for this. The original post was here, I apologize: http://forums.microsoft.com/forums/ShowPost.aspx?PostID=2906512&SiteID=1
According to the poster it's not possible. But there has to be some way to do it? Reflection (don't know how)?
I need to get a reference to the task host in an SSIS Task component.
Basically the scenario is this:
I have a custom task I have created. However I would like to validate that the ExecValueVariable is infact a string variable during the validate event of the task. I know how to verify its a string variable. But I can't figure out how to read what the user selected (such as User::Myvariable). The only way I've been able to figure out how to do it, but it only works if you open my custom task UI.
What I did is this:
I've implemented IDtsTaskUI and during the initialize section I wrote:
Sub Initialize(ByVal taskHost As TaskHost, ByVal serviceProvider As IServiceProvider) Implements IDtsTaskUI.Initialize ' Store the TaskHost of the task. Me.taskHostValue = taskHost Dim myTask As CustomTask= CType(taskHost.InnerObject, CustomTask) myTask.myTaskHost = taskHost End Sub
My Task is named: CustomTask. I have a public variable in my task as follows:
Public NotInheritable Class CustomTask Inherits Task Implements IDTSComponentPersist Public myTaskHost As TaskHost = Nothing
Therefore I pass back the taskhost value to the CustomTask class, and voila I have it.
Problem is, this only works if the custom task calls the initialize method, and this only happens when you open the custom editor.
I then do the validation in my CustomTask class and it works fine, but myTaskHost is null/nothing until you actually open the custom task UI
I tried SQL mirroring in beta 1 , then it was gone, until SP1.
Now I can not setup mirror, it is fine if it is just hard to setup, but it seems it is full of bug! The mirroring has to be stable, since I am trying to mirror product db, what a diaster if something goes wrong.
I am trying two servers, both has 9.0.3042. First I tried to setup on my home machine, I VPN to my network, After I config security, I see two connection strings:
and it doesn't show that error anymore, I am not sure why the connection should be like the latter format, but in anyway, how come SMO can not make it right?
then I get another error, SQL server doesn't exist or can not access, I search on the Internet, it seems that error could mean anything, include that the mirror db is not in restore mode.
But I did set the mirror db in restore mode and both sql5 and sql8 are under same domain, pysically close.
There are four limitations or apparent bugs I have experienced in 2005MS. Two I know are for real.Two real limitations/bugs --1. Can't edit table-valued function.2. Can't get nulls to be missing (blank) in text output paneTwo more I just encountered, and am wondering about --3. DB->All Tasks->Import Data->Load CSV file (exported from Excel) ->garbled table as some rows end up being extra columns. The samespreadsheets load okay from XLS format.Table should have shape A, instead has shape B:A B|...| |...||...| |...||...| |......||...| |......||...| |...||...||...|4. SET NOCOUNT OFF has no effect after SET NOCOUNT ONIs there a way to work around these, or are they real bugs?
Where can a person go to report SSRS 2005 bugs? I didn't see any area for error reporting.
These are the few bugs I've recorded, but I've seen so much more :( On 2005sp1, and mainly using ssas 2005 for source data:
When you have an existing report parameter that was created by the graphical query designer area for dataset1, and then you go to make another dataset and add the same hierarchy and choose for it to be a parameter, it will overwrite what parameter settings you just had (ie, not multivalue and a special default value I desired).
When adding subsequent series or category fields to a chart, the default series/category grouping name remains the same and causes a error when attempting to run the report. IE: chart2_CategoryGroup1, chart2_CategoryGroup1, chart2_CategoryGroup1 - all names are the same for all of the 3 groupings that I've added.
Generated XML when done thru SSIS Editor. i have given only the DTSObject..thats where i am struck.
Code Block <DTS:ObjectData> <ScriptProject Name="ScriptTask_d17b2b95a3984e37a536f2a6e017e2c9" Language="Microsoft Visual Basic .NET" EntryPoint="ScriptMain" SaveBinaries="True" ReadOnlyVariables="" ReadWriteVariables="User::SalesId"> <ProjectItem Name="dts://Scripts/ScriptTask_d17b2b95a3984e37a536f2a6e017e2c9/ScriptMain.vsaitem"> <![CDATA[' Microsoft SQL Server Integration Services Script Task ' Write scripts using Microsoft Visual Basic ' The ScriptMain class is the entry point of the Script Task. Imports System Imports System.Data Imports System.Math
In the DTSObject, i dont know how to add details thru C# code. Please help me. Thanks.
I am getting incorrect results from my paging query, where the same results are being returned multiple times. Here are two queries I have found to bring the same results:select top 20 * from lookupdocuments_dbv where catname_cst='MyCategoryName' and (docid_cin not in (select top 620 docid_cin from lookupdocuments_dbv where catname_cst='MyCategoryName'))select top 20 * from lookupdocuments_dbv where catname_cst='MyCategoryName' and (docid_cin not in (select top 640 docid_cin from lookupdocuments_dbv where catname_cst='MyCategoryName'))When I remove the catname_cst where clause it brings back results properly (i.e. records 622-642 and 643-663). What is wrong with my where clause that is causing identical data to be returned?
We have customers that are using web synchronization. Could you, please tell us when service pack for the bugs, discussed in thread http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=689428&SiteID=1 will be reliazed?
What replication participants should apply the service pack in a configuration where Subscriber (MS SQL 2005 Express) gets synchronized with Publisher/Diustributor (MS SQL 2005 Standard)?
I have two questions to ask in this one thread. I would appreciate any feedback.
1. Is it possible to create GUI from SSIS using macro so that it can display forms or dialogs? If so how can I create a form that can be used to pass the parameters for the execution of the SSIS??
2. Is it possible to pass parameter(s) to SSIS? If yes, how can we do it...Please provide me with any example.
I'm trying to create a custom data flow destination, and it has a custom property that needs to get value from variable(similar to the FileNameVariable property of Raw File Destination), how can I do that?
Has anybody here had any issues with the MS03-031 security patch and SQL 2000 on Windows 2003?
We recently installed this patch on one of our test SQL 2000 machines, and the performance of queries running on this machine have gone up (gotten worse) by at least 10X.
We use indexed views and all queries are run with WITH(NOEXPAND) to force the indexed view to be used.
Anyway, after the patch was installed, the queries on the indexed view will ONLY use the clustered index, and not any of the other indexes, causing a Clustered Index Scan.
I removed the patch (well, re-installed SQL) patched it up to SP3a, and performance is back to normal.
Hi All, i am just started to studying some material on SQL 2005. A question came across my mind regarding the SSIS 2005.
Can my .net 1.1 web application trigger the SSIS 2005 package? if yes, how? The SSIS 2005 class library is compatible with .net 1.1? Appreaciate if anyone can help to clarify this. :)
I am pulling data from an AS400 DB2 mainframe and copying it into SQL Server 2005. For one table the date is stored in three columns (TDAY), (TMONTH) and (TYEAR). I am first using Data Conversion to convert these columns into string format (as opposed to numeric) and then creating a Flat File.
I then want to take this Flat File and copy the columns into SQL server, however I want to "merge" those three columns, create a date and store that into one column in SQL (TDATE). So is this where I need to use a Derived Column?