SQL71501 error building dacpac - visual-studio

I have looked up various answers on here and none has helped me thus far.
I am rebuilding a database project and it is complaining about one particular script:
CREATE USER [doro] FOR LOGIN [doro];
Now there are other scripts under the security folder which are exactly the same with different logins - which it does not complain about.
With this particular user the error is:
SQL71501: User [doro] has an unresolved reference to Login [doro].
I tried following some suggestions and using the "Add New" option to add the login but this made several other errors appear in relation to that login.
I have the master database reference.
Any suggestions appreciated.
Also, does a rebuild sync the dacpac with the original source database or do you have to manually do a compare and update?
thanks,
KS

Related

MICROSOFT ACCOUNT lacks permission to complete this action. You need to have 'ReadPackages'

I am getting the following error in in visualstudio.com when accessing nuget feed:
{"$id":"1","innerException":null,"message":"4d90beec-a2e5-4f8f-8108-23480a7b53f8\
MICROSOFT-ACCOUNT lacks permission to complete this action.
You need to have 'ReadPackages'.","typeName":
"Microsoft.VisualStudio.Services.Feed.WebApi.FeedNeedsPermissionsException,
Microsoft.VisualStudio.Services.Feed.WebApi",
"typeKey":"FeedNeedsPermissionsException","errorCode":0,"eventId":3000}
The above answer works for most cases. But if you are still getting that issue check that
The user has access to the correct project (organization settings)
The user is also part of the team for that project (within the project settings)
Set the correct access level in TFS.
The default access level is set to “Stakeholder”.
https://blogs.msdn.microsoft.com/tfssetup/2016/12/06/tfs-2017-nuget-publisher-task-fails-with-401-unauthorized-exception/
Also more information here:
https://github.com/Microsoft/vsts-tasks/issues/4319

FAILED_PRECONDITION when trying to create a new Google API project

I am getting an error when attempting to create a new project for Google API at https://code.google.com/apis/console
I was hoping the error was temporary, but I have been unable to create a new project for a couple weeks now.
The error seems to have changed, as it used to include server ip information and a lot of other data. An example with some potentially private information removed:
APPLICATION_ERROR;google.cloudresourcemanager.projects.v1beta1/DeveloperProjects.CreateProject;com.google.apps.framework.request.StatusException:
generic::FAILED_PRECONDITION:
;AppErrorCode=9;StartTimeMs=1489595147198;tcp;Deadline(sec)=50.0;ResFormat=UNCOMPRESSED;ServerTimeSec=0.027545452117919922;LogBytes=256;FailFast;EffSecLevel=none;ReqFormat=UNCOMPRESSED;ReqID=removed;GlobalID=removed;Server=ip:port
Now the error is a lot shorter, although still seems to be related to the same cause:
com.google.apps.framework.request.StatusException: generic::FAILED_PRECONDITION:
The spinner in the dashboard appears to spin forever, while the error appears underneath alerts after a few seconds. I have tried numerous project names and all fail with the same error.
Is there some type of quota I am missing that is preventing this? The quota menu item requires me to select a project, which I don't have any.
Clicking on the error brings me to a page with the following message:
You don't have permissions to perform the action on the selected resource.
Make sure that the Google Developers Console is on for the user that is trying to create the project.
Admin.google.com > Apps > Additional Google services > Google Developers Console and turn on for any org or user that needs it.
Looks like there's another possible cause, in addition to the one that #AndrewL provided in his solution.
Short answer:
I ran into the same error when I attempted to associate a new GCP project with our billing account via Terraform. Our billing account has a default limit of 5 projects (which we had already met), and this blocked the association of new accounts and generated the Error 400: Precondition check failed., failedPreconditionerror message. To fix, I had to remove/delete one of the already associated projects before I could add a new one.
Long answser:
Here is the error message I encountered in Terraform (sensitive data and IDs redacted):
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ module.<MY MODULE PATH>.project
billing_account: "" => "<MY BILLING ACCOUNT ID>"
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.<MY MODULE PATH>.project: Modifying... (ID: <MY PROJECT ID>)
billing_account: "" => "<MY BILLING ACCOUNT ID>"
Error: Error applying plan:
1 error(s) occurred:
* module.<MY MODULE PATH>.project: 1 error(s) occurred:
* google_project.project: Error setting billing account "<MY BILLING ACCOUNT ID>" for project "projects/<MY PROJECT ID>": googleapi: Error 400: Precondition check failed., failedPrecondition
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
My billing account was at its maximum of 5 projects. As a test, I removed one of the projects and then ran Terraform again. It then successfully added the new project to the billing account. To double check, I attempted to add yet another new project to the billing account (to push the amount to 6) and then received the same error message again.
Straight up deleting one of the associated projects also works.
It stands to reason that requesting a limit increase for your billing account's associated projects will also fix this issue.
Another possible reason for this error can be accessing the .xlsx file. If you are accessing this file using Google spreadsheet then you need to save the .xlsx file in to save as google sheets by choosing the option available in the File menu at the top.
Thanks
Another possible reason for this is Organization policy, denying the particular API on ORG/Folder/project level.
For me the error was working because I was trying to read the file from a shared google folder. Check if the drive where the file lives is your drive and not a shared one.

