Compatibility issue between SQL Server and Visual Studio - sql-server

I think you can help me.
I am developing an application for a small company. I have been working on Visual Studio 2015 with a SQL Server 2014 database and I have made a noob mistake. My app was almost finished but I discovered that the company has only one server with Windows Server 2003 on it, and it is not possible to update it.
Windows Server 2003 works up to SQL Server 2008 so I have tried but it has been impossible to me to attach my database to SQL Server 2008 (even changing compatibility level to 100) or connecting a new 2008 database to the application in Visual Studio 2015.
I do not know what to do now. Is there some possibility to make that my database works? Or is any other DBMS that would be better to work with my 2015 app in my 2003 server? Thanks!

You can create a database in production SQL Server 2008, then
create a Linked Server on your production Server to your development SQL Server 2014 and copy all the tables / procedures / functions over.
How to Create a Linked Server

Backup/restore works with older backup/newer restore server. Detach/attach do the same. The best solution here is to script developer DB (make sure you don't include newest features not supported by the production server) and run on production. If you want to move data as well, it is better to create at least two separate .sql's, one for schema and another for data.

Related

Trouble after Upgrade SQL Server version and have two server now in services.msc

I'm a beginner in this, I've been searching for long on internet. But as many solution in internet, I don't understand as much i wanted. And I have some question to for resolution. I see a place the recommend to ask some like this as Super User, but I recently just started using 'Stack Overflow' so I don't know How To Use Super User.
Start when I download a new setup of SQL Server 2016 and choose option to 'Upgrade-from-previous-version', from process I see, it just added 2 features.
From what I really want is to change entirely my SQL server from 2014 to 2016.
Two Server in services.msc
So i try to do option 'basic-installation' from installer and it work honestly but provide 2 server which server 2016 and 2014.
Maybe I can just uninstall the server 2014, and get work with 2016 instead. But Can I bring my database in 2014 too?, I mean it has compatibility-problem.
And it don't have SQL Server Management Studio so I download a newest version of it (v18.00)
Two server with different SQL Server version
My question is =
Can I keep my database in server 2014, my database in 2016 is empty (did I must attach it again)?
Did it just OK to have two Microsoft SQL Server Management Studio?
Why I don't get MSSMS when I install SQL Server 2016?
If I must do Question1, How To Upgrade my database to version 2016?
Is it bad for my laptop to having two Version of SQL Server, or I must delete one?
Backup and restore to 2016 (or keep it in 2014)
Yes, but not necessary, just use latest version, uninstall older
Management Studio can be downloaded separately
See (1)
No, both can be kept, but remember that both services will be running which may impact performance and resource usage. You can stop these services using SQL Server Configuration Manager

Proper way to Import data from Access to SQL Server?

I'm asking for the proper way, in SQL Server's T-SQL (I think that's what it is) code or using another language, to import data from a Microsoft Access MDB Database into a new SQL Server Database.
Now, typically I would just import it in. The problem is I'm writing a .SQL script (I could use another technology if needed) to do all this leg work as this will need to be done fairly regularly. Likely at least once a week, for about 5 months in the year.
To digress a tad, I had wanted to implement a single database and distinguish separate source database using something like a DatabaseID field, but the powers that be overthrew me there.
I was previously using SQL Server Management Studio 2012 with SQL Server 2008 running the T-SQL (on a production machine) that worked fine. I've now migrated to a local SQL Server Management Studio 2012 with SQL Server 2012 (for development) and the code that used to work doesn't anymore.
This code is what used to work: SELECT * INTO [dbo].[Controls] FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\Show.mdb; Jet OLEDB:Database Password=BobSaget')...[Control] The password has been obfuscated for security ...
That's likely a sloppy solution. What's the ideal way?
Thanks in advance!
I would recommend using Microsoft's SQL Server Migration Assistant for Access.
SQL Server Migration Assistant (SSMA) is a free supported tool from Microsoft that simplifies database migration process from Access to SQL Server. SSMA for Access automates conversion of Microsoft Access database objects to SQL Server database objects, loads the objects into SQL Server, and then migrates data from Microsoft Access to SQL Server.
SSMA for Access v5.2 is designed to support migration from Microsoft Access 97 and higher to all editions of SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, and SQL Azure.
You can find it here.
You may need to fix the structure after the migration as it tends to over exaggerate many of the data types.
Have you checked your DCOM security on MSDAINITIALIZE?
I had this problem when moving to a local instance of SSMS 2012.
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2011/09/28/troubleshooting-cannot-create-an-instance-of-ole-db-provider.aspx

Visual studio 2010 and Sql Server

Do visual studio 2010 include already Sql Server instance, or I need to install Sql Server developer edition to develop an application that need a Sql Server db.
If it installs a Sql Server express edition, it this enough or it's better to have Sql Server developer edition?
I would second that installing the "full" SQL Server Development Edition makes sense if you do serious database development.
However you can have both installed side by side, and having SQL Server Express is very useful for one reason - it supports placing database files in the App_Data folder of ASP.NET applications. While I don't do this for my own projects, it's a very nice feature for demos or open source applications you download from the web: just unzip, start VS, hit F5, and you have a running solution including database. Without SQL Express, you first have to move the MDF file, attach the database, set up user rights, replace the connection strings etc...
The Visual Studio 2010 installer gives you the option of installing SQL Server 2008 Express Edition. This edition of SQL Server is good enough for development purposes but is not intended for production use.
I think the size limitation is not the main issue.
In Sql Server 2008 you have some features in Sql Server Management Studio that aren't available in the Express management Studio or the Express database engine, like:
- suggesting the table and column names (in Query Window)
- Sql profiler
Cor Westra

Configure VS2008 to create SQL Server databases instead of SQL Server Express?

Probably asked and answered before, but difficult to search for.
In VS2008 when you right-click App_Data folder and create new database, it attempts to create a SQL Server Express database. Well I have SQL Server 2005 Standard installed and have thus uninstalled Express. How do I get VS2008 configured to know I want SQL Server databases (NOT Express) created?
SQL Server Express databases are SQL Server databases and vice-versa. While is true that the SQL Server 2008 database files format is different from SQL Server 2005 one, whthin the same version (2005, 2005 SP1, 2005 SP2, 2008 , 2008 SP1 etc etc) all SKUs (Express, Standard, Exnterprise etc) have all the same datbase format.
Yout Visual Studio tools are guiding you down the wrong path. You should not use the Solution Explorer to add a database to the App_Data folder. Instead you should use the Server Explorer tool (menu View/Server xplorer or press Ctrl+W,L) and connect to your SQL Server 2005 instance. Then use the Server Explorer tool to explore the database. To connect to the database from your solution, add a connection string to the web.config file.
While you can manage the database objects from the Server Explorer, thar is a horrible way to do it and will cause only pain on the long run. You should instead create deployment scripts with DDL statements and run those scripts when the solution is deployed. This way your database metadata is part of your source control and you can keep track of application database versions, see Version Control and your Database.

SQL 2000 database copy to SQL 2005 options

We have a production web and database server with SQL Server 2000. (However, a few clients they have their own servers with SQL 2005.) So we have local installs of SQL 2005 Express for development on Windows XP SP3 boxes (which don't allow SQL 2000 Enterprise installations).
We often need to copy SQL 2000 databases to SQL 2005 instances. In the past, we have used the SQL Publishing tool (also mentioned here). However, one of our databases is so big that using that tool fails as it creates SQL scripts that get too large for Management Studio to handle them properly. Besides, it takes too long... :)
We would use the Copy Database Wizard included with SQL 2005, but our development machines run SQL 2005 Express which don't included SQL Server Agent, which is required for Copy Database Wizard to work. So, I guess our solution will be to upgrade our development installs with the full version of SQL 2005 (we have an MSDN subscription of course).
I was wondering what other solutions, if any, work well for you guys? (Besides complaining to the bosses to upgrade our production servers to 2005 or even 2008--which I've already tried.)
Back it up in SQL Server 2000 and then use the RESTORE WITH MOVE command into 2005 Express.

Resources