Recently, I logged into an old DB user that I had created on my desktop after quite some time. It was an older version of our software and so when the Services team reported a bug, I wanted to spin up the instance and try to debug the reason for the error.
When I tried logging into the DB, I kept getting the ORA-28001: The password has expired error. Now, I am familiar with changing password and I fired up a command prompt, logged in as the root. I ran the query below to change the password:
ALTER USER system_36 IDENTIFIED BY system_36_pass; -–system_36 is the existing username and password
When I tried logging in as system_36, it again gave me the same error of ORA-28001. On doing some research I found that by default the password expiry is set to 180 days. The account doesn’t fix itself simply by changing the password on it. I am outlining the solution that worked for me below:
1. Connect to the database with sysdba privileges (sys user).
2. Execute the following script to identify the profile for which you want to set the password life to unlimited from the regular 180 days default setting.


SELECT * FROM dba_profiles;


3. In case you want to apply the behavior to all future users, execute the query below else replace the DEFAULT profile with profile you want to change


ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;


4. Now to unlock the user account execute the following query


ALTER USER system_36 ACCOUNT UNLOCK;


5. Now you can change the password/apply the existing one again using the following query

ALTER USER system_36 IDENTIFIED BY system_36;

The user information is stored in dba_users table if you want to check and unlock other users 
Happens when try to compile OpenCV for MinGW C++ windows.

Following this post http://code.opencv.org/issues/4087, we must to change in file window_w32.cpp by inserting these in code:

#ifdef __GNUC__
#  pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
//Insert here
#if (_WIN32_IE < 0x0500)
#pragma message("WARNING: Win32 UI needs to be compiled with _WIN32_IE >= 0x0500 (_WIN32_IE_IE50)")
#define _WIN32_IE 0x0500
#endif
//End inserting

