datadude

DB Pro (data dude) and Wix3 SqlExtension

I'm attempting to use Wix to create a database during install. I have my database setup with the Db Pro Visual Studio SKU (Data Dude as it's sometimes referred). However, the output seems to be only consumable by sqlcmd.exe since it uses specific syntax in it (variable references like :setenv and $(FOO)). I'm trying to use the wix sqlex...

Create and drop a database defined using Visual Studio Team System 2008 Database Edition

How do I create and drop a database defined using Visual Studio Team System Database Edition from inside a unit test? (I guess that makes it more of a integration test...) I want to be able to create the database either for each test or for a suite of tests and then drop the database after each test or suite of tests. Is there an API I...

Syncing permissions between a Database project and a database using Visual studio

I have a database project in visual studio (2008) that I am using to keep my database structure in a version control system (Git). I use the data schema compare tool in VS to maintain this database project. The issue that I'm encountering is that I keep losing my permissions for new objects. So how do I: Capture these permissions u...

Visual Studio DB GDR2 - Can I deploy to a File without SysAdmin Privleges?

I have a Data Solution that has a Database Project and a Server Project. I want to deploy to an SQL Script. I don't want to have to have SysAdmin privileges on the SQL Server (SQL 2008). Is there a way to do this? I really don't want to set any settings or upload any server level stuff. I only have the server project because my DB p...

Visual Studio For Database Professionals 2008

Anyone know any a few good references for getting familiar with the SQL Server 2008 Database projects? I am getting a bit overwhelmed and would love to find a walk through for putting this project type to good use. Thanks in advance. ...

Using nullable columns in a WHERE clause

Assume a table definition in SQL Server as follows: CREATE TABLE MyTable ( Id UNIQUEIDENTIFIER NULL, Info VARCHAR(MAX) ) And a query: DECLARE @id UNIQUEIDENTIFIER DECLARE @info VARCHAR(MAX) IF @id IS NOT NULL BEGIN SELECT @info = Info FROM MyTable WHERE Id = @id END In that case, the Visual Studio static code analyz...

Looking for a good "create" database scripting tool (not diff scripting)

I'm looking for a db script tool which can do the following: Create "create-scripts" for each table in the database and place them in separate files. Note: these files should not contain relational constraints. Create scripts for relational constraints (as one file or many, doesn't matter) Create insert scripts for populating tables. ...

Data Dude/VS Team System Database - Use with multi project databases

My current project uses Visual Studio Team System for Database Professionals GDR2 (aka DataDude). We are the only application using the database that we model using DataDude. My company would like to consider using DataDude across the board on all our projects. However, I am not sure how well this will work with projects that share a ...

Where to start with Visual Studio for Database Developers

Does anyone have a list of advice, best practices, getting started guides, etc. for VS for Database Developers? ...

VS for Database Developers: Lookup Tables

How to you handle the contents of lookup tables that should be treated as "code" rather than data? ...

VS 2008 Schema Compare: How to ignore server variables

Hi, I recently imported the schema of our prod database into Visual Studio. The schema solution builds, and I've used server variables in the sproc scripts. e.g., cross-db call in a sproc which was MyDB.dbo.sp_Some_Sproc is now [$(MyDB)].dbo.sp_Some_Sproc However, as it's taken a while to get up and running properly with TFS etc., t...

Visual Studio Database Edition memory problems and auto recompile

Currently storing database of a large application with 2,000 stored procedures in Visual Studio Database Edition. The problem I'm having is that when I try and edit a stored procedure, Visual Studio becomes unresponsive and it can take 30 seconds to type in a single keyword. What I believe is that Visual Studio is attempting to auto re...

VS 2010 build database project receive SQL04151

I just started working with the Visual Studio 2010 Premium database project. I must say it does indeed rock. One thing I can't figure out is how to avoid teh SQL04151 warning "Procedure: [dbo].[MyProc] has an unresolved reference to object [MyDatabase].[dbo].[MyItem]". Did I miss a simple step somewhere? All I can find online involves te...

Circular references in Visual Studio Database Edition

I'm using Visual Studio Database Edition to script a number of databases. Many of the databases have references between them - for example, view in database A might do select ... from B..TableX This works fine as long as database B is also a project in the solution. The problem comes in when I have objects in database A referencing da...

Why does Schema Compare in Visual Studio 2010 show differences when there are none?

I had hoped that Visual Studio 2010 would have brought some improvements to the Schema Comparison function. I suspect there are some, but I can't get something basic working. I've sucked in a schema from a SQL Server 2005 database. Then to assure things were working, I did a schema compare choosing the database as the source and my sc...

Is it possible to run Visual Studio Database Edition schema migrations from the command line?

Visual Studio 2008 Database Edition (Data Dude) has the ability to perform schema comparisons between databases and generate a script which migrates from one database to the other. Is it possible to perform this comparison and generate the migration script from the command line? If so, what are the command line tools, and are the same to...

VS 2010 Database Project dropping data on column name change

Howdy, I am testing out the new database project features of Visual Studio 2010 and want to change the name of a column in a table. I changed the name in the create script and deployed it against the database. The script that was generated just dropped the column and added a new column with the correct name, but all the data was lost....

How do you fix TSD02016 error in Database

Howdy, I have a database I am using the Visual Studio 2010 Database Project tool vsdbcmd.exe to create a schema from. vsdbcmd /a:Import /dsp:Sql /model:"Database" /cs:"Server=SqlServer; Initial Catalog=DatabaseName; Integrated Security=SSPI;" The tool is reporting an error: Error TSD02016, Gen-259 (12,50) The column name is not ...

Is there a way in a visual studio database project to exclude certain object during deployment?

I have a scenario where I am using a visual studio 2010 database project to deploy changes to multiple database installations, but on certain ones I want to exclude a set of views from that copy. Is there a way using build configurations to exclude these views from being deployed? ...

Visual Studio 2008 Database Project generating ALTER DATABASE during schema compare

I have a new Visual Studio 2008 Database Project (Data Dude). It was generated by pointing at our existing database. I have now made a few changes (new columns, tables, indexes, etc) and I am trying to generate the deployment (diff) script for deployment. I have a Schema Comparison setup to do the comparison and generate the diff scri...