An optical fiber BOCDA sensor for measuring a strain and a temperature at a certain position on a sensing fiber using Brillouin frequency shift, comprising: a probe light phase modulator and a pumping light phase modulator, which are adapted to be independently controlled, on a probe light optical fiber line and a pumping light optical fiber line, respectively, so that a time difference is formed in a phase code pattern created in each of the probe light phase modulator and the pumping light phase modulator, thereby adjusting a correlation peak position of pumping light and probe light on the sensing fiber, wherein the optical fiber BOCDA sensor is configured to adjust the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator to have the same form but have only a time difference, wherein the optical fiber BOCDA sensor is adapted to adjust a time difference of the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator so that the correlation peak position corresponds to a position of the sensing fiber on which measurement is to be performed, wherein the optical fiber BOCDA sensor is adapted to adjust bit widths of the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator according to a length of a section of a position on the sensing fiber on which measurement is to be performed, wherein the optical fiber BOCDA sensor is adapted to perform control to subtract a Brillouin spectrum obtained using a phase code pattern in which a bit width of a correlation peak position has a second size smaller than a predetermined first size from a Brillouin spectrum obtained using a phase code pattern in which a bit width of a correlation peak position has the first size, and wherein the maximum value of the bit width is the value of the bit width when the total sum of the Brillouin gains at the non-correlation position N-1 bits is equal to the Brillouin gain at one bit of the correlation position I 0 and wherein the minimum value of the bit width is the value of the bit width when the Brillouin gain I 0 occurring at the correlation position is equal to the Brillouin gain I c0 occurring in the entire length of the sensing fiber. a probe light phase modulator and a pumping light phase modulator, which are adapted to be independently controlled, on a probe light optical fiber line and a pumping light optical fiber line, respectively, so that a time difference is formed in a phase code pattern created in each of the probe light phase modulator and the pumping light phase modulator, thereby adjusting a correlation peak position of pumping light and probe light on the sensing fiber, wherein the optical fiber BOCDA sensor is configured to adjust the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator to have the same form but have only a time difference, wherein the optical fiber BOCDA sensor is adapted to adjust a time difference of the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator so that the correlation peak position corresponds to a position of the sensing fiber on which measurement is to be performed, wherein the optical fiber BOCDA sensor is adapted to adjust bit widths of the phase code patterns respectively created in the probe light phase modulator and the pumping light phase modulator according to a length of a section of a position on the sensing fiber on which measurement is to be performed, wherein the optical fiber BOCDA sensor is adapted to perform control to subtract a Brillouin spectrum obtained using a phase code pattern in which a bit width of a correlation peak position has a second size smaller than a predetermined first size from a Brillouin spectrum obtained using a phase code pattern in which a bit width of a correlation peak position has the first size, and wherein the maximum value of the bit width is the value of the bit width when the total sum of the Brillouin gains at the non-correlation position N-1 bits is equal to the Brillouin gain at one bit of the correlation position I 0 and wherein the minimum value of the bit width is the value of the bit width when the Brillouin gain I 0 occurring at the correlation position is equal to the Brillouin gain I c0 occurring in the entire length of the sensing fiber.