SQL Replication Running ALTER VIEW against a table - sql-server-2008

I have SQL Server Replication running between a Publisher and 2 subscribers.
Publisher: Microsoft SQL Server 2008 (SP3) - 10.0.5538.0 (X64)
Apr 3 2015 14:50:02
Copyright (c) 1988-2008 Microsoft Corporation
Workgroup Edition (64-bit) on Windows NT 6.1 (Build 7600: ) (VM)
Subscriber: Microsoft SQL Server 2008 (SP3) - 10.0.5538.0 (X64)
Apr 3 2015 14:50:02
Copyright (c) 1988-2008 Microsoft Corporation
Express Edition with Advanced Services (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (VM)
The server containing the subscriber database failed and had to be rebuilt. I restored the replication with the subscriber database and everything ran fine for about a day.
Now I am receiving the error: "Cannot perform alter on 'dbo.MyTableName' because it is an incompatible object type."
I ran SQL Profiler and found that immediately following a series of calls to sp_MSunmarkschemaobject. It is trying to run an ALTER VIEW dbo.MyTableName statement.
I've verified that dbo.MyTableName is a table not a view on both the Publisher and the Subscriber.
A little background, MyTableName was originally a view in the database, but was converted to a table, but this was over 3 years ago and replication had been working fine until the server went down.
Also of note is there is a second subscriber where everything is working fine.
Any help or insight would be appreciated.

Related

Unable to connect to IBM DB2 from SSIS / VS.NET 2015, though works with VS.NET 2013

We are planning to upgrade from SQL Server 2014 and Visual Studio 2013 to SQL Server 2016 and Visual Studio 2015.
The error message:
[IBM][System i Access ODBC Driver]Communication link failure.
comm rc=25202 - CWBCO1034 - SSL error, function returned 25202
Background
We have an SSIS project which connects to an IBM DB2 server and retrieves data. This has been working for years.
The working setup looks like this:
Windows 10
Visual Studio 2013
SQL Server Data Tools for Visual Studio 2013
IBM i Access for Windows, version 7 Release 1
A DSN pointing to the IBM DB2 server
ADO.NET Connection Manager with ODBC Data Provider pointing to the DSN mentioned above.
SSL enabled on the DSN.
If we on the same machine use Visual Studio 2015 and subsequently SQL Server Data Tools 2015, it no longer works. Everything else is the same!
As soon as the package is opened and SSIS starts to validate the connection managers the error message arises.

SQL Server version mismatch

I'm trying to attach a SQL Server .mdf to my Management Studio 2014, but I get the error:
Attach database failed for Server '...\SQLINSTANCE'. (Microsoft.SqlServer.Smo)
Additional information:
An exception occured while executing a Transact-SQL statement or batch.
(Microfost.SqlServer.ConnectionInfo)
The database 'DatabaseName' cannot be opened because it is version 706. This server supports version 663 or earlier. A downgrade path is not supported.
Could not open new database 'DatabaseName'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)
The .mdf was created on SQL Server 2012 (which presumably is represented as 'version 706' in the error message).
OK, so I need to upgrade my DB engine to 2012 on my home PC. That means installing 2012 Express from https://www.microsoft.com/en-gb/download/details.aspx?id=29062
A couple of questions though before I do that. By installing 2012, would it be added to Management Studio 2014 automatically? Would I then have both 2008 & 2012 as options for new databases I might want to create, or would 2012 simply replace 2008?
On the download page, it says the supported OSs are "Windows 7, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2". But I'm using Windows 10. Is this just a case of MS not updating the page or does 2012 really have a problem with Windows 10?
EDIT: It's true that this question is similar to ones previously asked on SO (such as The database cannot be opened because it is version 706), but here I'm not contemplating rolling back the 2012 version of the DB to 2008, but issues pertaining to installing 2012 on my home PC.
So, your SQL Server version is 2008 - you have 2014 management studio and you need to use a database from a server version 2012.
If that is the case; then I hope some of the following will help:
Windows 10 can run SQL Server 2012 fine.
The documentation might just not be updated, but I've not personally seen any issues on multiple instances.
Management Studio 2014 can connect to SQL Server version 2012 as well. You don't need to install it again.
Unless you wish to remove SQL Server 2008, you'll need to install 2012 as a new instance, so you basically have two SQL Servers running. This however, will have affect on how you connect to the databases.
Check out, for example: https://msdn.microsoft.com/en-us/library/ms143531.aspx for more information
So instead of having multiple instances, consider whether you'll still need 2008, so it might be removed if you don't need it at all.
Also - consider whether it might be worth it to upgrade your local instance to newer version - 2014 for example. However this of course might give you the same problem in reverse in the future, if you ever need to make a database on 2014 instance and move it to a 2012 instance.
It all depends on the actual requirements, set-up and development models. Basically because you say it's your home computer, I'd think the newest version might just be the best approach, as you're less likely to use that version as a "creator" rather than a development version.

