SQL Server – Finding a User Name in Instance Objects

If it's in the text of a proc / function, you can use the simple and free third-party plugin from redgate: SQL Search, there are also ways to do it with TSQL. See the answer to the question about stackexchange for searching procedures.

However, it is very likely that your proc will look for the value in a table that stores it, so it does not need to be hard-coded.
If you want to perform a simultaneous search in several columns, this link can be useful:
String search in different tables

python – Get "sequence index is not an integer, slice or instance with __index__" on pylint

Im doing a python code that does the data validation, but suddenly I got this error and I donI do not know why, can anyone explain it to me?

import sys
import math 
from math import pi


class SetShape:
        def __init__(self):
            self.IV_set_shape=0
            self.IV_set_shape_valid=False
            self.IV_set_color=""
            self.IV_set_color_valid=False
        def setShape(self,shapechoosing=None):
            call_function= {}
            debug_data= ()
            return_msg= "ClassName:setShape"
            call_function=(((shapechoosing,True, len(1))))
            debug_data.append(call_function)
            if call_function("sucess") !=True:
                self.IV_set_shape= False
                return_msg= "input validation failed"
                return {"return message":return_msg,'debug data':debug_data}
            self.IV_set_shape= shapechoosing

How to get the Jupyter Notebook URI open in a VM cloud instance for use in VS code?

I need help to connect to an open Jupyter notebook server in a google cloud VM instance. I was able to open a Jupyter notebook session in a browser with SSH on the virtual machine by following this article and Google documentation https://towardsdatascience.com/running-jupyter-notebook-in-google-cloud -platform-in-15- min-61e16da34d52.

I then tried to enter "ip-address: port-no" for the jupyter notepad server in vs code, where ip is the external IP address of the instance of the virtual machine and port no is the port on which jupyter is open. job. The VS code says that the URI is invalid. I have not found any information or help regarding this site online.

Can someone who has any experience whatsoever with this could help me since it's the first time I've been using VS code and Google Cloud in this way.

Thank you!

Why would a Google Cloud instance tag drop packets?

I have a VPC with two VM Compute Engine instances. One of them, vpn-server, acts as a VPN for a cluster of on-premises computers. L & # 39; other, test-instance, is configured with an instance tag route-through-vpn which routes traffic to the vpn-server if it's okay 10.10.0.0/19.

There is also an AppEngine instance that has the route-through-vpn instance tag. The webapp that runs on it can connect directly to our on-premises cluster.

This configuration worked well for over a year. Then yesterday, a small number of IP addresses suddenly stopped working.

By "stopped working" I mean this:

  • It is still possible to SSH in IP addresses that do not work if you are connected to the vpn-server.
  • But traffic from test-instance can not reach these IPs.

One of the failing IP addresses is 10.10.0.8. An IP address that always works is 10.10.0.47. As far as I know, all addresses correctly match the range of addresses 10.10.0.0/19.

To debug, I connected to vpn-server and the test-instance and tried to send ICMP packets from test-instance to various IP addresses in the cluster. I've also run tcpdump on the vpn-server so that I could see the traffic as it passed.

For IP addresses that still work, I saw ICMP packets in the output of tcpdump, as expected. But for IP addresses that do not work anymore, I do not see anything in tcpdump, indicating that the Gcloud routing layer does not even send traffic to my vpn-server.

To test further, I stopped one of the local machines whose traffic was correctly routed and I tried to ping it. The ICMP echo request packets appeared in the output of tcpdump unanswered, exactly as planned.

The Google Cloud routes do not offer many options and there is no information available that could help me further my research. So it's now up to someone to know why this would happen.

Has anyone solved a problem of this type or does he have any idea of ​​what might be causing it?

c # – Retrieve lists from a static class method or instance method?

I'm trying to check the integrity of the lists of a database.

Can I use a static method to return a modified list based on a past parameter?