User has does not have permission to be mentioned

We have a TFS user who appears to have the same permissions as a colleague in their team. However this user can't be #mentioned despite having the ability to open and close and otherwise edit the bug that they can't be mentioned in.
The following error is emailed to me following attempting to #mention this user.
#Joe Bloggs cannot be mentioned in the Bug 41729. The user does not have
sufficient permissions.
We can't see any differences between a user that can be tagged and one that can't.
We were getting this same error.
Went into the project settings -> security.
Clicked "remove" on that user
at which point the "remove" changed into an "undo".
Clicked the "undo".
Now we are no longer seeing this error. Seems like something internally just needed to be recombobulated :-)
If you are sure that the user exists and can be mentioned with "Joe Bloggs" then they do not have read permission on the bug you are referring to. You should go back and check what group membership they have in the project.

Login failed for user 'sa' when the app is run from VS 2015

I have a console application which hosts two WebApi applications using OWIN Self Host approach. One of the apps uses EF6 with Code First. When I run the executable from the bin folder and make a request to the WebApi, everything works like it should - if the database is already created it just returns the results, otherwise it creates the db first. But if I start the console app from Visual Studio (with debugging), I receive the following error:
Additional information: Cannot open database "{db name}" requested by the login. The login failed.
Login failed for user 'sa'.
Anyone has any ideas why this happens?
EDIT: Problem is not related to the self hosted apps. I referenced the dbcontext directly in the console app and the same issue happens. I also tried Integrated Security and it still fails with "Login failed for user '{DOMAIN\USERNAME}'."
EDIT 2: I fixed my problem by doing deleting the .suo file. That helped me find these two questions mentioning the same solution:
Login failed for user "xxx" Failed to open the explicitly specified database solution
EF 4.1 code first causes weird (login) runtime errors
Can anyone say the reason why the .suo file causes this?

Team Explorer Everywhere - Domain user could not be validated

I am using Team Explorer Everywhere command line tool on a mac. I've setup a connection to the TFS and i got my files. Checked them out for editing and i see on another machine they are indeed checked out. Now when i try to check them back in i run
sudo tf checkin MiniOrka.iOS -recursive -comment:Testing -login:myUsernam#myDomain,myPW
But all i get is:
Exception in thread "main" com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: >RebuildCallersViews: Connecting Domain User could not be validated. ---> >RebuildCallersViews: Connecting Domain User could not be validated. ---> >RebuildCallersViews: Connecting Domain User could not be validated.
at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:127)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:826)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:454)
at ms.tfs.workitemtracking.clientservices._03._ClientService2Soap12Service.getMetadataEx2(_ClientService2Soap12Service.java:745)
at com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:515)
at com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:482)
at com.microsoft.tfs.core.clients.workitem.internal.WITContext.(WITContext.java:97)
at com.microsoft.tfs.core.clients.workitem.WorkItemClient.getContext(WorkItemClient.java:359)
at com.microsoft.tfs.core.clients.workitem.WorkItemClient.query(WorkItemClient.java:521)
at com.microsoft.tfs.client.clc.vc.commands.CommandCheckin.checkWorkItems(CommandCheckin.java:354)
at com.microsoft.tfs.client.clc.vc.commands.CommandCheckin.run(CommandCheckin.java:181)
at com.microsoft.tfs.client.clc.Application.run(Application.java:294)
at com.microsoft.tfs.client.clc.Application.run(Application.java:144)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:33)
And my files remain checked out. I am a member of the Contributor group (they can add, modify and delete items within the team project).
Anyone know how to fix this?
Try using -login:myUsernam#myDomain and entering the password at the prompt that follows.

Resources