Database.sqlpermissions

Visual Studio
Raise your hand if you think this is a real pain in the bottom method for editing user permissions? Yeah, me too. Visual Studio Team System Database Edition is far to fine a tool to make us edit XML to set database user permissions. A co-worker has posted a change request on MS Connect. Connect works really well as long as people vote for what you report. I've seen several things change in SQL Server or get fixed primarily because of the reports in Connect. So if doing this: <PermissionStatement Action="GRANT">      <Permission>EXECUTE</Persmission>     <Grantee>UserRole</Grantee>      <Object Name="dbo" Type="SCHEMA"/> </PermissionStatement> Makes you crazy and you would rather type this: GRANT EXECUTE ON SCHEMA :: dbo TO UserRole ; Then click on the link and get the word in front out to Microsoft.
Read More

MSDN Magazine: Article on VSTS:DB

Visual Studio
Jamie Laflen and Barclay Hill have published an article in MSDN Magazine outlining the new features in in VSTS:DB GDR. The description of the intent and use of the server project is extremely enlightening. I wasn't aware of the master.dbschema files available for use within a project. Luckily I haven't needed them yet. Another thing I wasn't aware of, if you use the refactoring tools, say rename a table, not only does it save you a lot of typing, but the project will remember that the table was renamed and instead of dropping and recreating it in the next deployment, it will issue SP_RENAME. I'm spreading that word to my team right now. Another good point is that you can make a configuration to work only on your local machine…
Read More

VSTS:DB Composite Projects

Tools, Visual Studio
I've seen several searches go by from people who are looking for how to create composite projects. Here's a quick run-down. In the example, I'm going to create a main database project called BaseDB, a server project called MyServer, and a composite project that combines the two called Comp. This project is just another database project as you can see in Figure 1: [caption id="attachment_379" align="alignnone" width="450" caption="New Database Project"][/caption] Once the new project is created, you need to right click on the References object in the Solution Explorer. Figure 2: From the pop-up menu select Add Database Reference. The window in Figure 3 will pop up: [caption id="attachment_383" align="alignnone" width="450" caption="Add Database Reference"][/caption] You can select the other projects for a dynamic view into their changes, or for a…
Read More

VSTSDBE RC0 Post 3

Tools, Visual Studio
Second round of testing. Instead of associating with a project, I tried creating a reference to a .dbschema file. Same error. This time, I'm going to clear out everything. I tried creating it initially on top of the code from CTP 17. So, another chance to try out the reverse engineer process of "Import Database Schema." Works great. New AdventureWorks database inside Visual Studio with a tested deployment faster than you can spit. Created a new server project. Added a login, just to give it something to do. It deployed fine. On to the compound project. Let's see what happens. Just to see, I did a build and deploy before I added references or objects or anything. It worked great. Whatever that means. I'm taking it a step at a…
Read More

VSTSDBE RC0 Install

Tools, Visual Studio
I've downloaded and started the install. The first screen I'm seeing is not filling me with confidence. The executable that is currently running is called "DBProRepair.exe" However, the installed completed without any issues. Just for giggles, I tried opening my PASS presentation (created on CTP 17). If it worked, I wouldn't have to recode. Ah, well, no joy. Not that I expected any. Oh, but the Conversion Report that comes up afterwards is very informative. Reverse engineer against the AdventureWorks2008 database went off without a hitch. All the objects imported into the database with no issues too. So far, so good. Created all the projects. No issues. I'm configuring for a deployment now. We'll see how that goes. Builds worked fine. I forgot to change the deploy action the first…
Read More