how to add source control to sql server 2008? - sql-server-2008

I'm newbie to TFS it, and i have installed it already. Everything works fine but strangely i find no source control on SQL server management studio 2008 r2 (tools/options) as in the below image
What should i do now ?
Thanks,
Nam Vo

You need Team Foundation Server MSSCCI Provider. And then you can add SSMS projects to source control (just like in Visual Studio).
From my experience- working with SSMS and TFS is not very comfortable. Third party tools could be much nicer choice (for example red-gate, although havent really worked with their source control tools).

The SSMS plug-in from Red Gate will easily connect SQL Server to TFS (and all other version control systems) - check it out at http://www.red-gate.com/products/sql-development/sql-source-control/
(Disclaimer - in the interests of being up-front, I work for Red Gate)

Related

Reporting Services Built in 2012 Deploy in 2008

I have been working for a client who run SQL Server 2008 in their live environment. I had been working onsite for a period but now work from home. However, due to security, I cannot connect to the live setup, I can only connect to a test server. This server runs SQL Server 2012. I script any code and send it to the office for someone to deploy. The problem I have is I am now doing some reporting services work. They are only pretty basic reports, tablix controls, nothing fancy. Is is possible to build on 2012 and deploy to 2008? Can I do something with the .rdl file to make this work or is it not going to be feasible?
Thanks in advance
In the Properties of the ReportServer Project in Visual Studio you can set the target server version.
Right click the Project in the Solution Explorer pane and set the TargetServerVersion Property to the required version. This works for reports SQL Server Reporting Services 2008 onwards. The designer will then manage what features are available to avoid using features from a later version of SSRS.
The .rdl files are nicely formated XML. You can use your favorite diff tool to compare reports generated in either version of the tool.
I'm pretty sure that Microsoft doesn't support moving a newer RDL to an older version server.
There were huge changes to the .rdl format between 2005 and 2008, moderate changes between 2008 and 2008R2, but I haven't really looked into 2008R2 versus 2012. From what I've seen these should be smaller changes yet.
If you do this you are off of the golden supported brick road. Since this server is production, and you don't have a good way to test this, I would find a 2008 server to develop with. I wouldn't want my name connected with the possible problems that could come up with a hack to move the rdl backwards.

Create Database in SQL Server 2012, Script and Use in 2008?

If I create a database using 2012 and work and add that info to it, if I were to script the database after, would I be able to run the script in 2008 and have everything work A.O.K?
If you are using SQL Management Studio, you can right-click on the database name, then select Tasks → Generate Scripts.
Here you will be able to create scripts to script out the Schema, Data, or both Schema and Data, and if you click the Advanced button, you can specify which version of SQL Server you'd like to target.
So, simply choose SQL 2008 as the destination server and you should be good to go!
A script? Yes. Well, let me rephrase: it depends. As long as your objects don't use any 2012-specific features, you will be able to script out the schema using Management Studio or a variety of 3rd party tools (I blogged about some options here). Many of the tools also offer options (or companion tools) to also script the data.
The problem is there isn't a very easy way in SQL Server 2012 to identify all of the places where you might be using 2012-specific features. For example, I don't know of a tool that will inspect your database and point out that you are using the FORMAT() function, which is not available in SQL Server 2008 or 2008 R2.
Other means of copying the database over - backup/restore, attach/detach, mirroring/log shipping etc. will not work. You can go up (from 2005, 2008 or 2008 R2) to 2012, but you can't go backwards.
So in general I agree with John. Much safer to develop on a version <= deployment version. Why would you want to develop on 2012 to deploy to 2008? Seems quite risky to me.
If you have very large amounts of data to move (gigabytes) then the TSQL scripts that the SQL Management Studio will generate for you could give you problems because of the sheer size. A better alternative would be to use BCP (Bulk Copy Program). The downside is that this is a command line utility and requires more work than just using the wizard.
As luck would have it somebody has written something which looks remarkably like the wizard only using BCP. It is the SQL Database Migration Wizard and is freely available on Codeplex - http://sqlazuremw.codeplex.com/releases/view/32334. Originally intended as a database migration tool between SQL Server and Azure you can just as easily use it between SQL Server and SQL Server. The key is to go into the advanced options (similar to the Management Studio wizard) and pick SQL Server. Later when you are prompted for the target system choose your 2008 installation.
I had no 2012 specific artefacts in my database and it worked very smoothly for me.

Can I make SQL 2008 Management Studio validate code for SQL 2005?

