How to refresh OLE DB Destination Editor Table Selection - sql-server

I'm in a standard SQL Server Integration Services Package. I have created a connection to my local db instance. I drop a data flow task and then using a OLE DB source and Destination, I start creating my expected simple data flow.
Problem: I create a new table to dump my data from the source in SSMS and go back to visual studio's and look for it in the OLE DB Destination -- Name of the Table or the view drop down menu option and it's not there.
How do I refresh the cache without needing to close the ENTIRE program and reopen it?
I've asked some colleagues and they say they just close the entire program and reopen. So, at my work, I'm not the only person having this problem.
What doesn't seem to work:
Tried to change connections in the drop down
Tried to delete the destination connection and recreate
Close the package and reopen
Close the solution and reopen
CTRL+SHIFT+R
What has worked:
Close the entire program, visual studios, and reopen
This hints to me that it's somehow cached in visual studios.
Is there a easier way? I feel like there has to be... this is just silly that I have to close the entire program each time I add a table ... I reject this reality and wish to create my own!

First of all check that you are not working in offline mode.
If you are not working offline, just try to change the selected connection manager from the drop down list and re-select the initial one, or just change the data access mode and re-select the initial one. I think this may force refreshing the tables in the list.

Related

SSIS Connection manager issue

I created a Project within SSIS it would take data from a table within a db, do a data conversion and then insert into a Excel spreadsheet. it was working fine with no issues for about a week but now I'm having issues with th e connection manager. I'm getting the data fine from the DB its when it comes to the excel spreadsheet. I have tried doing the project again but still doesn't work. I create a new excel destination within SSIS > a new connection manager go to folder destination and state what I want document to be called. nothing is available from the name of excel sheet drop down and when I select NEW it just closes window. I'm not sure what has gone wrong is it a permissions thing? I have attached screenshot of this and the error when I run application
error when deploy application
i think something must have changed with access to the db. if I use the import wizard and select OLE DB for SQL server as the Datasource nothing is appearing in the server name drop down and If I manual enter it I get an error
Try this:
Step 1) Navigate to Project-> [PROJECT_NAME] Properties.
Step 2: Navigate to “Debugging” option from left panel and from Right panel change Run64BitRuntime value to false.

Re-linking Tables in Access Database

First of all - my VB skills are almost non-existent so any suggestion/ideas should be a little more elaborate if possible. Here is the problem I am facing -
We have linked database tables and queries in Ms Access 2010. Now a copy of the database has been created on a new SQL server. So I want to re-link the tables so that access points to the tables on the new SQL server. Right now, all the tables are corresponding to the database on the old server. Here is what I have tried -
Open XYD_Outreach_Dev.accdb on the network (this is the dev version of access that we use)
Form a new ODBC connection which creates a new_sql_server.dsn file corresponding to the new SQL server (2012)
Go to External Data -> ODBC Database -> Link to the data source by creating......
Link to a table say - tblAbriContacts
This creates a new linked table dbotblAbriContacts
I rename it to tblAbriContacts at which point Access asks me -> table already exists. Do you want to replace it? I click yes and the table gets replaced
I hit the save button, close the application and restart it. The tblAbriContacts is pointing to the old database again
What could be the issue? Please note that I have to do this for all the database, lookup and junction tables.
Do I have to change some connection string which the access points to as soon as it is launched?
If I try the Linked table manager, nothing happens, it says "All selected tables were successfully refreshed". But nothing happens. I guess that's because the tables haven't been moved from the old database. A new copy of everything has been created on the new server.
Please help me out with this. My work is stuck because of this reason.
Can you please check if there is a module or other vba file created and file's on_load event has some code which to assign the connection string for all objects (tables and SPs) and refreshes it every time you restart the application.
If you see the connection string there, you might need to replace it with the new one.

Command(s) completed successfully but... the tables are not created

