database-project

Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects

二次信任 提交于 2020-01-01 09:33:15
问题 I almost have a NAnt script together that will build and deploy VS2010 database projects, but one error stands in my way: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(56,5): error MSB4062: The "SqlBuildTask" task could not be loaded from the assembly Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0

Unresolved Reference in Visual Studio 2012 Database Project

会有一股神秘感。 提交于 2019-12-31 02:09:26
问题 Is there a way to reference another database from my database project without directly referencing it? For example, I want to be able to write something like this: CREATE VIEW View1 AS SELECT X FROM OtherDB.dbo.Table1 回答1: Your best bet is to add a database reference to your project. For VS2010 and lower DBProj files, you'll want to generate a dbschema file and add it as a database reference. For SSDT, you'll want to use a dacpac file. This works well for projects that are mostly static and

Visual Studio 2010 Database Project - Unresolved Reference to a Synonym

淺唱寂寞╮ 提交于 2019-12-29 04:16:26
问题 We have a couple of synonyms that are being used to reference tables in a separate database (that's on the same server). The actual synonyms are fine, but the stored procs/user defined functions that reference said synonyms show the following error: Error 13 SQL03006: Column: [dbo].[GetCocosIndexSearched].[User ID] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].

Can I ignore logins when publishing a Visual Studio Database project?

北城以北 提交于 2019-12-25 06:15:21
问题 We have a SQL Server that uses SQL Server Authentication, with users that can deploy, and others that can read, for the sake of simplicity, I'll call them "deploy" and "web". I'm having difficulty setting permissions up using a Visual Studio (2012) Database project, as the "deploy" user does not have sufficient permissions to create new server logins. I can add scripts to do things like: GRANT SELECT ON foo.bar TO [web] This then sulks (with "SQL71501: Permission has an unresolved reference

How to name the filenames of a database and set its location in Visual Studio 2015 Database project?

半世苍凉 提交于 2019-12-23 16:56:46
问题 By selecting "Publish" in the context menu of a VS 2015 Database project, I can create a script, which contains all the necessary commands to deploy the database to the SQL Server ("xyz.publish.sql"). The database name and its paths in this script are declared as variables: :setvar DatabaseName "myDatabase" :setvar DefaultFilePrefix "myDatabase" :setvar DefaultDataPath "D:\Databases\" :setvar DefaultLogPath "D:\Databases\" also the filenames seems to be automatically generated: PRIMARY(NAME =

Deploying VS2010 Database Projects Without VSDBCMD?

别说谁变了你拦得住时间么 提交于 2019-12-23 16:10:37
问题 We have been using Visual Studio 2010's database projects for several internal or single-customer projects since they were first introduced, and they are working great for us so far. Now we're using them for the first time with a "boxed" product that needs to be packaged for installation at arbitrary customer sites. Everything I have seen so far suggests that I ship the .dbschema file plus the vsdbcmd tool and its requirements as part of my MSI, then launch that tool as part of the install.

database project takes a long time to open

岁酱吖の 提交于 2019-12-23 09:32:45
问题 Whenever I open my SLN that has multiple database projects under it, it takes a very long time (10 to 15 mintues) to open. The messages I get are: Analyzing database schema. Your database projects will be ready after 23000 operations are completed. Analyzing database schema. Your database projects will be ready after 45000 operations are completed. Analyzing database schema. Your database projects will be ready after 59871 operations are completed. Analyzing database schema. Your database

Is there a table designer for VS2010 database project?

余生长醉 提交于 2019-12-23 09:32:43
问题 Am I missing something here? It seems that the only options to create a new table in a database project in VS2010 is: Create a table object as a file, then create all constraints (defaults) as separate files, then create each index as a separate file, and primary key as a separate file and on and on... Or Create the entire table schema using the table designer in SSMS and then use the schema compare tool to create a single monolithic file of SQL statements for each element of the table and

Visual Studio database project fails to publish, no error messages

风流意气都作罢 提交于 2019-12-23 07:29:21
问题 I have several database projects in the same solution. They all fail to publish. My Visual Studio version is Enterprise 2015. My SQL Server version is 12.0.4459.0. The projects used to publish correctly on my machine. They publish correctly on my co-workers machines. I've not changed the database projects from the correctly publishing versions on my co-workers machines. The steps I use to publish are as follows: I right click and select publish. I load the publish profile from the xml file. I

Visual Studio thinks correct SQL syntax is incorrect

荒凉一梦 提交于 2019-12-23 06:58:20
问题 In Visual Studio 2013, I have created a database project and imported an existing database. At first all was fine, and the project built and produced create scripts. However, now Visual Studio seems to think that there are SQL syntax errors, returning several SQL46010: Incorrect syntax near: errors. These are all from code generated by VS - I have not written any of it. Example 1: ALTER ROLE [db_owner] ADD MEMBER [SomeUser]; SQL46010: Incorrect syntax near ADD. Example 2: DECLARE @Foo