SQL 2012 :: Backwards / Forwards Compatibility In SS?
Apr 8, 2015
what are the SS rules around forwards compatibility? For example, I have a SS2014 DB instance but I'm able to query it through SSMS2012 Express. Also, I backed up a SS2012 database and restored it into a SS2014 instance which works as expected. Should I also be able to back up a SS2014 instance that was restored from SS2012 and restore it into a separate SS2012 instance?
I am new to accessing sql stuff and asp.net I have some code in a .cs page that accesses a sql database and displays the information on a page from top to bottom (press releases: www.managewatch.com/press). I created this site but I used the code from the old site and just implemented it. I'd like to have the press releases display from newest on top to oldest on bottom. Is there a way I can do this? I have included the code in my cs page that does this: protected void Page_Load(object sender, EventArgs e) { // connect to db SqlConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["xxxx"].ConnectionString); db.Open(); // Initialize Objects SqlCommand cmd = new SqlCommand(); cmd.Connection = db; SqlDataReader row; // COUNT PAGES ######################################## cmd.CommandText = "SELECT * FROM press"; row = cmd.ExecuteReader(); while (row.Read()) { Literal pressReleaseTitle = new Literal(); Literal pressReleaseBody = new Literal(); pressReleaseTitle.Text = "<div id='pressheader'>" + row["title"].ToString() + "</div>"; pressReleaseBody.Text = "<div id='pressbody'>" + row["content"].ToString() + "</div><br>"; lblPressReleases.Controls.Add(pressReleaseTitle); lblPressReleases.Controls.Add(pressReleaseBody); } row.Close(); db.Close(); } I can see what is happening here "cmd.CommandText = "SELECT * FROM press";" tells it to get all the info from "press" but I just don't get the " row = cmd.ExecuteReader();" part. Is this just grabbing one line of the database? what does this code do? Thanks!
I have a 2005 database sitting on a 2012 server, we're looking to change its compatibility mode from 90 to 110 so we can avail of what 2012 offers.I did a migration project a couple years ago for SQL Server 2000 databases changing to 2008 R2 and we ran into loads of problems where we left most databases in compatibility mode 80 as these were application databases that the owners couldn't stand over in terms of deprecated code / features no longer in use in 2008 R2.
From what I can see with changing from 90 to 110, there doesn't seem to be as many issues but I just want to double check if there's a way to confirm this. I know upgrade advisor is a handy tool but will it pick up database specific issues as opposed to database server compatibility issues? URLs...I know UA won't cover all the bases but it would look good when attached to the report I'm submitting recommending the change.
We recently upgraded out SQL version from SQL2008R2 to SQL2014. As such, the compatibility mode changed to SQL2104 (120).
We have several queries that used to run fine that now take forever to bring back results. There are no errors (which surprised me). They just take way too long now. PLus they seem to be causing high I/O and CPU.
If I change the compt level back to SQL2008 - these queries run fine.
QUERY with SQL2008 compt level - finished in 2 minutes. QUERY with SQL2014 compt level - finishes in 3 hours 22 minutes.
same exact query - same server - only thing changed was compatibility level.
WHat do I look for in the queries that could be causing this? (they look fine but obviously I'm missing something here)..
We upgraded QA and production to sql server 2012 last year ( in place) leaving the user databases at sql 2005 ( 90 ). A few months ago the QA user databases were set to sql 2012 compatibility mode. Management is worried about upgrading production and wants to know if we can quickly roll back.
I want to confirm that we can roll back using the same command, and if dbcc freeproccache can be used to avoid having to update all statistics.
ALTER DATABASE <mydatabase> SET COMPATIBILITY_LEVEL = 110
ALTER DATABASE <mydatabase> SET COMPATIBILITY_LEVEL = 90
This works fine in QA on my own test user database. No errors.
I need to simulate cursor-type (groan) behavior in a dataset and am wondering if this is possible in the foreach task. Example - The user has the need to go through the data row-by-row, and if a certain value is missing in row 10 then go back to row 8, grab a value from that row, and plug it in the missing column in row 10. Then move on to row 11.
Is there a way to make the foreach ADO enumerator travel backwards? Is there a way to do this that will not be awfully inefficient? Any suggestions out there would be welcome.
I've advocated for set-based updates, and these simply aren't an option, as each successive row depends on the updates that may have happened above it in the sequence. Unless I hear of any other ideas out there I have to move forward with this sequential type operation.
I'm sure this question has already been asked, I made an attempt to search the forums, but was unsuccessful. Our production servers are currently running SQL Server 2000 3a. I just got a new development system and have no intentions of installing SQL Server 2000 dev, but SQL Server 2005 Dev Edition. I was wondering if I will still be able to install SQL2005 and still be able to administer/modify 2000 mdfs with SQL 2005 Enterprise Manager. I wanted to be able to still make development on SQL 2k5 and update the production server (SQL2k). This is on my dev system not the production, the production will still be running SQL 2k, until the client decides on purchasing SQL 2k5. Of course I will not be able to use the new db features and types on a SQL2000 server, I just want to maintain the legacy with 05 Enterprise Manager (i.e.: SP, UDF and DTO). Thanks a gig. Larry
In my script below. I'm trying to update a SQL Server 2000 DB with data from SQL Server 2005. I've written a Cursor to call tables from information schema. Compare the data between 2005 and 2000 then Insert into SQL 2000 Table. But I'm getting The multi-part identifier "c.ID" could not be bound.. Can you please help me to resolve this.
DECLARE TableCursor CURSOR FOR SELECT Table_Name FROM INFORMATION_SCHEMA.TABLES WHERE Table_Type = 'Base Table' and Table_Name like 'L_%'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN
DECLARE @Line VARCHAR(1000)
SET @Line = ''
SELECT @Line = @Line + 'c.'+ c.Column_Name + ' , ' FROM INFORMATION_SCHEMA.TABLES T JOIN INFORMATION_SCHEMA.COLUMNS C ON t.Table_Name = c.Table_Name WHERE t.Table_Name = @TableName and t.Table_Name like 'L_%'
I have created a Transactional Replication Publication on my SQL 2012 server.When I log into another server on the domain running 2008R2 and try to subscribe to the 2012 Publication, I get the following error when clicking on "Add SQL Server Subscriber": "The selected Subscriber does not satisfy the minimum version compatibility level of the selected publication"
The 2012 DB is set as 2008 Compatibility Mode?Am I not able to Publish from 2012 to 2008?.I was using SSMS 2008 to connect to my 2012 Instance, thats why it didn't work...
Is it possible to backup databases from a 7.0 box and restore them to as MSSQL 2k box? My question really is this: Does it matter what type of MSSQL server your database resides on or can a dump be created of a database, restored to a different version MSSQL server, and used interchangeably?
Hi all,I am under the impression that one can not Log Ship from enterprise edition to standard edition. Anyone have any documentation they can point me to?TIA,SQLPoet
I get the impression that osql (or somewhere in the sql processing) precompiles the entire script before it executes anything. In particular, this is a problem because it means you can't use IF statements to bracket new features in a script designed to be run on both old and new versions of SQL Server. I'm trying to handle an issue whereby I need to use "CREATE LOGIN" on SQL Server 2005 because I need to set CHECK_POLICY = OFF, and you can't do that with sp_addlogin. However, on SQL Server 2000, while I can't use CREATE LOGIN, I don't need to because the default password policy is such that the password being used does not fail without it (as it does in SQL Server 2005, and is why we need to set CHECK_POLICY), so I can simply use sp_addlogin to create the user w/o a CHEC_POLICY setting.
It appears however, due to the way that SQL is processed, it is impossible to create an SQL script of this nature that will work under both SQL Server 2000 and SQL Server 2005. I added code to check the Product Version, and can successfully bracket the code necessary with IF statements, but even though the IF statement would cause the CREATE LOGIN code to not be executed on SQL Server 2000, it errors anyway apparently because it is preparsing the script and of course, SQL Server 2000 doesn't have CREATE LOGIN. Consequently, checking Product Version is useless in this case. It looks like we'll have to do the version check outside of SQL and invoke script A for SQL Server 2000 and script B for SQL Server 2005.
Unless that is, I misunderstand the error I get from SQL Server 2000, or if there's some other way to compatibly do such a conditional. Here's an example script that runs fine under SQL Server 2005:
--------------- declare @ProductVersion as integer set @ProductVersion = cast(left(cast(serverproperty('productversion') as varchar(30)),1) as integer)
print 'Product Version = ' + cast(@ProductVersion as char)
IF @ProductVersion < 9 exec sp_addlogin 'testuser', 'fubar', 'master' IF @ProductVersion > 8 BEGIN CREATE LOGIN testuser WITH PASSWORD = 'fubar', CHECK_POLICY = OFF, DEFAULT_DATABASE = [master] END ----------------
On SQL Server 2000, @ProductVersion gets set to 8, but I get the following error:
Msg 170, Level 15, State 1, Server TESTSVR, Line 10 Line 10: Incorrect syntax near 'LOGIN'.
I would like to know if I put the Compatibility Level in a SQL Server 2005 installation to 70 I can make afirmation that I have a full SQL Server 7.0. If the answer is "Yes" where I can find a documentation or a FAQ that explained this topic.
I restored the database from SQL server 2000 to 2005.The database was restored with 80 compatibility.Can i change it to 90 and what are the effects? Coz my applications are pulling data from SQL server 2000. Does 80 work for database mirroring?
We found interesting issue which is basically the app is being tested ok on SQL2005 by software vendor. Then we tested in our environment and we found it's not truly true. There are some compatibility issue on SQL syntax. Anyway ... the plan set the compatibility level back to 80 instead 90. Cause this thing for sure is working.
Now my question is do you know any other impacts that you know of if we are doing this setting (running SQLServer 2005 but the database set as 80)? I know that some inbuilt reporting only run 90 level but I can get around this. Performance or something? Is there any thing that I should to know?
Correct me please if I'm wrong but one should not get any issues while restoring a database backup from a sql 2005 development edition to an enteprise edition or even from a sql express edition to whatever else?
I was under the impression that a sql 2005 database, no matter what edition, would work on all the other 2005 server editions/versions and hence, the backups from these databases should also work on the others.
I was hoping someone could help me or put me on the right path to re-writing the join portion of this sql query in ANSI form for compatibility level 90. Im just not sure how to handle the three join statements and if they should go at the top in the FROM statement (dont know if that would mess up the rows produced). The query exists inside a stored proc.
SELECT S.TYPE, S.LOCATION_TYPE, S.LOCATION_ID, S.PLANNED_ARRIVAL, S.PROJECTED_ARRIVAL, S.ACTUAL_ARRIVAL, S.PLANNED_DEPARTURE, S.PROJECTED_DEPARTURE, S.ACTUAL_DEPARTURE FROM TAB1 S, TAB2 RL, TAB LS WHERE S.LOAD_ID = @V_CURRENTLOADID AND (RL.REGION_ID = @REGION_ID AND RL.ROUTE_DATE = @ROUTE_DATE AND RL.ROUTE_ID = @ROUTE_ID) AND (S.REGION_ID = RL.REGION_ID AND S.ROUTE_DATE = RL.ROUTE_DATE AND S.ROUTE_ID = RL.ROUTE_ID) AND (S.LOCATION_ID =* LS.LOAD_LOCATION_ID AND
S.LOAD_ID =* LS.LOAD_ID AND S.LOAD_STOP_ID =* LS.LOAD_STOP_ID) ORDER BY RL.SEQ_NUM, S.ACTUAL_SEQUENCE_NUM;
my web project is using SQL Express2005 and ASP.NET and C#. my web hosting company only have MSsql2000. would there be any conflict with regards to my database? im sorry if i sound dumb. im a newbie to this.
I have moved a database from SQL 2000 to SQL 2005 Express. I have modified the structure in 2005 Management Studio Express.
Now I cannot attach to the modified dataabse in SQL 2000 Enterprise Manager. I get "Error 602: Could not find row in sysindexes for database ID.... Run DBCC CHECKTABLE on sysindexes".
This occurs despite the fact that I have kept the database at Compatibiluty Level SQL Server 2000, as reported in 2005 Management Studio Express.
we have applications currently talking to a sql 2000 DB via ado.net 1.1. will we have any problems if we upgrade to sql 2005, will the app have to be modified.
Having moved over to SQL 2k5, from SQL 7.0 we have now realised that the database's need to be set to comp level 9.0 before they are found in the maintence plan wizard, we currently still access the database using an Access 2000 front end, by changing the comp level will this cause us issues writing data, I'm sure it won't but want to make sure, I'm sure that the comp level just sets what options are available to use.
I need to know if I will run into problems with sql express on a sql 2000 server. I get the impression that my isp is using 200 server just by lookng at the connection string. Is there a addin I could use if needed I seen a post mentioning the publishing wizard cpt but not much after is it released yet. and then there is the web data admnistrator for msde will that work with sql express.One other question can I reinstall sql and change the authentication process from windows to user name and password.