Kirk: Importing/Exporting With Column ErrorCode, ErrorColumns
Mar 8, 2006
I am currently redirecting lookup failures into error tables with ErrorCode and ErrorColumn. It works fine until I want to transfer data into the archived database. The SSIS pacakage generate by SQL Exporting tool is throwing an "duplicate name of 'output column ErrorCode and ErrorColumn" error. This is caused by oledb source error output. The error output automatically add ErrorCode and ErrorColumn to the error output selection and not happy with it.
I think the question is down to "How to importing/exporting data when table contains ErrorCode or ErrorColumn column?"
may i know where to find more detail like how to importing and exporting data in ms sql server.? Hope can get the more detail about it and also teach me step by step. (hope can include the photo).
dBase importing was handled by the import/export tool provide with SQL 2000. I see no way to import .dbf files in sql 2005 except to load the sql 2000 tools. I realize that the dbf format is old, but there is still a lot of stuff that comes in dbf and sql2005 needs to support this.
Where can I find an importer for dbf to sql2005?
I keep hearing lots of work arounds but nothing to explain why a common data format can't be easily imported/exported in sql2005 tools. Whats the deal?
Not sure if this is the correct Forum, anyway lemme me know your views. I have SQL Server running in two remote machines (in different geographical locations). I need to import a database from one SQL Server installation to another installation. What is best possible solution:
1) Transfering the .mdf and .ldf file from one installation to another installation
2) Generating the records of all the tables in the database to a common file format CSV and then loading it in destination database. If this is ok then how to generate import and export data using CSV format
I am not quite sure whether it is possible to export a sql table farmat into a , for instance, dbf format table using solely sql statements from my VB application. We know that ACCESS has this profile , however I have no success regarding it for my 7.0 SQL version.
When I right click on a database I don't have Import/Export under tasks. However I do have C:Program FilesMicrosoft SQL Server90DTSBinnDTSWizard.exe installed and can invoke it manually.
What do I need to do to get it to show up in tasks?
This may be a simple question with an obvious answer, but I'm fairly new to databases and I can't seem to find the right procedure.
I created a database on my machine. If I want to copy the information from this database (columns, tables, and entries specifically) from my machine to another SQL server on a different machine, what is the best way to do this without manually re-entering all of the information?
Is there a simple export/import of a database for transferring it from one server to another?
I have a web application I created in asp.net + sql2005 and am deploying a genercized version of it to multiple clients. I have created a script which dynamically generates a database to a server and creates all of the tables, procs, and views. I now need data from the old database, which will be imported into the new database. It's basically default users, lookup values, etc. What are some methods of getting this data out of the old server and into the new server? I was thinking about generating flat files with the data, then writing code to loop through and insert the data, but it seems very tedious. Do I have any other options? I cannot use Backup and Restore because I have no access to the new sql server's filesystem.Thanks.
I'm fairly new to MS SQL & I have a problem copying tables from one d/b to another. When I do an import or export select Copy tables, the tables & the data get transferred, but all the Identities are set to NO. My D/Bs have 188 tables & it's a pain to reset all of them manually.
Is there a setting I don't know about that will transfer the tables & maintain the Identity? (I'm using SQL Server Management Studio 9.0)
also i was wondering, that i have been reading that with this sp2 for sql server 2005 express you are able to use the dts wizard, is this true? i have a few databases in access that i would like to import into sql, would i have to create the tables first in sql then import or will the import also bring the tables & structure in?
Any idea where the quickest place to get Kirk Haselden's new book will be. I've seen a few different dates for the relaase. Amazon has 7/21, but they have fooled me before, getting books to me much later than I could have gotten the elsewhere.
Is there anyone I can bribe to get it now?
I love IS - the complicated stuff is simple and intuitive but the details are driving me nuts. Constant little errors on data types and stuff without any documentation. I'm spending hours and hours figuring these things out by trial and error.
Also a thank you to Kirk for his posts to the forum. I've assembled them in a list and have been reading through them. Very helpful.
Hi everyone. This is my first post. I have been going through Kirk Haselden's book - teaching myself SSIS. I like it so far. I have a question about some language used by Kirk that I want to check with the community. He talks about "Data Flow Versus Workflow" in the book (see page 110 if you have the book) but I dont recall reading his definition of workflow? Is he just referiing to "control flow" as "workflow"? I cant think of what else he might mean by workflow.
Hi everyone,I encountered an error "Need to run the object to perform this operationCode execution exception: EXCEPTION_ACCESS_VIOLATION" When I try to import data from Oracle to MS SQL Server with EnterpriseManager (version 8.0) using DTS Import/Export Wizard. There are 508 rowsin Oracle table and I did get first 42 rows imported to SQL Server.Anyone knows what does the above error message mean and what causes therest of the row failed importing?Thanks very much in advance!Rene Z.--Posted via http://dbforums.com
Hello, I would love to know where people are discussing the book Microsoft SQL Server 2005 Integration Services book by Kirk Hasleden.
I'm on page 41 and I'm getting an error with the example in the "SELECT "2004" FROM Sales.vSalesPersonSalesByFiscalYears" part because there is not a table called Sales.vSalesPersonSalesByFiscalYears in the AdventureWorks database.
I've scripted a sql trace for Sql Server 2000 and added the filename in the appropreate location andthe result is a column called ErrorCode with a value of 14. Can anyone tell me what this error code means and what could be infered about what I need to resolve it?
When a user finally confirms his order in a shopping cart application (using MS-Access as the backend), the items he has purchased are populated in a Access DB table named Orders & his personal details (like name, mail, billing address, shipping address etc.) are populated in another table named CustDetails. Both the DB tables have a column named OrderID. This column is the Primary Key in the CustDetails table & the Foreign Key in the Orders table. The Session.SessionID becomes the unique OrderID.After confirming an order, if the user refreshes the page, the app will try to populate the same Session.SessionID in the CustDetails table but since the column OrderID is a Primary Key column in the table CustDetails, it won't accept duplicate OrderIDs. Under such circumstances, an OleDbException will be raised.Since a DB app can throw other OleDbExceptions other than the one about which I mentioned above, I want to display custom error messages to the user. For e.g. if he refreshes the page after confirming his order, I want to display a message saying "Your order has already been placed".To do this, I tried using the ErrorCode property of the OleDbException class but what I found is the ErrorCode changes from time to time! Had a particular ErrorCode been assigned to the error, I could have done something like this (assuming that the ErrorCode for the above error is -12345 which is constant):Try 'some codeCatch ex As OleDbException If (ex.ErrorCode = -12345) Then Response.Write("Your order has already been placed") ElseIf (ex.ErrorCode = <some other constant ErrorCode>) Then Response.Write("Another custom error message") End IfEnd TryBut I can't do the above since the ErrorCode changes from time to time.So how do I display custom error messages to users under such circumstances?Of course, I can use the Message property of the OleDbException class but that would be a rather tedious workaround.
Hi, In my local , application is working fyn...but when i had uploaded in the file in Live and executed the SP's ,It is showing up the error 8144... Whene i had checked in google it is showing: has too many arguments specified: Msg 8144....But i had not passed to many arguments... (The same SP is working in local but not in live)... The related files also i had shifted to live...
This is the SP I Have used.... while Submiting iam getting error GO
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO
--- STORED PROCEDURE USP_CREATE_USER TO SAVE THE APPLICATION INFORMATION INTO DATABASE
SET @ERRORCODE=@@ERROR IF @ERRORCODE <> 0 BEGIN ROLLBACK TRANSACTION TRANSUPDATE SET @ERRORCODE=@@ERROR RETURN END ELSE BEGIN COMMIT TRANSACTION TRANSUPDATE SET @ERRORCODE=50002 RETURN END
SET @ERRORCODE=@@ERROR IF @ERRORCODE <> 0 BEGIN ROLLBACK TRANSACTION TRANSINSERT SET @ERRORCODE=50004 RETURN END ELSE BEGIN COMMIT TRANSACTION TRANSINSERT SET @ERRORCODE=50001 RETURN
END
END
GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
This is a request to the Microsoft SSIS staff. I did a search for the keywords in the description and can already see a lot of people frustrated about this.
A lot of well designed integration packages will route error messages to an error table or file. SSIS appends a couple of extra error columns called ErrorCode and ErrorColumn. At runtime, an extra column is visible in the DataViewer called ErrorCode - Description.
The description is hardcoded into the dtsmsg.h file in the SDK folder of Sql Server. This file is very hard to parse.
Can some from SSIS please post an XML or CSV file with all the error codes and descriptions for us to download please. This will be such a big help in debugging.
Hi,I'm trying to execute server-side trace with SqlServer 2000 oncluster. After scripting trace by Profiler I executed this script inQueryanalyzer and got error code 12. According to BOL this code saysthat file is not created but I don't know why, is there are anyobstacles which preventing to add this trace??Does anybody had that problem?If it helps I added script which I tried to execute:-- Create a Queuedeclare @rc intdeclare @TraceID intdeclare @maxfilesize bigintset @maxfilesize = 5exec @rc = sp_trace_create @TraceID output, 0, N'C:Profiler_result esult.trc', @maxfilesize, NULLif (@rc != 0) goto error-- Client side File and Table cannot be scripted-- Set the eventsdeclare @on bitset @on = 1exec sp_trace_setevent @TraceID, 10, 1, @on/*here are n-setevents*/exec sp_trace_setevent @TraceID, 43, 35, @on-- Set the Filtersdeclare @intfilter intdeclare @bigintfilter bigintexec sp_trace_setfilter @TraceID, 1, 1, 6, N'history'exec sp_trace_setfilter @TraceID, 1, 1, 6, N'move_history'exec sp_trace_setfilter @TraceID, 10, 0, 7, N'SQL Profiler'exec sp_trace_setfilter @TraceID, 35, 1, 6, N'kis'-- Set the trace status to startexec sp_trace_setstatus @TraceID, 1-- display trace id for future referencesselect TraceID=@TraceIDgoto finisherror:select ErrorCode=@rcfinish:goThanks in advance for any adviceRegards,Bartolo
SSIS automatically adds the columns ErrorCode and ErrorColumn to the error pipe routing bad rows. However, both these columns appear to be meaningless. We need to translate the error column to the actual problem column and the error code to a meaningful error. ErrorColumn is the more important issue for us. The question is 'Are these just useless columns? If not, how do we translate them into something useful?'
Installed SQL express 2005 w/Studio Manager. Everything installed Ok except got an error IIS was not running or not installed. When installing a software program, when it tries to create the database I get an error at the initialization:
An error has occured while processing an SQL statement. Please refer to the system administrator guide for further assistance. ERRORCODE:37000 ERROR:CREATE DATABASE failed. Some of the file names cound not be created. Check related errors. SQL STATEMENT CREATE DATABASE xxxx
Has anyone seen or know a fix for this? Thanks in advance.
HiI have been working since 2 days to device a method to export sql tableinto csv format. I have tried using bcp with format option to keep thecolumn names but I'm unable to transfer the file with column names. andalso I'm having problems on columns having decimal data.Can any one suggest me how to automate data transfer(by using SP) andretaining column names.ThanksNoor
I have another problem, this time with a flatfile source component. The file is pretty simple organized and in fact everything works as expected.
The file itself comes from an FTP server, so it is not available at designtime. For setting up the flatfile source i downloaded it, but afterwards i delete it, set 'dalayvalidation' to true and try to execute.
FTP download works fine, the file is there but then i get the errormessage:
Copier ErrorCodes [586]: The data type for "output column "Flat File Source Error Output Column" (610)" is DT_NTEXT, which is not supported with ANSI files. Use DT_TEXT instead and convert the data to DT_NTEXT using the data conversion component.
When i try to set the datatype of the Error Output Column (610) to DT_NEXT i only get an errormessage telling me that this would not be a valid value for this property.
The only chance i have to get it working again is to completely delete the flatfile-source, readd and setup it again, then everything works... but only until i remove the files and try to download them via FTP. It's strange :-( and annoying.
Within my SSIS packages I use a logging logic quite similar as the one described by Jamie Thomson here : http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx
But I still have a small "problem". When my package end with success the ErrorCode returned at the OnInformation event handler level is :
0x4001100B
1073811467
DTS_I_COMMITTINGTRANSACTION
Committing distributed transaction started by this container.
Instead of :
0x40013001
1073819649
DTS_MSG_PACKAGESUCCESS
Package "__" finished successfully.
Another example.
When there's an integrity constraint violation, I've got the following ErrorCode returned :
I have a column in a .txt file that I am trying to import. The field shows the time of a transaction in the format of "12:20 AM" Does anyone know a way of importing the field as a time field as opposed to a VARCHAR type? I have tried importing it as a datetime type, but this doesnt seem to work.
I have a spreadsheet that has all of the data in the first column. The data is delimited by asterisks and there are no column headings. My goal is to import the data into a SQL table. I get the error message "External table is not in the expected format" when I try to select the name of the Excel sheet in the Excel Source Editor. I tried reading using a flat file connection instead of Excel connection, but that didn't work.
In Excel, I can use the Text to Columns feature to convert the data to columns in the spreadsheet. But I have to go into the file manually to do that. Is there a way in SSIS to do the same thing automatically? Or is there a way to save the XLS as a TXT file? Then, I could just use Flat File Connection to read the delimited data.
I'm trying to write an SSIS package that exports a table that has changing column names to an excel file. The column names change due to the fact that the table is created by a pivot daily. the only thing I'm missing is the ability to dynamically map the tables' columns to the excel destination. Is this possible?
I read in another thread that "It is not possible to create packages or new objects within packages using SSIS." I also read in the books online that "The input and the input columns of the Excel destination have no custom properties." To me this means that I cannot programmatically create or remove columns in the excel destination. Please tell me I'm wrong. So, to summarize my research so far. In writing an SSIS package, I cannot programmatically create a new excel destination object and I can't manipulate an existing one. I hope I'm wrong. Can anyone help me? (and please correct any wrong assumptions I may have stated)
I'm really new to the whole database deal (as well as VB.net) - specifically with the capabilities surrounding VB and SQL Server 2005. My question is open to any recommendations...
What I have is an application that a user uses to create 'new' products. They are presented a form to enter the information regarding the product they wish to create. They enter the details of the product and also locate an image that represents the product, too. Currently, this application saves the product information (including binary image data) into a SQL Server 2005 Express Edition database. This application and database reside on a client pc. What I need to do is to be able save updated and newly created product data into a file of some sort. That file will make its way to a memory stick (USB) and then be transported to a 'field' machine. Quite simply, what is the best way to do this? Are there walk-throughs on this sort of thing? The target database is also SQL Server 2005. I thought I'd post this question on here to get the best design ideas... Any help would be greatly appreciated.
I am transfering a database from sql server 2000 to sql server 2005 using copy database wizard. I have this error coming up error
Error: ERROR : errorCode=-1073548784 description=Executing the query "EXEC dbo.sp_grantdbaccess @loginame = N'Testusername', @name_in_db = N'username' " failed with the following error: "The login already has an account under a different user name.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC} StackTrace: at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer() at Microsoft.SqlServer.Management.Smo.Transfer.TransferData() at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()
How do i handle this error...looked online but didn't find right answers...
I have an OLE-DB Command transformation that inserts a row. If the insert SQL command fails for some reason, I use the "Redirect Row" option to send the row to another OLE-DB Command transformation that logs the error on that row to a "failed rows" table. In this table I log the ErrorCode and ErrorColumn values that come with the error path from the first OLE-DB Command.
OK, that's all working great. However, here's the kicker: there's no error description value. The ErrorCode value, naturally, is the decimal form of an HRESULT--for example, -1071607696. Without some further information, however, this code is not useful for troubleshooting.
Has anyone figured out a trick here? I'm not even certain that this is an SSIS HRESULT, since it could for all I know be from the OLE-DB layer, the database layer, or somewhere else.