I am a programmer but I hate grammar. Here you will find what I did, doing , will do ... Scattered pieces of knowledge that I have deleted from my mind to the trash bin through out my boring daily coding life. I will also report some of my failures in life so dear to me not success, because I have always learnt much only when I fail.
Saturday, August 2, 2025
Sunday, July 27, 2025
Sunday, July 13, 2025
Wednesday, November 20, 2024
Monday, September 18, 2023
In SharePoint, understanding collections and schema is crucial when you want to migrate data to a SQL Server database
In SharePoint, understanding collections and schema is crucial when you want to migrate data to a SQL Server database. Here's an overview of these concepts:
1. Collections:
- In SharePoint, data is organized into collections of related items. The primary collection in SharePoint is the "List" or "Library." Lists are used for structured data, while libraries are typically used for documents. Each list or library contains items or documents, respectively. You can think of a collection as a table in a database.
2. Schema:
- In the context of SharePoint, schema refers to the structure or metadata associated with lists and libraries. This includes information about the fields or columns in a list, their data types, and any relationships between lists. SharePoint allows you to define custom fields and content types, which are part of the schema. Understanding the schema is essential because it defines the structure of your data.
Now, if you want to migrate data from SharePoint to a SQL Server database, here are the general steps you can follow:
1. Inventory Your Data:
- Start by understanding the structure of your SharePoint application, including the lists, libraries, and their schemas. Document the names of lists, the fields in each list, and any relationships between lists. This will be your data inventory.
2. Choose a Migration Approach:
- There are several ways to migrate data from SharePoint to SQL Server:
- Custom Scripting: You can write custom scripts or code (e.g., PowerShell, Python) to extract data from SharePoint using its APIs (e.g., REST API) and then insert it into SQL Server.
- Third-Party Tools: Consider using third-party migration tools that specialize in SharePoint to SQL Server migrations. These tools often simplify the process.
- SSIS (SQL Server Integration Services): If you're comfortable with SSIS, you can create packages to move data from SharePoint to SQL Server.
3. Map SharePoint Fields to Database Columns:
- For each SharePoint field, determine how it maps to a column in your SQL Server database. Ensure that data types, lengths, and constraints are compatible.
4. Extract and Transform Data:
- Use your chosen migration approach to extract data from SharePoint, transform it as needed (e.g., data cleansing, data type conversions), and prepare it for insertion into SQL Server.
5. Load Data into SQL Server:
- Insert the transformed data into your SQL Server database. You can use SQL Server's tools or programming languages like C# or Python, depending on your preference.
6. Verify Data Integrity:
- After the migration, verify that the data in SQL Server matches the data in SharePoint. Check for any discrepancies and resolve them as needed.
7. Schedule Incremental Updates (if necessary):
- If your SharePoint data is actively changing, consider implementing a mechanism for regular updates to keep your SQL Server database in sync.
Migrating data from SharePoint to SQL Server can be a complex process, and the specific steps and tools you use will depend on your SharePoint configuration and requirements. Be sure to thoroughly test the migration process in a non-production environment before performing it in a production setting to ensure data integrity and accuracy.
Thursday, May 18, 2023
Oracle SQL developer Error : No warning message but its automatically closed during installation.
If you're experiencing issues with Oracle SQL Developer installation. Here are a few troubleshooting steps you can try:
- Ensure system requirements: Verify that your system meets the minimum requirements for Oracle SQL Developer. Make sure you have a compatible operating system version and Java Development Kit (JDK) installed.
- Download the latest version: Visit the official Oracle SQL Developer website and download the latest version of the software. Sometimes, older versions may have compatibility issues with certain operating systems or Java versions.
- Check Java installation: Ensure that you have a compatible JDK installed on your system. Oracle SQL Developer requires Java 8 or later. Check that the Java installation is properly configured, and the JAVA_HOME environment variable is set correctly.
- Review installation logs: During the installation process, check if there are any log files generated that provide information about the error. Look for error messages or exceptions that might help identify the cause of the issue. The log files are typically located in the installation directory or in a separate "logs" folder.
- Run as administrator: Try running the installation program as an administrator. Right-click on the installation file and select "Run as administrator" to ensure that the installation process has the necessary privileges.
- Disable antivirus/firewall: Temporarily disable any antivirus or firewall software that might be interfering with the installation process. Sometimes, security software can prevent certain components or processes from being installed.
- Clean installation: If you have previously attempted to install Oracle SQL Developer, uninstall any existing installations and perform a clean installation. This ensures that any conflicting or corrupted files from previous attempts are removed.
Can we connect Oracle Developer to a running instance of Mysql ?
No, Oracle SQL Developer is primarily designed for connecting to and working with Oracle databases. It does not provide native support for connecting to MySQL databases.
However, there are alternative tools available that are specifically designed for connecting to MySQL databases. One popular option is MySQL Workbench, which is an official graphical tool provided by Oracle for MySQL database administration and development. MySQL Workbench allows you to connect to a running instance of MySQL and perform various tasks such as executing queries, managing database objects, and designing database schemas.
If you need to work with both Oracle and MySQL databases, you may consider using different tools for each database system. Oracle SQL Developer for Oracle databases and MySQL Workbench for MySQL databases. This allows you to leverage the features and capabilities specifically tailored for each database platform.
Does Oracle SQL Developer needs a running instance of the Oracle to be installed separately ?
No, Oracle SQL Developer does not require a separate installation of the Oracle database server to be running. Oracle SQL Developer is a standalone graphical tool for database development and administration. It can be installed and used independently of the Oracle database server.
However, to connect Oracle SQL Developer to an Oracle database, you will need the necessary connection details such as the hostname, port number, database name, username, and password. These details are required to establish a connection to the Oracle database server from Oracle SQL Developer.
Once you have the connection details, you can configure a new connection in Oracle SQL Developer and connect to the Oracle database server to perform various tasks such as executing SQL queries, managing database objects, and developing database applications.
Wednesday, January 25, 2023
what is the difference between using the SolrJ and Data Import Handler to synchronize Solr with the datatabase ?
Friday, May 29, 2020
Dev Tips#43 Connect MYSQL to a Jasper report in Java and JDBC
Settings.xml:
mirror1 central mirror1 https://repo.maven.apache.org/maven2/
net.sf.jasperreports jasperreports 6.8.0 jar compile commons-collections commons-collections commons-beanutils commons-beanutils commons-digester commons-digester commons-logging commons-logging commons-digester commons-digester 2.1 compile false mysql mysql-connector-java 5.1.6
package com.mycompany.mavenprojectdemov1;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* Hello world!
*
*/
public class App
{
public static Connection getDbaseConnection(String HOST_NAME, String DBASE_NAME,
String USER_NAME, String USR_PASS) throws SQLException,
ClassNotFoundException {
Class.forName("com.mysql.jdbc.Driver");
//String connectionURL = "jdbc:mysql://" + hostName + ":3306/" + dbName;
String CNTION_URL = "jdbc:mysql://" + HOST_NAME + "/" + DBASE_NAME;
Connection conn = DriverManager.getConnection(CNTION_URL, USER_NAME,USR_PASS);
return conn;
}
public static void main( String[] args )
{
//Database credential
String hostName = "localhost";
String dbName = "springboot";
String userName = "springboot";
String password = "springboot";
//Jasper file location
String fileNameJrxml = "E:/Jasper/jasperv1.jrxml";
String fileNamePdf = "E:/Jasper/jasperv1.pdf";
try {
//Getting a connection instance
Connection connInstance = getDbaseConnection(hostName,dbName,userName,password);
System.out.println("Loading the .JRMXML file ....");
JasperDesign jasperDesign = JRXmlLoader.load(fileNameJrxml);
System.out.println("Compiling the .JRMXML file to .JASPER file....");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
System.out.println("filling parameters to .JASPER file....");
JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(jasperReport, null,connInstance);
System.out.println("exporting the JASPER file to PDF file....");
JasperExportManager.exportReportToPdfFile(jprint, fileNamePdf);
System.out.println("Successfully completed the export");
} catch (Exception e) {
System.out.print("Exception:" + e);
}
}
}
Sunday, September 13, 2015
Android reload database on resume or restart.
From A we go to B and update the database. Then when we comeback at A
we notice that the A is not updated.
We have to implement the OnRestart in A, so that when the BACK button is pressed our
database is reloaded.
@Override
public void onRestart()
{
super.onRestart();
finish();
startActivity(getIntent());
}
You can also try OnResume too
@Override
public void onResume() {
super.onResume(); // Always call the superclass method first
finish();
startActivity(getIntent());
}
This is just a trick, hope it paved your way out.
Tuesday, December 9, 2014
Distributed database vs Distributed DBMS
However,
Distributed DBMS: the software system that permits the management of the distributed database and makes the distribution transparent to the users.