Then run mingw32-make again.
The steps are:
  1. Download CMake and install it (in the installation wizard choose to add CMake to the system PATH).
  2. Download the 'release' version of OpenCV.
  3. Extract the archive to a directory of your choice. I will be using c:/opencv/.
  4. Launch CMake GUI.
    1. Browse for the source directory c:/opencv/.
    2. Choose where to build the binaries. I chose c:/opencv/release.
      CMake Configuration - 1
    3. Click 'Configure'. In the screen that opens choose the generator according to your compiler. In our case it's 'MinGW Makefiles'.
      CMake Configuration - 2
    4. Wait for everything to load, afterwards you will see this screen:
      CMake Configuration - 3
    5. Change the settings if you want, or leave the defaults. When you're done, press 'Configure' again. You should see 'Configuration done' at the log window, and the red background should disappear from all the cells.
      CMake Configuration - 4
    6. At this point CMake is ready to generate the makefile with which we will compile OpenCV with our compiler. Click 'Generate' and wait for the makefile to be generated. When the process is finished you should see 'Generating done'. From this point we will no longer need CMake.
  5. Open MinGW shell (The following steps can also be done from Windows' command prompt).
    1. Enter the directory c:/opencv/release/.
    2. Type mingw32-make and press enter. This should start the compilation process.
      MinGW Make
      MinGW Make - Compilation
    3. When the compilation is done OpenCV's binaries are ready to be used.
    4. For convenience, we should add the directory C:/opencv/release/bin to the system PATH. This will make sure our programs can find the needed DLL's to run.
  6. Config in Eclipse
    1. Project properties => GCC C++ Compiler => Includes, add this as new line "C:\opencv_2_4_13\build\include"
    2. In MinGW Linker, add these lines at Libraries 

libopencv_contrib2413
libopencv_core2413
libopencv_features2d2413
libopencv_flann2413
libopencv_gpu2413
libopencv_highgui2413
libopencv_imgproc2413
libopencv_legacy2413
libopencv_ml2413
libopencv_nonfree2413
libopencv_objdetect2413
libopencv_photo2413
libopencv_stitching2413
libopencv_ts2413
libopencv_video2413
libopencv_videostab2413

          And "C:\opencv_2_4_13\{your_build}\lib" in Libraby search
Done.
The PL/SQL Debugger works pretty much out of the box when used with a previous Oracle version. These are the things we needed in place before we could start debugging PL/SQL:
  1. A grant of the DEBUG CONNECT SESSION privilege.
  2. EXECUTE privilege on DBMS_DEBUG_JDWP.
  3. EXECUTE privilege on the stored procedure you want to debug.
  4. Make sure the stored procedure is “Compiled for Debug”.
Jeff Smith talks about it in this post.
But what happens when you use Oracle 12c? You still need all the stuff that I mentioned but that’s not enough. See the error I got when I was trying to debug a procedure.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( ‘192.168.0.10’, ‘49428’ )
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at “SYS.DBMS_DEBUG_JDWP”, line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database SCOTT – ORA12CPDB1
Starting with Oracle 12c, if you want to debug PL/SQL stored procedures in the database through a Java Debug Wire Protocol (JDWP)-based debugger, such as SQL Developer or JDeveloper, then you must be granted the jdwp ACL privilege to connect your database session to the debugger at a particular host.
This is one way you can configure network access for JDWP operations:
1
2
3
4
5
6
7
8
9
10
11
BEGIN
 DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE
 (
 host => '192.168.0.10',
 lower_port => null,
 upper_port => null,
 ace => xs$ace_type(privilege_list => xs$name_list('jdwp'),
 principal_name => '"scott"',
 principal_type => xs_acl.ptype_db)
 );
END;
Note that there are double quotes in name
Host can can be a host name, domain name, IP address, or subnet.
Principal name in the access control entry (ACE) section is the schema that holds the stored procedures you want to debug.
Now the error goes away and you can start your debugging task.
Connecting to the database SCOTT – ORA12CPDB1.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( ‘192.168.0.10’, ‘49428’ )
Debugger accepted connection from database on port 49428.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.DISCONNECT()
Inside the Procedure
Process exited.
Disconnecting from the database SCOTT – ORA12CPDB1.
Debugger disconnected from database.
I hope this post saves you some time when you migrate to 12c.
Source: https://galobalda.wordpress.com/2014/02/17/sql-developers-plsql-debugger-and-oracle-12c/
1. Files should not commit:
- *.suo
- *.user
- *.sln.docstates
- Bin folder
- Obj/Debug folder

2. Always do clean project before commit code to avoid to generate dll file in bin folder

3. Use gitIgnore file, create manually or generate automatically by Git Setting/Repository Setting in Visual Studio
When use SOAP methods, you may consider that it's really difficult to see the exact data come out or come in the SOAP method. This is a way to get them.

Step 1: Create new classs

public class SoapLoggerExtension : SoapExtension
    {
        private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        private Stream oldStream;
        private Stream newStream;

        public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute)
        {
            return null;
        }

        public override object GetInitializer(Type serviceType)
        {
            return null;
        }

        public override void Initialize(object initializer)
        {

        }

        public override System.IO.Stream ChainStream(System.IO.Stream stream)
        {
            oldStream = stream;
            newStream = new MemoryStream();
            return newStream;
        }

        public override void ProcessMessage(SoapMessage message)
        {

            switch (message.Stage)
            {
                case SoapMessageStage.BeforeSerialize:
                    break;
                case SoapMessageStage.AfterSerialize:
                    Log(message, "AfterSerialize");
                    CopyStream(newStream, oldStream);
                    newStream.Position = 0;
                    break;
                case SoapMessageStage.BeforeDeserialize:
                    CopyStream(oldStream, newStream);
                    Log(message, "BeforeDeserialize");
                    break;
                case SoapMessageStage.AfterDeserialize:
                    break;
            }
        }

        public void Log(SoapMessage message, string stage)
        {

            newStream.Position = 0;
            string contents = (message is SoapServerMessage) ? "SoapRequest " : "SoapResponse ";
            contents += stage + ";";

            StreamReader reader = new StreamReader(newStream);

            contents += reader.ReadToEnd();

            newStream.Position = 0;

            log.Debug(contents);
            File.WriteAllText(@"C:\RawSOAPData_" + Guid.NewGuid() + ".txt", contents);
        }

        void ReturnStream()
        {
            CopyAndReverse(newStream, oldStream);
        }

        void ReceiveStream()
        {
            CopyAndReverse(newStream, oldStream);
        }

        public void ReverseIncomingStream()
        {
            ReverseStream(newStream);
        }

        public void ReverseOutgoingStream()
        {
            ReverseStream(newStream);
        }

        public void ReverseStream(Stream stream)
        {
            TextReader tr = new StreamReader(stream);
            string str = tr.ReadToEnd();
            char[] data = str.ToCharArray();
            Array.Reverse(data);
            string strReversed = new string(data);

            TextWriter tw = new StreamWriter(stream);
            stream.Position = 0;
            tw.Write(strReversed);
            tw.Flush();
        }
        void CopyAndReverse(Stream from, Stream to)
        {
            TextReader tr = new StreamReader(from);
            TextWriter tw = new StreamWriter(to);

            string str = tr.ReadToEnd();
            char[] data = str.ToCharArray();
            Array.Reverse(data);
            string strReversed = new string(data);
            tw.Write(strReversed);
            tw.Flush();
        }

        private void CopyStream(Stream fromStream, Stream toStream)
        {
            try
            {
                StreamReader sr = new StreamReader(fromStream);
                StreamWriter sw = new StreamWriter(toStream);
                sw.WriteLine(sr.ReadToEnd());
                sw.Flush();
            }
            catch (Exception ex)
            {
                string message = String.Format("CopyStream failed because: {0}", ex.Message);
                log.Error(message, ex);
            }
        }
    }

    [AttributeUsage(AttributeTargets.Method)]
    public class SoapLoggerExtensionAttribute : SoapExtensionAttribute
    {
        private int priority = 1;

        public override int Priority
        {
            get { return priority; }
            set { priority = value; }
        }

        public override System.Type ExtensionType
        {
            get { return typeof(SoapLoggerExtension); }
        }
    }
Step 2
Add web.confg or app.config as:
  <system.web>
    <webservices>
      <soapextensiontypes>
        <add group="0" priority="1" type="your namespace.SoapLoggerExtension, your assembly">
      </add></soapextensiontypes>
    </webservices>
  </system>

While working on a project I needed to start and stop SQL jobs via a web application, this worked great on my local machine but as soon as I published to the client web server I started getting SQLClrProvider not found exceptions.
For some reason this DLL is not readily available on the windows system so it’s not as simple as dropping a DLL into the bin folder, however the DLL does exist in the GAC (on your local machine, or any machine with SQL Server Installed)

The first thing you need to do is disable the GAC Shell extension which allows you to browse the GAC, to do this:
  1. Open “regedit”
  2. Navigate to HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Fussion
  3. Add a new DWORD or 32 bit DWORD named DisableCacheViewer with the Hex value of 0x1 or a decimal value of 1
That disables the GAC Shell allowing you to fully browse assembly folder, now we can extract the assembly from the GAC and drop it into the bin folder or the dll location on the client machine.
  1. Go to C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.SqlClrProvider\
  2. You may notice more than folder here, this is for each version of SQL server you have installed
  3. Since I’m running SQL 2012 I will enter the following folder: \11.0.0.0__89845dcd8080cc91
  4. You will then find the file Microsoft.SqlServer.SqlClrProvider.dll
After dropping the dll into the BIN folder I could start / stop and check SQL jobs via C# from a remote server.