Also, to what extent can I use static methods to return lists? Can any one give me concrete examples? The code works well, but recently had an epiphany.

Here is an example:

            /// 
            /// Returns list of All Projects based on array of enum StatusOfProject
            /// 
            /// 
            /// 
            public static IEnumerable List(params Status() theStatus)
            {
                ThrowIf.Argument.IsNull(theStatus);
                var selectedStatus = new List();
                foreach (Status nextStatus in theStatus)
                {
                    string theQuery = "select JobNo from ProjectLog where StatusID = " + (int)nextStatus + "  order by JobNo desc";
                    using (SqlDataAdapter theSqlAdapter = new SqlDataAdapter(theQuery, TheUtils.OurDBHelpers.GetOurConnectionString()))
                    {
                        DataSet theDataset = new DataSet();
                        theSqlAdapter.Fill(theDataset, "Table");
                        DataTable theDataTable = theDataset.Tables("Table");
                        selectedStatus.AddRange(theDataTable.AsEnumerable().Select(row => row("JobNo").ToString()));
                    }
                }

                return selectedStatus;
            }

16.04 – Disassembling and detaching volumes on an aws ec2 instance does not work?

Hello, good Ubuntu community!

I'm working on an EC2 instance under Ubuntu 16.04LTS.

I have 3 volumes attached to my instance.
1 is the normal production volume with all current live data and the other two have been used for backup for some time.

command to see my device information:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

NAME                        FSTYPE   SIZE MOUNTPOINT   LABEL
xvda                                 250G
└─xvda1                     ext4     250G /            cloudimg-rootfs
xvdf                                 250G
└─xvdf1                     ext4     250G /backup      cloudimg-rootfs
xvdg                                 250G
└─xvdg1                     ext4   232.9G /backup/3jun
loop0                       ext4     100G
└─docker-202:1-4237516-pool          100G
loop1                                  2G
└─docker-202:1-4237516-pool          100G

I did:
sudo umount dev / xvdf1

sudo umount dev / xvdg1

went to my AWS console and detached the volumes.

restarted the command to display device information. xvdg1 and xvdf1 are gone.

Restarting the instance and when I try to connect to it, the following error message is displayed: "connection refused" and I can no longer use ssh in the instance .
the xvdg1 and xvdf1 are just backups made more than a year ago and i get paid a lot by aws for having these volumes and i want to make them go away, any advice?
btw: I just tied them back from the aws console and now I can use ssh in my instance, but I really want to be able to unmount them and just delete them because it's only 500GB of d & # s 39 old backups that I do not need, if someone can help I would appreciate it.

Thank you!

Authentication – Can not Connect to SQL Server Database Instance Using Integrated Security

This question already has an answer here:

We are on SQL Server 2012 (SP4) 11.0.7001.0 (X64) Standard Edition (64-bit)

On one of our production servers, we can not connect to the instance with the help of Windows authentication. This error occurs:

"The target principal name is incorrect Can not generate SSPI context (Microsoft SQL Server)"

SQL Server authentication works well.

Please indicate where and what to look for to solve this problem.

sql server – Adds a distribution list as a connection to an instance managed by azure sql

I am able to add individual AD connections as a connection in an instance managed azure sql, when I try to add a DL, it is as if I had the following error.

Error: Main & # 39; not found or this type of principal is not supported.

User request: CREATE A CONNECTION [] FROM AN EXTERNAL SUPPLIER
TO GO

Want to add a distribution list as a user so that anyone using this list can access the instance, is not it possible?
What am I doing wrong here?

What software / installations are required on a server hosting an Oracle schema only; not a database instance?

Planning the configuration of a server hosting an Oracle schema only; not the database itself. What software installations are required? Should I install a full / standard Oracle instance?

Is the AWS EC2 instance considered a cluster?

Are individual Amazon Web Service EC2 instances considered a cluster, or should a cluster be composed of multiple EC2 instances to be considered a cluster?