SQL Server 2014 : can't export Varchar(1000) in a query to Excel 2007. Works for Excel 97-2003 - export-to-excel

I am working with SQL Server 2014. I have applied the Microsoft Access Database Engine 2010 Redistributable to my server. I have tried both the 32-bit and 64-bit drivers. With the 32-bit driver, I can export to Excel 97-2003 without a problem. If I try to export to Excel 2007, my Varchar(1000) column fails with the following error:
Error 0xc0202009: Data Flow Task 1:
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x00040EDA.
An OLE DB record is available.
Source: "Microsoft Access Database Engine"
Hresult: 0x80040E21
Description: "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.".
(SQL Server Import and Export Wizard)
If I go with Varchar(255) instead of Varchar(1000), it works fine in both versions of Excel. The column maps from Varchar(1000) to Longtext and I set it to ignore truncation errors.
I have run into this with various projects, this project requires the full length of the column and truncation is not accepted. I have tried running the wizard from SMSS and from the Start menu (both 32-bit and 64-bit, although it seems SMSS runs the 32-bit version if the 32-bit driver is installed).
I could probably stick with Excel 97-2003 for a while, but eventually it will go over 65,536 rows and will have to go to Excel 2007. I cannot export to csv, as my client requirements are that it be placed into an Excel file. They would rather have .xlsx files, but will accept .xls files for the time being.
The export needs to be run on a regular basis, so I need to save the package as a .dtsx file.
Does anyone have any ideas on how to fix this?

One of the workarounds I found on a website sais:
You have to include the account you use to execute the package in the
performance counters group.
But I don't know how to apply this in SSIS, I will look for this and try to update my question.

Related

Oracle Developer Tools (ODT) & Visual Studio Integration

I've installed the ODT for Visual Studio 2015 (I've also tried VS2013) in hopes of using the "Oracle Database Project" but experiencing some specific error messages that don't appear to be very common.
When I browse the database via the Server Explorer, there is an option for you to be able to right click on a Relational Table and click "Generate Create Script to Project...".
However, when clicking this option I get a very non-specific error message and cannot work out why;
"Create script was not generated to Project for some of the selected object(s). See the 'Oracle Database Output' output pane for more information."
When I look at the "Oracle Database Output" window I get the message;
"Script Generation failed - Internal Error."
For here-on-in, it's gets very frustrating to find out what's wrong and to debug this non-descriptive error message.
What's most interesting is that the script generation function works for other database objects such as views & procedures, it just fails to work for database tables.
Has anybody experienced this error before? I'm wondering if it's a driver issue of some sort! (I have the oracle 11g client installed, and just tried with a specific ODAC/ODT combination package which appears to also install the 12c client, connecting to an Oracle Elements 11g server)
Any help appreciated, Thanks.
I have this problem too.
I was able to Create the scripts earlier, but now I cannot.
I did some investigating and decided this is not a problem with the oracle database. It is something to do with the state of VS.
I restarted VS2015 and I could create scripts again.

Can't generate table from Oracle Designer 6i

a little background, I really don't know any technical terms from Oracle. My company have a pre built machine and I'm trying not having to go there backup my files and lose a day of job because I cant.
Recently I'm learning how to use Oracle Designer (6i) to build a diagram and later a table so I can request it to be created... While using the software it requested to install some file for the repository... after doing it, It screwed up every Oracle product I was using... I couldn't connect to PLSQL or even the designer...
After fixing some registry to point to the right TNSNAME and manually adjusting PLSQL, I managed to access both. The problem in hand is in oracle Designer at the "Designer Editor", when I right click a table and select generate, the message bellow shows up
Message
-------
CDD-23564: The file "C:\ORACLE\DSG6I\BIN\cds61.dll" could not be loaded or does not exist.
Cause
-----
The specified file or one its dependent files could not be loaded.
This may be because a file has not been installed, or is not
correctly defined in the system registry.
As an example dependency, the Forms Generator files require the
Form Builder files installed as part of Developer.
Action
------
Check the registry settings for the location of the required
file. Also check the product and any required dependencies
e.g.Developer have been installed correctly.
If necessary, try reinstalling.
The dll mentioned IS and EXISTS on the mentioned folder.
Considering I don't have the Oracle Developer 6i intaller, what can I do? What registry entry should I update?
Designer 6 is long out of support. Oracle has a free tool, SQL Developer Data Model, which does not break.
Even Designer 9i was flaky and would crash at random intervals and poke along with larger schemas. Anything over hundred tables could take days to edit. Ah, good times...
I managed to fix the problem by copying and replacing the whole ORACLE_HOME\DSG6I folder (in my case c:\Oracle\DSG6I, for those confused in terms like me) and the oracle system registry (regedit > HKEY_LOCAL_MACHINE\SOFTWARE\Oracle) from a coworker machine!

SSIS Package stuck "Validating Excel Source" in Visual Studio 2010

