Archive for the ‘Uncategorized’ Category

SSDT – OLE DB or ODBC error: Login failed for user ‘DOMAIN\ComputerName $’ 28000

March 23, 2017 1 comment

My colleague was working on a Tabular Model project and while working with the Tables so that they can be deployed to the Cube on Analysis Server, he was getting a weird error. The authentication was failing and in error message it was showing the computer name instead of his actual user name, suffixed with a $ sign.

Failed to save modifications to the server.
Error returned: ‘OLE DB or ODBC error: Login failed for user ‘DOMAIN\ComputerName$‘.; 28000.
A connection could not be made to the data source with the name of ‘CubeConnectionName’.


By looking at the above error it seemed that somewhere the authentication is being overridden by some setting. So after some research I found that in Data Source section there is Impersonation setting which can be set to a specific user, service account, current user or an unattended account.

–> Here is the resolution:

1. On Tabular Model Explorer go to the Project and expand Data Sources.

2. Here right click on the connection and click on Edit Data Source, or just double click on it.

3. Click on the Impersonation… button and check what option is selected.

… I found that the selection was defaulted to Service Account, and as my SSAS (Analysis Services) was running under the DOMAIN\ComputerName account which gets sets while installing SSAS. And as it does not have sufficient privileges or access rights, it fails to connect to the Database Server. Thus you need to check impersonation and provide an account which has access to the Database Server.

4. Change the selection from “Service Account” to “Specific Windows user name and password”, and apply the user name and password.

5. Click OK and Save the settings.

6. Now go again to the Table Properties and click on Refresh Preview button and click OK.


Categories: Uncategorized

SQL Error – The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE

June 22, 2016 8 comments

Today after setting up a new Database environment I ran into a small issue. While running a Stored Procedure I was getting following error:

Sql Severity : 16
Sql Message ID : 10314

Executed as user: XYZdomain\XYZaccount. An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly ‘XYZAssemblyName, Version=, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A) System.IO.FileLoadException: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) [SQLSTATE 42000] (Error 10314). The step failed.


I checked online and found that after restoring the Databases on DEV from PROD environment, the Stored Procedure that I was executing on DEV was CLR enabled thus it has the external_access or unsafe permission set from the database. And the login that was use to create the database on PROD was not same as in the instance of DEV DB. Thus it was not allowing to execute the CLR SP and resulting into error due to safety concerns.

Thus you can either use the Windows login or the SQL Server login which is common on both the environments (PROD & DEV, in my case), so:

1. First Enable Trustworthy database property

2. And change the database owner to ‘sa’


USE [DatabaseName]

EXEC sp_changedbowner 'sa'


This issue could also occur when you are Creating a new Assembly that has the external_access or unsafe permission set in the same database.

Server: Msg 10327, Level 14, State 1, Line 1
CREATE ASSEMBLY for assembly ‘XYZAssemblyName’ failed because assembly ‘XYZAssemblyName’ is not authorized for PERMISSION_SET = EXTERNAL_ACCESS. The assembly is authorized when either of the following is true: the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission.

A very Happy SQL-licious & SQL-s-tastic Valentines day to all of you !!!

February 14, 2016 2 comments

Wish you all a very happy Valentines day !

Here is a love Query for you all:


Execute it and share it with your valentine 😂

… and now a special SQL Joke on this day!

--// Valentines special SQL query: for Guys

Select * from [Earth] 
where [Girl] = 'Single' 
and [status] = 'Available';

-- (0 row(s) affected)

--// Valentines special SQL query: for Girls

Select * from [Earth] 
where [Boy]  = 'Single' 
and [status] = 'Available';

-- System.outOfMemory.exception 
-- Too many rows to handle


For more jokes on SQL check here.

Subscribe my YouTube channel for more updates on SQL.

Categories: Uncategorized Tags:

Start a Blog | Why, What, How, Where

August 5, 2014 Leave a comment

I started Blogging almost 5 years back (early 2009). That time I didn’t thought to blog publicly, but just created a blog site in Google’s to create and track a library of technical articles that I can access anywhere. Suddenly I started getting hits on my posts and people started asking questions and suggestions. Then I thought to give my blog a professional look and add some quality content.

I was quiet impressed with so moved my blog to this new hosting site and came into life.

Last week I thought to port my blog to a dedicated Domain name, so I upgraded my account in WordPress only rather than going with other domain registering sites. Now the blog’s new address is, which is maintained by WordPress only.

Lot of people ask me about Blogging, like: how to start blogging, what platform they should use, what content they should put, domain name, space, themes, etc. Here through this blog post I’m trying to answer some of the FAQs.

–> Main points to consider:

1. What do I blog:
– Think on a topic or subject you are passionate about, where you have deep/sound knowledge and can write about it very frequently, like Technology (All, or any Particular like SQL, .net, Java, etc.), Photography, Travel, Fashion, Politics, etc.
– Some people also blog to promote their own business/products/companies, etc.
– Make sure the content you put is genuine and will help people in reality.

2. How do I setup my blog:
– You can start with any of the free Blog Hosting sites, like WordPress, Google’s Blogger, Tumblr, etc.
– Or can go with Paid options for these site or other Hosts like GoDaddy, where you will get your own custom URL (Domain name) with more control.

3. How frequent should I blog: Depends upon the Topic, Time and your Passion.
– If it is current affairs and/or trending stuff, then daily, but you should have ample time.
– If automobiles/movies or similar then you should be the first and best (or amongst them) to blog them whenever they are launched.
– If its Technology then it could be daily/weekly/monthly, but at least one/two blog(s) per month to keep your readers connected with you.

4. Some Do’s & Don’ts:
– Do not copy other people’s blog posts.
– You can write about same topics what others have already posted, but make sure to give your post a different title.
– Its Ok to take tips from other Blogs, but the content should be genuinely written by you and should make a difference when compared by others.
– Use Widgets to provide more information and ease of access to your users to navigate on your blog site.
– Use Themes to beautify your blog, and can tweak CSS to give it a different look.
– Don’t forget to put a Disclaimer on the blog so that you do not come under any issues.
– Associate your blog URL or site map with Search Engines, like Bing, Google, etc. for SEO, so that you get max traffic/hits.
– Use inbuilt or third-party Stat counter, Comments, PingBacks, Rating systems/widgets to know the influence & popularity of your blog.
– Popularize your blog with Social media like a Facebook Page, LinkedIn, Twitter, etc.

Let me know if you have any questions or need clarifications on these points.

Happy Blogging !!!

Programming is like a Dream… by Lisa

July 5, 2011 Leave a comment

This post is different from my other previous posts as it does not talks about SQL or anything near to it. But it talks about the Progmmers who code not only in SQL but other programming languages too.

I stumbled into Lisa’s post which talks about Programming as a Dream. I liked this article very much and the illustration given by her really fits in each and every scenario in one’s day today life and specially in dreams.

An excerpt from her post:

“If you think about programming like dreaming, you’ll realize that programmers remember more if you interrupt them gently than if you barrage them. If someone wakes you out of bed and starts shouting a long list of things at you to remember, you’ll almost certainly forget what you were dreaming. However, if someone shakes you gently and gives you a few seconds to open your eyes and look around before they start talking, it’s a lot easier to remember the dream for later. The same works for programmers. If you just walk into their office and start talking, one of two things will happen: they’ll completely forget what they were coding, or they won’t really be paying attention to you. However, if you quietly walk up to them and let them know you are there but say nothing until they are ready, the programmer can come to the end of the thought they are on. Once they’ve finished their thought, it will be easier for them to pick up next time and still pay attention to what you have to say.”

To read the whole post here is the link for you to go thru: