Skip to content

Commit 25c6178

Browse files
committed
Fix | Adding JAVA syntax highlight
1 parent 5ba937b commit 25c6178

23 files changed

Lines changed: 50 additions & 50 deletions

docs/connect/jdbc/accessing-diagnostic-information-in-the-extended-events-log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ manager: craigg
2929

3030
The JDBC Driver also sends a thread-specific activity ID. The activity ID is captured in the extended events sessions if the sessions are started with the TRACK_CAUSAILITY option enabled. For performance issues with an active connection, you can get the activity ID from the client's trace (ActivityID field) and then locate the activity ID in the extended events output. The activity ID in extended events is a 16-byte GUID (not the same as the GUID for the client connection ID) appended with a four-byte sequence number. The sequence number represents the order of a request within a thread. The ActivityId is sent for SQL batch statements and RPC requests. To enable sending ActivityId to the server, you first need to specify the following key-value pair in the Logging.Properties file:
3131

32-
```
32+
```java
3333
com.microsoft.sqlserver.jdbc.traceactivity = on
3434
```
3535

docs/connect/jdbc/always-encrypted-api-reference-for-the-jdbc-driver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ New types in **microsoft.sql.Types** class
160160

161161
**Syntax**
162162

163-
```
163+
```java
164164
Public enum SQLServerStatementColumnEncryptionSetting
165165
```
166166

docs/connect/jdbc/azure-key-vault-sample-version-6.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ manager: craigg
2121
## Sample application using Azure Key Vault feature
2222
This application is runnable using JDBC Driver 6.0.0 and Azure-Keyvault (version 0.9.7), Adal4j (version 1.3.0), and their dependencies. The underlying dependencies can be resolved by adding these libraries to the pom file of the project as described [here](../../connect/jdbc/feature-dependencies-of-microsoft-jdbc-driver-for-sql-server.md):
2323

24-
```xml
24+
```java
2525
import java.net.URISyntaxException;
2626
import java.sql.Connection;
2727
import java.sql.DriverManager;

docs/connect/jdbc/azure-key-vault-sample-version-6.2.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ manager: craigg
2121
## Sample application using Azure Key Vault feature
2222
This application is runnable using JDBC Driver 6.2.2 and above and Azure-Keyvault (version 1.0.0), Adal4j (version 1.4.0), and their dependencies. The underlying dependencies can be resolved by adding these libraries to the pom file of the project as described [here](../../connect/jdbc/feature-dependencies-of-microsoft-jdbc-driver-for-sql-server.md):
2323

24-
```xml
24+
```java
2525
import java.net.URISyntaxException;
2626
import java.sql.Connection;
2727
import java.sql.DriverManager;

docs/connect/jdbc/building-the-connection-url.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ manager: craigg
5050
5151
The following connection string shows an example of how to connect to a [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] database using integrated authentication and Kerberos from an application running on any operating system supported by the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)]:
5252

53-
```
53+
```java
5454
jdbc:sqlserver://;servername=server_name;integratedSecurity=true;authenticationScheme=JavaKerberos
5555
```
5656

docs/connect/jdbc/configuring-how-java-sql-time-values-are-sent-to-the-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ manager: craigg
5454

5555
Note that sendTimeAsDatetime must be false for encrypted columns as encrypted columns do not support the conversion from time to datetime. Beginning with Microsoft JDBC Driver 6.0 for SQL Server, the SQLServerConnection class has the following two methods to set/get the value of the sendTimeAsDatetime property.
5656

57-
```
57+
```java
5858
public boolean getSendTimeAsDatetime()
5959
public void setSendTimeAsDatetime(boolean sendTimeAsDateTimeValue)
6060
```

docs/connect/jdbc/connecting-to-an-azure-sql-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ shutdown /r /t 1
7979

8080
For example:
8181

82-
```
82+
```java
8383
jdbc:sqlserver://abcd.int.mscds.com;databaseName= myDatabase;user=myName;password=myPassword;encrypt=true;hostNameInCertificate= *.int.mscds.com;
8484
```
8585

docs/connect/jdbc/connecting-to-sql-server-with-the-jdbc-driver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ manager: craigg
2222

2323
If a [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] is only listening on an IPv6 port, set the java.net.preferIPv6Addresses system property to make sure that IPv6 is used instead of IPv4 to connect to the [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)]:
2424

25-
```
25+
```java
2626
System.setProperty("java.net.preferIPv6Addresses", "true");
2727
```
2828

docs/connect/jdbc/connecting-with-ssl-encryption.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ manager: craigg
2424

2525
The following code example demonstrates how to set the **trustServerCertificate** property in a connection string:
2626

27-
```
27+
```java
2828
String connectionUrl =
2929
"jdbc:sqlserver://localhost:1433;" +
3030
"databaseName=AdventureWorks;integratedSecurity=true;" +
@@ -37,7 +37,7 @@ String connectionUrl =
3737

3838
The following code example demonstrates how to set the **trustStore** and **trustStorePassword** properties in a connection string:
3939

40-
```
40+
```java
4141
String connectionUrl =
4242
"jdbc:sqlserver://localhost:1433;" +
4343
"databaseName=AdventureWorks;integratedSecurity=true;" +
@@ -49,7 +49,7 @@ String connectionUrl =
4949

5050
The following code example demonstrates how to use the **hostNameInCertificate** property in a connection string:
5151

52-
```
52+
```java
5353
String connectionUrl =
5454
"jdbc:sqlserver://localhost:1433;" +
5555
"databaseName=AdventureWorks;integratedSecurity=true;" +

docs/connect/jdbc/fips-mode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Vendors may have some additional steps to configure JVM with FIPS.
3636
### Ensure your JVM is in FIPS Mode
3737
In order to ensure your JVM is FIPS enabled, execute the following snippet:
3838

39-
````
39+
```java
4040
public boolean isFIPS() throws Exception {
4141
Provider jsse = Security.getProvider("SunJSSE");
4242
return jsse != null && jsse.getInfo().contains("FIPS");
4343
}
44-
````
44+
```
4545

4646
## Appropriate SSL Certificate
4747
In order to connect SQL Server in FIPS mode, a valid SSL Certificate is required. Install or import it in the Java Key Store on the client machine (JVM) where FIPS is enabled. If you did not import / install the appropriate certificate, you could not be able to connect to SQL Server as a secure connection cannot be made.
@@ -50,7 +50,7 @@ In order to connect SQL Server in FIPS mode, a valid SSL Certificate is required
5050
For FIPS, most likely you need to import the certificate (.cert) to either PKCS or in a provider-specific format.
5151
Use the following snippet to import the SSL certificate and store it in a working directory with the appropriate KeyStore format. _TRUST_STORE_PASSWORD_ is your password for Java KeyStore.
5252

53-
````
53+
```java
5454
public void saveGenericKeyStore(String provider, String trustStoreType, String certName, String certPath) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, IOException {
5555
KeyStore ks = KeyStore.getInstance(trustStoreType, provider);
5656
FileOutputStream os = new FileOutputStream("./MyTrustStore_" + trustStoreType);
@@ -67,7 +67,7 @@ Use the following snippet to import the SSL certificate and store it in a workin
6767
return cf.generateCertificate(fis);
6868
}
6969

70-
````
70+
```
7171

7272

7373
The following example is importing an Azure SSL Certificate in PKCS12 format with BouncyCastle Provider. The certificate is imported in the working directory named _MyTrustStore_PKCS12_ by using the following snippet:

0 commit comments

Comments
 (0)