Upgrade from Sql server 2008 to Sql Server 2008 R2 didn't update running version

I/m trying to replicate a database whose .bak was created using SQL server 2008 R2, as in my local machine I was running SQL server 2008 I'm trying to upgrade.
It does the upgrade and the management studio shows the actual R2 version but the running instance is not changing, i.e. the Sql Server in the connection stills stays 10.0.1600
I uninstall everyting and run first 2008 and then the update, so I'm pretty sure it is the default instance and not a named one. And I couldn't install directly 2008 R2 because I was running through all kind of problems and that's why I'm trying to install 2008 first and then update
Anyone know if I can change that MSSQLSERVER version to the proper one?
Thanks
Update
When running select##version as per Giorgi's comment I get this
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )

CFDBINFO does not pick up default values

When I use CFDBINFO on my local system, it accurately picks up default column values and returns them. On a different system, it does not (it doesn't seem to notice any default constraints).
Both systems are using CF 9,0,1,274733 and both are connecting to MSSQL Server 2008. The code on both systems, including the scripts that build the tables, are identical (same repo, same version #). (I also ran the test on a third system and got accurate results)
I've tested this issue with multiple different tables and it occurs every time: default values are never returned on the wayward server. I've made fresh tables, from scratch, totally new names, totally new database, still see the issue. I don't see any other differences in the introspection results- in fact FKs and other constraints appear fine.
Just have no idea how to debug this. Doesn't appear to be cache related. Systems are pretty identical. Is there some byzantine setting? Perhaps an issue with the sql connector? Or java version? Suggestions??? Thanks!
Adding notes based on suggestions below here for better formatting:
Looking at MSSQL Versions, I get:
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Express Edition with Advanced Services (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)
Pretty much the same, except that (Hypervisor) bit-- not sure that's worth pursuing.
answer: make sure the db user has ddl_admin permissions.
I would try the following:
Do a side by side compare of the cf_root/lib/neo-datasource.xml files on each server. They are probably different.
Check to see if the MSSQL servers have a slightly different version. You may be looking at a service pack issue
Addendum
3) On each of the DBs, use the "Generate Script" functionality to generate the scripts to build all the tables, views, defaults, etc. Compare what each of the resulting scripts have
For additional info on 1, see http://helpx.adobe.com/coldfusion/kb/purpose-location-xml-configuration-files.html

SQL Server 2008 'RECONFIGURE' doesn't work for 'sp_configure filestream_access_level' on Windows 8

Okay, this is strange.
I installed Windows 8 and SQL Server 2008. The database I am working with has FileStream enabled and so I need to enable FileStream. And so, I did:
EXEC sp_configure filestream_access_level, 2
RECONFIGURE
It didn't work.
So I tried using the UI in SQL Server Management Studio. Like this:
Notice under configured value it is displaying "full access"
And under "running values":
And notice under "running values" it is displaying "disabled".
So I did:
Ran RECONFIGURE, it returns Command(s) completed successfully. Didn't work.
Restart SQL Server 2008. Didn't work.
Restart machine. Didn't work as well.
Now I wonder if I RECONFIGURE is broken or my UI is broken. So I tried changing Default Language to UK - English and ran RECONFIGURE. It worked! The language changed to UK under "running values".
So I guess the problem is Filestream access changes didn't get applied. But why?
I am running Windows 8 64 bit and this version of SQL Server:
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44
Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit)
on Windows NT 6.2 <X64> (Build 9200: )
filestream access level Server Configuration Option:
Before this option has any effect, the Windows administration settings for FILESTREAM must be enabled. You can enable these settings when you install SQL Server or by using SQL Server Configuration Manager.