I have a quarterly update package that I run from the backend of our system that uses an Excel (2007 format) document as a data source. The package stages the data from the Excel document to a table within the database, where it is processed and loaded in the production system.
Today, I received the Q2 update for April 2015, and attempted to run the new file into the staging system through Visual Studio as I have in the past. But for some reason today, VS / SSIS appears to be stuck "Validating Excel Source". I've let it sit for up to 10 minutes, before having to kill my Visual Studio instance through Task Manager.
The source document is small and relatively uncomplicated on 6 columns and less that 300 Kb in size, so I can't understand the validation issue all of a sudden. It appears to be the same excel version and format as my previous runs.
This package has been untouched for the better part of year, only having to change a series of parameters for each quarterly run.
I've deleted the connection managers and excel components from the package and recreated them but still appear to have the same issue. I've also recreated the source document.
I attempted tp disabled the DelayValidation and ValidateExternalMetaData properties, in hopes that it might give me a meaningful error dialogue, but have yet to get past the "Validating Excel Source" message.
Any input would be appreciated, Thank you.
I appear to have found a resolution to the issue.
It appears that a recent update to my installed Office suite altered the driver for Excel on my machine.
The following articles helped me resolve the issue, but as it turned out I needed to reinstall the Office 2007 System Driver: Data Connectivity Components...(linked in the 2nd article)
Once installed I was able to reopen my solution and view the Excel document.
Thank you for the assistance.
Using Excel 2012 file in Excel Connection Manager
How to fix errors: "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"
Remove the excel file that the connection manager is looking for from the directory that it is pointing to. Once you do that the Validation of the Excel source should fail when it can not find the file it is looking for. This should allow you to get into the package and set Delay Validation = True in the properties.
The package validates the excel connection manager the same as it would any other OLE DB connection manager. It confirms connection and then runs your statement to validate the return of data. If you take away its source it should flame out quickly.
I have found that background processing on your machine can block this validation or processing of the request the same as a priority query might in SQL. If you machine is in a state with a number of priority tasks running this validation is put on the back burner and can and will take forever. In cases like this the connection used to the source being used to validate with either disconnect or timeout and it is not handled in the UI so it just hangs and locks up.

VBOLEDB data connection not recognizing all the .DBF files

I'm using Visual Studio 2013 and I'm trying to import some .DBF database files into a dataset. I'm using the OLE DB FoxPro Data Source Provider and it does work, it just will not load all the .DBF files using the Data Connection so that I can choose which files to add as tables in my dataset. It's as if it doesn't even see them. I cannot use an ODBC connection because it crashes Visual Studios every single time for whatever reason. However, when I add it as an ODBC connection, it does recognize all the files like it is supposed to. I just can't use them or it will crash. I've been working on this for days, so please help! It will not allow me to add these files using the Microsoft Jet 4.0 either.
Without seeing your connection string, I can only suggest posting it. However, I would also preemptively guess that your connection string is pointing to a specific .DBF file which connects to a single table.
Your connection should point to the LOGICAL DRIVE / PATH and not explicitly name a .dbf file.
The other possibility is that if the files are part of a database CONTAINER (via .DBC file extension), then you should be able to query and table in the database container.
What MAY be failing is if the table is part of a database container, and it has long column names beyond the 10 characters of the older / free-form table formats, that MIGHT be preventing querying for that reason.
Let's see your connection information as best as you can without any possible id/password information.

SQL Developer - No readers registered for SQL type error

I am using Oracle 11g. I had exported data using the installed version of SQL Developer to a sql file called "export.sql". Now, I have downloaded the new version which is 3.1.07 and when I try to import data by clicking on the tree view and choosing Tables | Import Data and navigating to "export.sql", I get the following error:
no readers are registered for the sql type
When I first started the application it asked for the path to java.exe and I have shown that path and application started. I have the started the application from the path where it was downloaded (C:\users\kaushik\Downloads\sqldeveloper)
You can call the file directly from sql developer.
Example: If you saved you file to c:\Oracle\MyBackups\Export.sql
Then from within Sql Developer, connect to your database and use the sql command:
#C:\Oracle\MyBackups\Export.sql
and that will execute the Export.Sql script.
If you have a valid SQL file, you simply need to execute the script. Open the file (File | Open and navigate to export.sql), hit the Run Script button (F5 on Windows), and choose the connection you want to use. The Data Import Wizard supports a number of different file formats (Excel, CSV, etc.). It doesn't support SQL files. If you want to ask the developers why they don't support SQL (or why they use the general file navigation dialog rather than using different dialogs for different sorts of files) you can ask them over in the SQL Developer forum on OTN. I assume the problem is that most SQL scripts contain much more than simple INSERT statements and it would be challenging to figure out whether any particular script was actually just a bunch of INSERT statements that could be used to import data.
Yes, SQL Developer is written in Java so you need to have an appropriate version of the JVM installed. Different SQL Developer download options include a bundled JVM or you can download a smaller file and use an already installed JVM.
One of oracle client tools to make session to database is sqlDeveloper and its graphical interface tool Programmed with Java Lang and its installed independently from oracle_home its a stand alone product and Of Course it needs SDK Or JDK to work
make sure to set the path and check it
read this link http://www.ehow.com/how_5127784_set-java-path.html
all of this if sql developer didn't run and other similar problem
this to answer
Is JDK is needed or what ? Yes
use sql Developer higher version
i am upgraded to Version 20.2.0.175
issue resolved

Resources