Cannot locate user defined functions in SQL Server 2008 - sql-server-2008

First time using SQL Server 2008 this morning.
I am trying to find a user defined function that I created. I cannot locate it in the "Programmability>Functions" branch of the object explorer. Here is what that branch looks like:
There do not seem to be any "user defined functions" and I don't know if any of the particular branches should house that. I have been granted database owner rights to the database, so I don't believe it is a permissions issue...
I was able to retrieve the full text of the function using the 'EXEC sp_HelpText 'someUserDefinedFunction'' that was listed in this thread about finding user defined functions. That thread did not provide enough information for me to locate my function in object explorer or edit my function again using SMSS. Please see the full screenshot of my SQL Server 2008 Management Studio instance with the return from the sp_HelpText query for additional context.
The function works just fine when it is called. I retrieved this function from this thread about splitting delimited text.
I am hoping to find a location in the interface that displays all the user defined functions!

There is no "user defined functions" menu in SSMS. All functions except system are user defined. Based on return type you will find your function in "Table-valued", "Scalar-valued", or "Aggregate" (the latest is not really different from "Scalar-valued" in terms of return type though, but it can be used for aggregation). In your case check "Table-valued"

Related

Notify nearby users in cloud functions using geofirestore

I have 2 firestore collections - crews/{crew}/clients and crews/{crew}/pros. If a new client registers and a new document is created, I want to search collection pros for pros working the matching sector and living within 5 km (of the new client), and send notification to the pros filtered. In order to implement that in cloud functions,
I installed geofirestore using npm, saved crews/{crew}/pros like this;
https://i.stack.imgur.com/YwAFO.png
but after executing this function, I have error message on cloud functions console like this;
Error: Registration token(s) provided to sendToDevice() must be a non-empty string or a non-empty array
Is there anything wrong with my firestore data structure? Thank you.
I found that this data structure was correct, because I could get notification to work with this data structure. I tried another structure like this;
https://i.stack.imgur.com/vtB5X.jpg
However, it gave me another error.

Data Studio Connector can't get access token for BigQuery Service Account: Access not granted or expired

I'm trying to make a community connector to connect my database in BigQuery to data studio with the service account that I hooked up as the Owner/DataViewer/JobUser of the BigQuery project. I know that the service account works when connecting to BigQuery because I've tested it elsewhere. I copied from the connector code from this tutorial (https://developers.google.com/datastudio/solution/blocks/using-service-accounts) almost exactly, replacing the SQL string with my query and adding some different query parameters. I also stored the service account's credentials in my script properties by pasting the json object and storing it like:
var service_account_creds_obj = {
"type": "service_account",
"project_id": ...
...
}
scriptProperties.setProperty('SERVICE_ACCOUNT_CREDS', JSON.stringify(service_account_creds_obj));
However, I always get stuck in the flow when my getData function calls getOauthService().getAccessToken(), which doesn't ever successfully return. When I create a report using the connector, I get this error: "Access not granted or expired." I can't find the documentation for getAccessToken and I'm having trouble understanding why it won't terminate. I can see that it doesn't return because a console.log immediately before that line displays but it never gets to the log on the next line. Then my try-catch block catches the error that I'm seeing. Note that my getOauthService function is exactly the same as the one from the documentation/tutorial example, except that I've played around with the input text in the call to createService. That input text shouldn't really matter though right?
Please, I've been trying to debug this for hours, but the documentation on this is pretty horrible, and it's really hard to debug since the flow of the code is handled in the background and stackdriver logging is really buggy.
I figured out my problem. The documentation posted above said to set the OAuth2 scope to https://www.googleapis.com/auth/bigquery.readonly. However, I naively included
"oauthScopes": ["https://www.googleapis.com/auth/bigquery.readonly"]
in my manifest file. Meanwhile, the code I copied over from the documentation already included this line:
.setScope(['https://www.googleapis.com/auth/bigquery.readonly']);
So I'm not sure exactly why this caused a problem. But it must have prevented the OAuth2.createService function from properly getting set.

Google Data Studio - When is resetAuth() being called?

I am having troubles with the resetAuth() function. I implemented it roughly like this example, but I have no idea when it is being called. Adding a console output and observing the Stackdriver Log tells me that this function is never being called during what I would call a normal workflow.
The documentation is weirdly brief and is missing this part about why I need to implement it and when it is being called. Do I need to call resetAuth() manually on some point? Is there a button somewhere that calls this function?
I'm using the AuthType USER_PASS by the way and everything else seems to work just fine after some investigation and debugging.
I found this document called Community Connectors Developer Launch where, among other things, the following it listed (as of 2018-07-30):
What's next: Upcoming changes and improvements
Some of the features and improvements we'll be working on in the
coming months include:
Configuration and Authentication
Capability to execute the resetAuth function of community connectors from within Data Studio.
Does this mean that calling resetAuth() is currently not yet implemented?
resetAuth is called when the user revokes access to the connector via the https://datastudio.google.com/datasources/create endpoint.
There was a bug that caused this function to not be called for certain auth types, but it has been resolved.

PHP: phpinfo function gives "no value" for some fields

I recently went to some hosting provider website, registered and so on.
At one moment, I tried to run some functions, with no result at the end.
Then I decided to see phpinfo() page, and I have noticed, that, in certain fields,
there is declared as:
no value
In this case, I was interesed in value of:
**
disable_functions : no value
**
Does that mean, that there is really not declared what functions are disabled, or that field is not showing any value as it is managed to not show value in server configuration?
In example:
Functions like shell_exec, fopen and so on are disabled, but server is configured that way to not show me that? Or it really does not have any value?
no value means php.ini contains no value for that directive. The user who is running the server or php process are disabled to run those functions (shell_exec, fopen) or system calls that those functions invoke.

UserID and Data Driven Subscriptions

I am trying to create a data driven subscription for a report that uses #UserID to filter the results (for security purposes). The solution I've seen referenced as the answer to several similar questions is a broken link.
We'd like to have a version that a user can access online as well as the subscription report that is emailed. Is there any way to do this without having two versions of the report (one with userID and one without)?
We have developed a solution that allows the same report to be used for live access as well as data-driven subscriptions (DDS). It is based on the concept found at the link provided by djphatic
To start, we return the #User value using custom code added to the report, instead of the User!UserID function which will make the DDS choke. The code is similar to the Prologika solution, but I found it at another online source--my apologies for not remembering where I found it. The code is:
Public Function GetHashedUser()
Try
Return Report.User!UserID
Catch
Return " "
End Try
End Function
For the user parameter default value we use:
=Code.GetHashedUser()
This returns the User!UserID if the report is being run live.
The data-driven subscription needs to have the user and other parameters passed using the query for the subscription. Since any parameters passed this way will be visible in the URL, we use a hashed version of the userID (called the userkey). The userkey corresponds to a value in our security table and can identify the user and their associated permissions. We don't encrypt the other filters, since they are based on the user and are used for drill-downs.
Please see the link below. I've not tested this myself but I've seen this solution mentioned before.
http://prologika.com/CS/blogs/blog/archive/2011/03/28/data-driven-subscriptions-and-row-level-security.aspx