Azure app name reported as /subscription/guid/resourcegroups/appName/ - azure-log-analytics

In Azure Monitor's Logs query results some of the values for appName are reported as expected but some are reported as
/subscriptions/guid_here/resourcegroups/group_name_here/providers/.../app_name_here
Can I fix this (in the query or at the app settings)?

Identifying an application by name assumes uniqueness across all accessible subscription. If you have multiple applications with the specified name, the query fails to return expected result because of the ambiguity.
I think you are having multiple application with same name so it's returning Azure Resource ID identifier instead of what we are expecting.
Check the Identifying an Application section in this Microsoft Document for more information.
Because app names are not unique, this identifier might be ambiguous. It's recommended to use Qualified name, Workspace ID, or Azure Resource ID as the identifier.

Related

What is the # sign in SQL used for other than parameters?

For a query which looks something like
select * from cus_query.ca_activity_vw#drifter
I imagine cus_query is the schema and the view's name is ca_activity_vw. But what is drifter ?
I quote the Oracle documentation:
If the identifier names an object on a remote database, you must reference it with its remote name. The syntax is:
simple_identifier_name#link_to_remote_database
If the identifier is declared in a PL/SQL unit on a remote database, you must reference it with its qualified remote name. The syntax is:
unit_name.simple_identifier_name#link_to_remote_database
From this page : http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#LNPLS99945
drifter is a so-called database link - it allows to transparently query tables that reside on a different database (usually Oracle, but possibly some other RDBMS, e.g. via Database gateway).
To see the definition for the database link, you can use this query (this requires DBA privileges):
select * from dba_db_links

in deveolper console of salesforce.com error on object name while executing sql query : select pwd_c,sr_c from login_c

In developer console of force.com while inserting record in table I created on force.com giving error on object name while executing SQL query:
select pwd_c,sr_c from login_c
Custom objects and fields will have the suffix __c in the API names. Note the double underscores. Your sample SOQL query only has single underscores.
See Custom Objects
Incidentally, the Salesforce StackExchange is a great place to ask Salesforce specific questions.

SQL Server FQDN : Use of IP/Instance unrecognized

Can someone point me to the relevant BOL info for this (odd to me) behavior?
I had to join the prod & staging copies of the same table (same db name, diff servers), for a quick query. So I simply needed a fully-qualified join.
This one errors:
SELECT top 10 *
FROM [172.26.196.105\Staging].[DbName].[dbo].[TableName]
This one works:
SELECT top 10 *
FROM [USCASQL01\STAGING].[DbName].[dbo].[TableName]
Edit: clarification ... obviously not a join, these selects were simply me assembling the fully qualified name of my staging db/table. This is not a linked server, but the one I'm connected to.
These, of course, refer to the same instance. I used the IP address\InstanceName since that is what displays in my Object Explorer, it returned an error - "Could not find server 'IP address\InstanceName' in sys.servers." True enough, sys.servers stores the computerName\InstanceName, which works.
Why would one work and not the other? IOW, Why can't it resolve the IP/Instance name in TSQL when it resolves it just fine in the Object Explorer? BTW, we frequently are storing IP's in sys.servers, this one just happened not to be.
Also, I recall from SQL Server7 (way back in the day), a utility that would allow you to create friendly-name aliases for ip's. Can't find it now, does it still exist?
TIA
This is because the first part of a four part qualified name is a reference to a linked server by name, not by an IP or network name. So, if you don't have the linked server set up, then you get the error you encountered.
For adding linked servers, you want to be looking at sp_addlinkedserver.
This is the BOL Page that describes how the four part names work.

How do I get a list of the reports available on any given reporting server?

I'm wanting to be able to input any given report server url and display a list of reports available on that server.
I found this question, and it's useful if I compile the project with a reference to a specific sql server (How do I get a list of the reports available on a reporting services instance). But (unless I'm just completely missing something which is possible) it doesn't show me how to do what I've stated above.
You could query the ReportServer database of your reporting server.
SELECT *
FROM dbo.Catalog
WHERE Type = 2
Should give you a list of all of the reports.
You can go to Web Service URL (note: not Report Manager URL). So if your main managing URL is http://server/Reports and Web Service URL is http://server/ReportServer - open the second one. It will give you raw listing of available items.
Note that this will include reports, datasources, folders etc.
Same as answer above,
with a use clause added at top
(in case this helps anyone ..) :
Use ReportServer;
SELECT *
FROM dbo.Catalog
WHERE Type = 2
Order by Name
I noted that select * above contains a field called Content which might be an issue for an export of result to excel .. So I tried a lesser list of columns :
Use ReportServer;
SELECT
ItemID,
Path,
Name,
ParentID,
Type,
Description,
Hidden,
CreatedByID,
CreationDate,
ModifiedByID,
ModifiedDate,
Parameter
FROM dbo.Catalog
WHERE Type = 2
Order by Name
The first answer above didn't seem to work for me ..
i.e. http://server/ReportServer
(replacing server with my reporting server name ..)
I get message "The webpage cannot be found" ..
Maybe this answer is version or security settings specific ?

Connect to Database server-side

I've essentially made a MVC application following the tutorial at http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs
I can upload it to a server and have the main page run just fine.. but running a different page that interacts with a database brings up the error
" Invalid object name 'dbo.Lyrics'. "
Now I can connect to the database that I'm trying to use (on the server) remotely using management studio just fine.. its called Lyrics and the table is Default.Lyrics ..
The connection string I'm using is "connectionString="Data Source=74.86.97.85;Initial Catalog=Lyrics;User Id=Default;Password=****;""
So my question is .. why is my application trying to use an object with the name "dbo.Lyrics" when my entire application doesn't have that text in it? How can I solve this?
I know that the dbo prefix means DataBase Owner.. and its like a public table.. but since I'm specifying a User ID shouldn't it look for tables with my ID as the prefix?
dbo at the beginning of an object name is a schema. Schemas partition the objects in your database. dbo is simply the default schema.
So, if you have an object named Lyrics, then it's really dbo.Lyrics.