SQL Server: pushing development to production? - sql-server

I'm currently using SQL Server Management Studio.
I have a development database, and access to a live database.
I just want to able to migrate my development tables to the live server.
I'm consulting stack flow first, since I don't want to blow anything up.

If you know what tables you want to migrate and they don't yet exist on the prod server, it's as simple as scripting the table definition, then running the script on the server. If it's more complex than that, I would recommend any number of tools which compare database schemas and automatically generate scripts you can run on the destination server to add/alter/remove what you need. A good freeware one for simple jobs is DBComparer. It's pretty basic. An excellent commercial one are the Sql Tools by Red Gate

We are using SQL Examiner Suite for this, but there are a lot of similar tools.

This is worth a look at - I've used it before and it works well and is very easy: Microsoft SQL Server Database Publishing Wizard http://www.microsoft.com/downloads/en/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

Related

Install SQL Server (Express, compact, other?) in standalone pc

Help needed here. I'm a bit lost checking all possible editions and configurations of SQL Server.
What I'd like seems straight forward: a version of SQL Server (ideally 2008, or higher), on a single PC (client+server), with a small footprint. I just want to self train in ddbb's basic administration (user creation, schemas, scripts, copying ddbbs, stored procedures).
These ddbb's won't be used with webs, other users, etc. Just myself, at most with an Access front-end linked to the SQL Server DB.
My doubts are:
Is is better SQL Server Express 2008, Compact Edition (CE), SQL
Lite, something else ??
I would prefer using SQL Lite (seems the
simplest), but my concern is how 'similar' (for things like schemas,
permissions, scripts management, files names, no worries about multiple servers, though) is SQL lite to
a full SQL Server ?
I'd just like to familiarize with the basics in my pc so that when confronted to a real SSIS I can learn it quickly.
Thanks in advance, p.
I'd go with SQL Express if you're planning to learn SQL Server. Although SQLite has a small footprint it is completely different from SQL Server. Queries to get and manipulate data are similar (but not identical in every manner), but everything related to metadata (schemas etc.) is completely different.

What is The Best Local DataBase Managment Software?

