SSIS 2005 Saving Problem - SQL Task Editor - ssis

I have a relatively big SSIS package which I'm trying to edit. I basically need to update a query on an Execute SQL Task. Problem is the solution is not saving the query when I do the change. I open the SQL Task, change the query and close the task. I verify the change before saving and it's there but as soon as I click on the save button the change on the query disappears.
I verified for opened instances of the package but there are no other sessions on the machine. It does seems to be saving correctly on other packages included in the solution, but for some reason is not saving on my main package.

Make sure you have a backup copy of your package before you try this:
close the package (but keep the solution open)
right click the package and view code
search for your query and replace the query text with your new query text
save it
now double click the package to open it up like you normally do and view the query

Related

Issue while executing package

enter image description here
I am not able to execute this package? i fixed run 64bitrun time to false and used Provider=SQLOLEDB
my source is oracle and destination is sql server
Your package is set to Work Offline mode. You can change this by going to the menu bar. This feature is added to avoid long open times when packages are large.
SSIS -> Work Offline
http://agilebi.com/jwelch/2009/05/12/setting-work-offline-without-opening-the-project/

Restore unsaved MySQL Workbench scripts?

I had a bunch of unsaved scripts open. Today I restarted MySQL Workbench, there was an error message and now the scripts are gone. Is there a way to restore them somehow?
You can try to find your script in History Output. Check this answer: MySql workbench query history ( last executed query / queries ) i.e. create / alter table, select, insert update queries
If the save snapshot option is enable (this can be done by --> Edit>Preferences>SQL Editor>Save snapshot of open editors on close) then you can find the data in \%APPDATA%\MySQL\Workbench\log\sql_actions_unconnected.log. It is a log file, you can copy your code and paste it in a code editor which would put the code in the right format
This just happened to me and thankfully it turns out MySQL Workbench does actually autosave tab contents to disk. You can find them starting at your base configuration file path which is described here. The path to the scratch files is something like this:
{BASE_CONFIG_PATH}/sql_workspaces/{CONNECTION_NAME}.autosave/
Inside that folder is a bunch of .scratch files, looks like one per tab you had open for that connection. They're named with UUIDs, but just drop them all in a text editor and you should be able to find your lost tab contents pretty quickly.
If they're gone, they're gone, unfortunately. You should save them before you exit WorkBench (CTRL+S), since it has been very prone to errors like that, at least to me.

mySQL ,sql file netbeans

How do I execute a .sql file using mysql and netbeans.
I am doing a course that requires me to interact with an .sql file that they have provided but the good guys at the Fitzwilliam institute haven't deemed it fit to explain how to use this file.
If can tell me that would be great.
I have already set up the basic database using netbeans and mySql.
Thank you
Ok, if you have created a connection to your MySql db, then things are pretty forward. Go to 'Services' tab, expand the Database options. Right click the connection you have created. Click 'Connect' to connect to the db. And then right click your connection and click 'Execute Command...'.
Write the command in the editor, and click the 'Run Sql' (Ctrl+Shift+E)
if the sql file is too large, netbeans cannot open it. In this case you can use the tool ij (link) which comes with Derby:
Start ij commandline tool and then do something like this:
ij> connect 'jdbc:derby:MyDbTest;create=true' user 'peter' password 'parker';
ij> run 'sqlscript.sql';
Running an SQL Script
Another way to manage table data in NetBeans IDE is by running an external SQL script directly in the IDE. If you have created an SQL script elsewhere, you can simply open it in NetBeans IDE and run it in the SQL Editor.
For demonstrative purposes, download ifpwafcad.sql and save it to a location on your computer. This script creates two tables similar to what you just created above (Counselor and Subject), and immediately populates them with data.
Because the script overwrites these tables if they already exist, delete the Counselor and Subject tables now so it becomes obvious that new tables are being created when the script is run. To delete tables:
Right-click the Counselor and Subject table nodes in the Database Explorer and choose Delete.
Click Yes in the Confirm Object Deletion dialog box. Note that the dialog box lists the tables that will be deleted.
When you click Yes in the Confirm Object Deletion dialog box, the table nodes are automatically removed from the Database Explorer.
To run the SQL script on MyNewDatabase:
Choose File > Open File from the IDE's main menu. In the file browser navigate to the location where you previously saved ifpwafcad.sql and click Open. The script automatically opens in the SQL Editor.
Make sure your connection to MyNewDatabase is selected from the Connection drop-down box in the toolbar at the top of the Editor.
Connection drop-down box in the SQL Editor toolbar
Click the Run SQL (run SQL button) button in the SQL Editor's task bar. The script is executed against the selected database, and any feedback is generated in the Output window.
To verify changes, right-click the MyNewDatabase connection node in the Runtime window and choose Refresh.
The Refresh option updates the Database Explorer's UI component to the current status of the specified database. Note that the two new tables from the SQL script now display as a table nodes under MyNewDatabase in the Database Explorer.
Choose View Data from the right-click menu of a selected table node to see the data contained in the new tables. In this manner, you can compare the tabular data with the data contained in the SQL script to see that they match.