I backed up my database table's and entire schema into .sql script using Visual Studio's Database Publishing Wizard.
I then tried to re-create those tables on another PC, not before re-creating the database itself, with the same exact name and everything (using a script that I created via SSMS's Script Database as).
I then open that tables .sql file using SSMS and execute it.
SSMS reports:
Command(s) completed successfully
But examining Object Explorer reveals that no tables were created.
Why is this happening?
What have I missed?
I've just been having the exact same problem symptoms also using Visual Studio's Database Publishing Wizard, - but with a slightly different cause / fix.
Even though SQL Server Management Studio says it is connected to the correct database (in the drop down in the ribbon, and in the status bar of the window), it wasn't actually connected to anything.
To identify and fix either:
SELECT DB_NAME() AS DataBaseName
If you get
master
(or any other unexpected database name) as the result, then you are connected to the wrong database and should select the correct DB from the dropdown. This was the cause of your problem.
If you get
Command(s) completed successfully
then somehow you aren't connected at all - this happened to me.
To fix, click the "change connection" button to disconnect and reconnect.
Check whether you have selected database. Most of the times we execute query in Master db by mistake.
-- Mark as answered if this answer really answered your question
Check if you are running "Execute" or jut Parsing the code. It was a late night, I was tired, and kept running a query to create a table, successfully, but no new table. The next day with a clear mind i noticed that i was not actually running the query, i was parsing it.

adding a new column in SQL SERVER but it is not showing up in access

access is the front end and sql server 2008 is the backend
i am opening the specific table in access. i have no problem editing data in this table using sql server and then displaying the changes in access; however, when i add a new field in sql server, the changes are not reflected in access.
i am opening the table as a datasheet and it is not showing the new field that i added in access. ive opened and closed the file and still doesn't work
anyone know what's going on here?
You might need to refresh the SQL Server table in Access using Linked Table Manager.
I cannot add comment but I like to add...
since it irritates me.
It is the same story not only in MS Access, it is the same in SSMS (MS SQL Server Management Studio, even from the latest MS SQL Server 2008 R2) with its own "native" mdf databases and tables from it.
If to change the content of a table through another window / tab or instance of SSMS (by TSQL, or by interactive editing) then the content shown in already opened for interactive editing table is not updated, though it is updated by non-documented Ctrl+R.
And it is not available in GUI of SSMS (no menu entry, no button, etc.)!!!
Any browser/webapp can be easily configured to update the content but not MS desktop IDE GUI!!!
But if to ALTER TABLE, for ex., to add a column, then already opened tab with table (SSMS) cannot reflect the changes (cannot show altered table, for ex., with added column) even by pressing Ctrl+R.
It is necessary to close tab (window) with table and reopen it
(right-clicking on table in SSMS ObjectExplorer --> Edit tio 200 rows)!!!
I remeber I opened a bug in Microsoft Connect feedback on it and it was closed as this was a feature "by design"!
Still IMHO it is a bug and requires brute force (/ugly GUI actions) to bypass it
This SO Q&A seems to cover similar territory.

How Do I Copy and Overwrite a Database in SQL Server 2005 with SSIS?

I HAVE to be missing something really simple here!
I have a database in my development environment called Project.
I have a database in my test environment called Project_UAT.
I've created an SSIS package that successfully copied my database from Project to Project_UAT. I'm pretty sure this eliminates most permission and configuration issues.
Now, I want to re-create the package and this time allow it to overwrite the destination, which is Project_UAT. This is simply because from time to time I want to click a button in the Microsoft SQL Management Studio that pushes the new database schema, data, users, and everything, out to my testing environment. I WANT to overwrite the data.
So I create the package just like I did before, but this time I specify the already-existing database name as the "Destination database" and I select the radio button called "Drop any database on the destination server with the same name, then continue with the database transfer, overwriting existing database files."
I click Next, and what does it tell me?
"Database name already exists at destination"
Well, I KNOW! I just told you I want to overwrite it!
How do I make this work?
Not sure if I am missing the point but why do you not use a task to drop/delete the existing database prior to your deployment step?
Perhaps you could qualify the SSIS Component Tasks you are using within your SSIS package.
Cheers, John
You can add an Execute SQL Task into the Control Flow to drop the database. Just set the SQLStatement property to
DROP DATABASE Project_UAT
After this step is executed the new copy of the Project_UAT database won't have to overwrite the old one.
I had this problem because I deleted the database before hand. The database is not in the destination folder, but SQL Server 2008 still thinks it is there. Refresh didn't work. And SQL Server wouldn't honor the selection of "Drop any database on the destination server..." It just complained that the database already existed.
Guys this is a common sense solution. A lot of complexity for nothing.
Backup the destination database you want to copy to and delete the destination database.
Open the copy database wizard and follow the steps.
Use the detach and attach method.
When you get to the configure destination database use the option if destination database exists select drop database on destination server with same name.
Now it will continue to the next screen.
But this only works if you delete the destination database first before starting the wizard.
I may have missed something but this worked for me.

Resources