I Want Implement a Software by C#.net.I want Use a DataBase Manager Software like Access or SqlLite or etc.My Program Saved Many Data in Local Machine.
I Do Not Want Publish or Move Data to Other Pcs
What DataBase Manager Software Must be Choose?
Not Different DataBase is Free or have a price.
what is the Best DataBase Manager Software to Save many Data in Local Machine?
For sure you are looking for a free database so for that you can use many databases like mysql ,postgresql , and sql server msde or access
but we still have other scenario, if you are going to distribute this application to other pcs so you have to think about deployment and in this case you can eliminate the mysql , postgresql because they depend on servers but msde (it's also server ) is much easier and you can found alot of tutorials how to deploy it with your project
It depends on how much you are expert in database and for what reason you are using it? are you going to need complex queries or it just a storage place for the data ?
if it's complex query i will go for msde for sql server if it's only for saving information may be i will go for access or even xml
Well if you are developing in C# consider using the MSSql Compact Edition. This allows you to create a local database and use it much like SqlLight. However, the support is much better, especially when you using Visual Studio. There you can find it as LocalDatabase under Data when you adding a new item. (Not 100% sure whether it is present on all versions of VS though).
Firefox has an SQLite Manager add-on.
I think the best choice depends on your needs, for example if you must synchronize data with sql server for me the best choise was sql express.
I would vote for SQL Express. You get essentially a scaled down SQL Server that is capable of working with quite a bit of data. SQL Express plays well with Visual Studio and you will be able to take advantage of the System.Data.SqlClient and related namespaces which come with the .NET framework out of the box. They are also better than the Odbc namespaces. Finally, there is a LOT of online support for SQL Express and, as far as I know, SQL Express's flavor of SQL (T-SQL) is the same as that of SQL Server. So should you one day need the flexibility of running with either or (local database, or server database) you will have it. Also, SQL Express is fairly commonly used in the microsoft world so you should be able to find lots of examples, if need by.
TurboDB for .NET from dataweb is a good solution, if you want a powerful engine with stored procedures and professional support from the manufacturer:
http://www.dataweb.de/en/products/dotnet_database.html

Simplifying SQL Server's Logins/Owners/Schemas/Roles/Principals etc

I frequently develop small internet applications using ASP.NET and SQL Server 2005. My databases are always only accessed by one application through an ASP.NET web service or something similar.
When I'm developing an application and moving a database back and forth between my development computer (SQLExpress 2008) and hosted server (SQL Server 2005) invariably I end up getting a hodgepodge of owners/roles/schemas/logins etc that seem to crop up and take control of various pieces of the database.
I only know enough about SQL Server to be dangerous, and I just want to get databases designed, but I invariably have to change the db and end up getting various permissions errors (for example when trying to open a diagram after transferring a db).
Is there a way to simply tell SQL Server Management Studio "Hey, I'm the only guy who's going to use this stupid db, so just let me do it?"
Like some command that sets all of these pieces to 'dbo' or something like that?
I am assuming you are using Windows. Make sure you are connecting to SQL with Windows authentication and give your account Sysadmin permissions. Now everything you create (Create Table tablename, Create View viewname) will automatically have dbo as the owner.
Unfortunatly there is a couple of easy answers to your question, but you are probably not going to like them because they will require you to invest in SQL Server skills.
The first tool you should look at is Visual Studio 2008 Database Developer Edition. This version has management tools you are looking for to manage schemas, users, ... I thinks this is now included with Visual Studio 2008 Development Edition
The second approach is to embrace SQL Server administration and get comfertable with writting DDL scripts. The goal is to get to the point where you can deploy changes to SQL Server in a predicatble manner from your development enviornment to test and ultimatly to production.
The crux of the problem is that you move back and forth the database itself. Databases are surprisingly tightly coupled to their host SQL instance, by the login to user mapping and by other settings as well, like encryption keys, usage of msdb procedures and maintenance plans among other. You could minimize some of the impact by carefully using exlclusively SQL Authentication, but that won't eliminate the problem completely. The real solution is that you should have a deployment script and apply changes to your production database(s) via executing T-SQL script(s) that you have previously tested on your development db, not by moving a db 'back and forth'.
I create all objects specifically specifying I want them created as dbo.
so to create a proc I do
Create Procedure dbo.myprocname

Browsing SQL Server

Are there any tools for just browsing SQL Server? I ask because sometimes SSMS is a little heavy weight when I just want to look through the database and find one record, and SQLCMD doesn't really seem like a good choice when browsing through a lot of different records or a lot of large records.
Yes, QueryExpress is a great, lightweight tool (which also can be used from a USB stick) for browsing and querying SQL Server databases.
I'm using and I really like LINQPad
You could try following heterogenous sql clients
Heidi
It's light weight it can manage both MySql as well as Sql server
Click here to know more.
SqlDbx
SqlDbx is a fast and easy to use database SQL development IDE for database administrators, application and database developers working in heterogeneous database environments.
It can manage MySql,SqlServer,Oracle,Sybase,Microsoft azure and IBM DB2.
Click here to know more.

Fast SQL Server 2005 script generation

It seems like the generation of SQL scripts from the SQL Server Management Studio is terribly slow. I think that the old Enterprise Manager could run laps around the newer script generation tool. I've seen a few posts here and there with other folks complaining about the speed, but I haven't seen much offered in the way of alternatives.
Is there a low-cost/free tool for scripting an entire SQL Server 2005 database that will perform better that SSMS? It would be hard to do worse.
See the Database Publishing Wizard that is part of the SQL Server Hosting Toolkit. It generates a single SQL file for both schema and data.
We are using the tools by RedGate which I personally find very useful in any aspect of work with databases. For scripting I would recommend the SQL Compare (you need a pro version for scripting). The SQL Compare is a must have for deploying schema changes from the deployment DB to the live Server and a real timesaver.
Those tools are not free but I think they could save you money in a long run
What kind of scrpt generation are you talking about now?, generating create scripts from the objects in the database is way faster in SSMS compared to EM.
But if you are running an select or something that gives you lots of rows in the grid, it is crazy slow.. like scripts generating inserts statements of all rows in an table, if you got lots of data, it is almost not doable.
I don't know what is "terribly slow" for you, but I have a decent performance with SQL 2005 Management Studio. In either case, RedGate products are very cool. Unfortunately they are not free.

Resources