How do I automate a saved import in a macro in Access 2007?

I have created a macro to run a saved import (a file imported from Excel into Access 2007). When I run the macro, the saved import runs and the following happens:
A "Manage Data Tasks" window pops up.
I have to choose from the following options: Run, Create Outlook Task..., Delete, and Close.
If I select Run, the next pop-up asks, "Overwrite existing table or query?"
I have to choose: Yes or No.
Another window pops up and says, "All objects were imported successfully."
I have to click the OK button.
I have to click the Close button on the "Manage Data Tasks" Window.
Is there any way that I can automate all these button clicks if they are always going to be the same? (The bold faced buttons are the ones that I'll always be clicking.)
If you use the DoCmd.RunSavedImportExport Method you won't have to interact with the Manage Data Tasks dialog at all.
DoCmd.RunSavedImportExport "YourSavedImportName"
You will however have to deal with the possible errors that get raised. For example if your source file is unavailable you will get an error like
Run-time error '3011':
The Microsoft Office Access database engine could not find the object
'Sheet1'. Make sure the object exists and the you spell its name and
the path correctly.
This may be too simple, but can you use the Setwarnings:off command in your macro before you import.
Now I would like to see the macro to automate the import

SSIS: Why is this not logging?

I don't know if this will help, but i enabled logging to a text file called test.txt on my C Drive.
Public Sub Main()
Dim rowsProcessed As Integer = 100
Dim emptyBytes(0) As Byte
Dts.Log("Testing, Test 1,2,3", rowsProcessed.ToString, emptyBytes)
Dts.TaskResult = ScriptResults.Success
End Sub
You have to go into the SSIS->Logging menu and tick checkboxes like a crazy checkbox-ticking-ninja to get this to work.
There are various checkboxes that have to be checked, and some of them only appear when you click on the script tasks, so it took me a while to figure this out:
First, enable your logging provider (that you have set up, right?) by ticking it on the Providers and Logs tab.
Then switch to the Details tab (which shows various events that you might want to log)
For the DTS.Log() method you need the ScriptTaskLogEntry event, but they only show up when you click on Script Tasks in the tree on the left.
So, click each of your Script Tasks in the tree on the left, enable it for logging, and then tick the Script Tasks event on the details tab.
Also make sure your logging provider is ticked for each script task
See also: http://msdn.microsoft.com/en-us/library/ms136131.aspx
This is an old question and #codeulike has answered it well but I would like to add a note about the logging behavior in debug mode, specially for someone new to SSIS or SSIS logging (like me) - Assuming you have all the configuration in place required for logging, if execute a selected task that you expect to log, it still will not log. Only if you execute (or debug) the entire package, then the logging will work.
If you are sure you have done configured everything correctly and still cant see your dbo.sysssislog in the database you selected, then check in the following
YourDatabase > tables > system tables
you can find your loggings there.
its my first time doing package loggings and configured everything correctly and could not see that dbo.sysssislog in the database it was supposed to do loggings and banging my head for half an hour when i realised it was in system tables of that particular database.
I realize that this question is rather old, but maybe it helps someone.
I ran into the same problem - while debugging in Visual Studio my textfile logging provider just did not write into the configured logfile.
My logfile was in the directory "project-directory/bin/development".
After changing the path to "project-directory-name"-root (eg. "/project-directory-name/test.txt" it worked.
I cannot explain this - it is just what I have observed.