Friday, February 24, 2012

Client Tools for SQL Express

I am looking for information on Client tools for SQL Express. I am mainly looking for a way to script out the objects and then Add them back into a new file. I wish to do this so that I can ship the SQL Scripts for an application so that the user can load them up once distributed, and also to allow me to create the objects and load them at design time. I used to be able to have a common set of tables that I would use inside applications, and when working on a project load them if they were needed.
One of the other reasons is the problem with the Beta2 and RC engines and the changes that have been made. I know that the two versions do not work well together and I want to be able to script out the objects and put them into either the RC or in turn the RTM Version.
I know that there are the management tools that ship with the full sql product (Not Express), but I fell that there should not be a need to install these as there should be some command line tools that can do the job. I have seen the command line tool on the MSDN Download site, but could not see how to script out the objects.

Maybe I could use the SQLCMD tool but I can not work out how to connect to the mdf file as I do not have a server running as it is the express edition. (Even though it ships with the express edition).I'm not sure I understand the following statement: "Maybe I could use the SQLCMD tool but I can not work out how to connect to the mdf file as I do not have a server running as it is the express edition."

In order to use SQL Server Express the SQL Server service must be running. Once it's running you can connect using SQLCMD (sqlcmd -S .\SQLEXPRESS -E).

Best of luck,
Dan|||Thanks for that, I have been able to connect to the SQL Express engine using the SQLEUtil (I think thats it) that you can download from the Microsoft downloads site, but still trying to script out the database objects.

What I have started looking at is the SQL-SMO System (http://www.ircomm.net/blogs/mykre/archive/2005/10/18/615.aspx), with this I hope to develop a system that I can use to script out the Database objects (Table structure and all). This way I will be able to use this system to store my SQL Scripts in a source code management system, or publish the scripts that I develop with my applications.

One of the main reasons at present is that I have been running Beta 2 of the framework at home, and am now running the RC version at work. When I tried to move an application from home to work the MDF Files where not compatible and I needed to recreate them. As the Release draws near I am worried as I have Beta 2 database files that I am working with and when new version is released how am I going to recreate the files.

I also can for see a problem here at work which I have posted in the following post, http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=111170.

No comments:

Post a Comment