How to get SharePoint to “see” new SQL Views, Tables and Stored Procedures in SQL Server? - sql-server

I’m trying to define new external content types, I’m able to connect to SQL Server and define external content types from tables, stored procedures and views that were already in the database.
The problem I’m having is that I created a new SQL View in SQL Server with the data I want, but when I try to define a new content type, SharePoint doesn’t show me the new SQL View in Data Source Explorer.
I thought it could possibly be the way the SQL view was created, so I created a new test Table, a new stored procedure but that didn’t work either.
I tried “Refresh All” and deleting and re-creating the connection in Data Source Explorer, but nothing seems to work.
It seems that any views, tables or stored procedures that I created after a certain point in time are not available in SharePoint
I’m using SharePoint 2010 and SQL Server Express Edition with Advanced Services (64bit)
Any help is greatly appreciated.
Thanks in advance,
Silvio

Related

How can I update existing SQL datasources (Live) to connect to correct views (reconnect) in Tableau Deskop?

I have one question. I am new in Tableau and I have to update existing SQL datasources (Live datasources) to connect to correct views (reconnect) in Tableau Deskop, because of some mappings/new data that were added to SQL database.
For the same reasons, I have to also create new Tableau datasources.
How do I do that, update existing SQL datasources and create new datasources? Also, for creating new datasources is it possible to do it from Tableau Server or just from Tableau Desktop?
Thanks.
I believe Tableau only allows you to create data sources in the desktop environment.
If your SQL source is using a SQL statement you can alter your query to bring in the new data and then refresh the extract.
It's worth noting that the desktop extract is no longer used once you've published your workbook to the server (until you need to make more changes in the desktop environment).
I find making changes on Tableau server limited, so it's almost always best to make significant changes on desktop.
Also, if you're changing to new data sources, once you've loaded the data into Tableau, in the Sheet view you should be able to right click on one source and choose to point your views to the new source.
It all depends on the desired result.

Automatically update SQL Server database from tables in MS Access

I'm new to SQL Server and trying to automatically update tables in SQL Server from tables in MS Access.
I have an Access database of metadata that must be kept updated for sending records to other groups. I also have a database in SQL Server which also has these same metadata tables. Currently these tables in the SQL Server database get updated manually by exporting the Access tables as Excel files, and then importing them into the SQL Server tables.
It's not the most efficient process and could lead to errors in the SQL Server database if someone forgets to check that they are using the most recent data from Access. So I would like to integrate some of the tables from Access to my database in SQL Server. Ideally I would like for the tables in my SQL Server database to be updated whenever Access is updated or at least update the tables automatically in the SQL Server database when I open it.
Would replicating the Access tables be the best? I am using SQL Server 2014 Developer so I think I have this capability. From my understanding, mirroring is for an entire database not just pieces of it. However, I do not want to be able to alter the metadata from SQL Server and have it reflected in Access. I cannot tell if reflecting the tables would do this...?
I also looked at this post about writing multiple insert statements but was confused (What is the best way to auto-generate INSERT statements for a SQL Server table?). Someone else suggested importing all the data into SQL Server and then using an ODBC driver to connect the two, but I'm also not sure how this would update the database in SQL Server anytime Access is updated.
If you have any suggestion and a link to easy to follow tutorial I would really appreciate it!
Thanks
In Access, go to 'External Data', ODBC Database, and connect to the SQL Server database directly - make sure you select 'Link to the data source by creating a linked table' on the first page of the wizard. Now, this linked table is available in Access, but is actually the SQL Server table.
Get rid of the local Access tables, using the new linked tables in their place in whatever queries, forms, reports, etc that you have in Access.
Now, any changes to the tables you see in this Access db ARE changes to the SQL Server database.

What determines which local SQL Server cache tables can be cached?

I have a c# Visual Studio app. I connected to an existing SQL Server 2008 database and the Studio created a local cache (.sdf file) for me, caching all existing tables.
Now I added 2 additional tables the the SQL Server database and want to update my DataSet with these, but the wizard does not allow me to select the new tables as being cached. On the "Choose Tables to Cache" wizard page, I cannot check all tables to be cached.
Update: Now it allows me to select one, but not the other of the new tables.
What determines whether tables can be cached? How can I makes this work, with or without the wizard?
Ok, I found the answer.
The "How to: Configure Data Synchronization to Use SQL Server Change Tracking" help page (http://msdn.microsoft.com/en-us/library/cc714038.aspx) talks about creating and configuring a Local Database Cache Template (.sync file).
I never saw the template configuration before because the Studio configured this for me automagically. I found the .sync file in Solution Explorer and can open it in the Configure Data Synchronization dialog. When you add a new table to by synchronized here, there is also a link to the "Which tables can be cached" help page (http://msdn.microsoft.com/en-us/library/bb763049.aspx).

SQL Server Stored Procedure Folders/Grouping

We are currently using SQL Server 2000 but will soon be moving to 2008. I am looking for a way to group related stored procedures into folders. SQL Server 2000 does not seem to have this ability and from my searches it looks like 2008 does not either. This seems like a basic feature that most users would want. Wouldn't it make sense to put all generic stored procedures that are shared across multiple projects in one folder and project specific procs in another?
It seems the way most devs do this now is by using some from of ID_SPNAME syntax and sorting them.
Grouping procs and functions by type in the UI would be nice, but Management Studio can't do it. Using SQL Server 2000, I've done what you suggest (prefixing objects with a grouping code and sorting). In 2005 and 2008, consider creating schemas to serve the same purpose, and grouping your objects in those. Note that the object names are prefixed with the schema name in the UI.
CREATE SCHEMA ShoppingCart AUTHORIZATION Joe
CREATE PROCEDURE AddItem ...
... will display in the UI as ShoppingCart.AddItem.
Schemas in Sql Server 2008
The most common way to do this (in SQL 2005/2008) is by using schemas:
HR.spCalculateEmployeeCompensation
HR.spCalculateContractorBonus
Web.spAppendWebLog
Web.spUserEndSession
Reporting.spGetCurrentYearSummary
Reporting.spGetLastMonthDetail
Not only will these visually organize themselves in the SSMS list, but you can apply different permissions to each schema.

Create & Copy Access tables to SQL via SSIS? SQL 2008

I am trying come up with a way to pull the tables out of an Access database, automate the creation of those same tables in a SQL 2008 DB, and move the data to the new tables. This process will happen on a regular basis and there may be different tables each time.
I would like to do this totally in SSIS.
C# SQL CLR objects are an option.
The main issue I have been running into is how to get the Access table's schema and then convert that to a SQL script that I can run via SSIS.
Any ideas?
TIA
J
SSIS cannot adapt to new tables at runtime. (You can change connections, move a source to a table with a different name, but the same schema) So, it's not really easy to do what I think you are saying: Upsize an arbitrary set of tables in an Access DB to SQL (mirroring their structure and data, naming, etc), so that I can then write some straight SQL to transform the data into another SQL database or the same part of the database.
You can access the SSIS object model from C# and build a package (or modify a template package) programmatically and then execute it. This might offer the best bang for your buck, but the SSIS object model is kind of deep. The SSIS Team blog have finally started putting up examples (a year after I had to figure a lot of this out for myself)
There is always the upsizing wizard, and I'm sure there are some third party tools.

Resources