We have a production database running on SQL 2005. We are using SQL 2008 Management Studio. The issue we are having is that some of the stored procedures/functions we write get code that is compatible with SQL 2008, but not with SQL 2005. The newer management studio doesn't flag this as an error, but when we try to deploy a version, we get a large amount of errors. Is there any way to get 2008 Management Studio to validate code for compatibility?
Thanks!
Even if you are using Management Studio 2008, you dev database should match the prod one. It is an extremely poor idea to develop against a 2008 databse when your prod database is 2005. You can still hook to 2005 databases in management studio 2008. Then you will find out immediately that the code doesn't work. In fact if you are attached to a 2005 database, it will only let you use 2005 syntax. We attached to 2000 database for a long time until we got all the servers upgraded and it wouldn't let us write 2008 specific code as long as the database we attached to was 2000.
If, for some reason (and I stringly recommend against it), you will continue to develop against a 2008 database, I also suggest you look in Book Online for the new features of 2008 and make sure all your devs know which features they should NEVER use. Make sure your code reviewers check code against the list.
You can set the Compatibility Level to SQL Server 2005 (90) under the Options section of the database properties.
Right click the database, select Properties, and then select Options.

How to install SQL Server Management Studio 2008 component only [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Below is a list of the SQL components that I installed in the Visual Studio 2010 Professional setup. Sadly, while trying to work I could not find SQL Server Management Studio 2008.
Is there a way to download SQL Server Management Studio 2008 separately and install only that component?
Since in the past I installed SQL Server Management Studio 2005 with a whole new instance of SQL Server 2005 and had couple of instances, and it was a bit messy.
I found some articles to be of major use:
This link is an experience someone else had:
http://goneale.com/2009/05/24/cant-install-microsoft-sql-server-2008-management-studio-express/
This link has the exact steps involved to install everything properly:
http://www.codefrenzy.net/2011/06/03/how-to-install-sql-server-2008-management-studio/
This link confirms the previous link:
https://superuser.com/questions/88244/installing-sql-server-management-studio-when-vs2010-beta-2-is-already-installed
My Instructions
I am not sure if my instructions will be 100% accurate, but in my instance, because I installed VS2010 on a fresh copy of Windows 7, the VS2010 installer installs SQL Server 2008 Express for you, so from this point I just need the Management Studio.
What I gathered from these explanations is to do the following:
Download the SQL Server Management Studio install from
http://www.microsoft.com/download/en/details.aspx?id=22973
Run the setup, when you get to the point where it asks you to "Perform a new installation of SQL Server 2008" or "Add features to an existing instance of SQL Server 2008", this part is the CONFUSING PART (HEY MICROSOFT TAKE NOTES, DON'T DO THIS KIND OF STUFF).
As much as you want to select "Add features to an existing instance of SQL Server 2008" DON'T!!!!
You need to select "Perform a new installation of SQL Server 2008". It doesn't sound right I know - it is very confusing and counter intuitive, but this seems to be the way to install management studio. :(
Press next until you see the features selection portion. Heeeeeyyyy look at that, it has a check box for Management Studio. It should be selected already, if not then select it of course and press next.
Press Next next next next next next... basically just install it at this point.
Enjoy, it has installed.
If you have the SQL Server 2008 Installation media, you can install just the Client/Workstation Components. You don't have to install the database engine to install the workstation tools, but if you plan to do Integration Services development, you do need to install the Integration Services Engine on the workstation for BIDS to be able to be used for development. Keep in mind that Visual Studio 2010 does not have BI development support currently, so you have to install BIDS from the SQL Installation media and use the Visual Studio 2008 BI Development Studio that installs under the SQL Server 2008 folder in Program Files if you need to do any SSIS, SSRS, or SSAS development from the workstation.
As mentioned in the comments you can download Management Studio Express free from Microsoft, but if you already have the installation media for SQL Server Standard/Enterprise/Developer edition, you'd be better off using what you have.
Download SSMS 2008 Express
I am just updating this with Microsoft SQL Server Management Studio 2008 R2 version. if you run the installer normally, you can just add Management Tools – Basic, and by clicking Basic it should select Management Tools – Complete.
That is what worked for me.
The accepted answer was correct up until July 2011. To get the latest version, including the Service Pack you should find the latest version as described here:
http://support.microsoft.com/kb/2527041
For example, if you check the SP2 CTP and SP1, you'll find the latest version of SQL Server Management Studio under SP1:
http://www.microsoft.com/en-us/download/details.aspx?id=26727
Download the 32-bit (x86) or 64-bit (x64) version of the SQLManagementStudio*.exe files as appropriate and install it. You can find out whether your system is 32-bit or 64-bit by right clicking Computer, selecting Properties and looking at the System Type.
Although you could apply the service pack to the base version that results from following the accepted answer, it's easier to just download the latest version of SQL Server Management Studio and simply install it in one step.
For any of you still having problems as of Sept. 2012, go here: http://support.microsoft.com/kb/2527041 ...and grab the SQLManagementStudio_x(32|64)_ENU.exe (if you've already installed SQL Server 2008 Express R2), or SQL Server 2008 Express R2 with Tools, i.e. SQLEXPRWT_x64_ENU.exe or SQLEXPRWT_x32_ENU.exe (if you haven't).
From there, follow similar instructions as above (i.e. use the "Perform new installation and add shared features" selection, as "Management Tools - Basic" is considered a "shared feature"), if you've already installed SQL Server Express 2008 R2 (as I had). And if you haven't done that yet, then of course you're going to follow this way as you need to install the new instance anyway.
This solved things for me, and hopefully it will for you, too!
SQL Server Management Studio 2008 R2 Express commandline:
The answer by dyslexicanaboko hits the crucial point, but this one is even simpler and suited for command line (unattended scenarios):
(tried out with SQL Server 2008 R2 Express, one instance installed and having downloaded SQLManagementStudio_x64_ENU.exe)
As pointed out in this thread often enough, it is better to use the original SQL server setup (e.g. SQL Express with Tools), if possible, but there are some scenarios, where you want to add SSMS at a SQL derivative without that tools, afterwards:
I´ve already put it in a batch syntax here:
#echo off
"%~dp0SQLManagementStudio_x64_ENU.exe" /Q /ACTION="Install" /FEATURES="SSMS" /IACCEPTSQLSERVERLICENSETERMS
Remarks:
For 2008 without R2 it should be enough to omit the /IACCEPTSQLSERVERLICENSETERMS flag, i guess.
The /INDICATEPROGRESS parameter is useless here, the whole command takes a number of minutes and is 100% silent without any acknowledgement. Just look at the start menu, if the command is ready, if it has succeeded.
This should work for the "ADV_SSMS" Feature (instead of "SSMS") too, which is the management studio extended variant (profiling, reporting, tuning, etc.)

SQLXML with Windows 2008 and SQL Server 2008

I have an application that uses SQLXML to access data on the database. We have it working on a Windows 2003 server and SQL Server 2005. Now the client wants to install it on Windows 2008 and SQL Server 2008 and we are getting errors like:
Microsoft.Data.SqlXml.SqlXmlException: Class not registered ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered at Microsoft.Data.SqlXml.Common.UnsafeNativeMethods.
ISQLXMLCommandManagedInterface.ExecuteToOutputStream() at Microsoft.Data.SqlXml.SqlXmlCommand.innerExecute(Stream strm)
... etc etc
This is driving me crazy. SQLXML is quite an obsolete technology, and we are trying to use it with the latest SO. I can't find official information about SQLXML and Windows 2008, it seems it's not officially supported but they don't say it's not supported either.
The SQLXML4.0SP1 installation seems to work fine, but it seems like it fails on runtime.
Do you have any ideas? Has someone tried anything like this?
The packages for SQLXML 4.0 SP1 were only available for download in the April 2009 release of the Microsoft SQL Server 2008 Feature Pack. Not sure why they don't appear in the 2008 R2 Feature Pack but they don't.
Here's your link to the Feature Pack
Direct links to the appropriate versions of SQLXML 4.0 SP1 can be found on that page
My recommendation would be to take advantage of the fact that it works on SQL 2005 to convert the code to not use SQLXML. You can take advantage of the fact it works to create tests that prove it works. Then do the conversion, and test again. If the tests still show it works, you've rid yourself of obsolete technology while there's still someone living who knows what the obsolete technology was meant to do.
Otherwise, after finding the fix for this immediate problem (maybe reinstall MSXML) you'll be having this discussion 20 years from now, but with the difference that nobody living knows what SQLXML used to be.
SQLXML is not installed to SQLServer by default. You should run SQL Server Installer, and add SQLXML feature.
I mean SQL Server 2008.
You are probably using ISAPI functionality, which is not supported in SQLXML 4.x
Install SQLXML 3.0 on Win 2008 Server (Vista,7) and for IIS 7.x change IIS 6 Management Compatibilty - allow IIS 6 Metabase Compatibility and IIS 6 Management Console (in Administrative Tools/Server Manager/"Roles - Webserver (IIS)"/ "Role Services" ).
On 64bit Win Server 2008 'Enable 32-bit Applications' for IIS/Application Pools.