(upbeat music)
- [Narrator] When you migrate on premises
Oracle databases to PostgreSQL on the AWS cloud,
you also need to update the SQL code in your applications.
This updated SQL code interacts
with the new PostgreSQL database,
instead of the old Oracle database.
AWS Schema Conversion Tool
automates conversion of database schemas in objects,
as well as the SQL code in your applications.
For an Oracle to post your SQL conversion,
AWS SCT dives deep into the application logic
and extracts SQL statements
from different application objects.
Then AWS SCT converts these SQL statements,
and inserts them back into your application code.
(upbeat music)
For C#, Java, and Pro*C applications, AWS SCT
uses language-specific application SQL code converters.
This video demonstrates how to use AWS SCT
to convert SQL code in C# applications.
(upbeat music)
For this demonstration video,
we created a new AWS SCT project,
and connected to our source Oracle database.
We also added a new mapping rule,
which establishes a source target pair.
This pair includes the source Chinook database schema
and a virtual PostgreSQL target.
(upbeat music)
After we converted this database schema,
we add C# application code to the AWS SCT project.
We enter a name of the C# application conversion project
and the location of the source application code.
This application uses the Chinook database schema.
Because we established a mapping rule for this schema,
AWS SCT highlights it in bold.
We choose this schema to add the C# application code
to the AWS SCT project.
AWS SCT displays the source application code
under the C# node in the source metadata tree.
(upbeat music)
Now we convert the SQL statements
embedded in the source application code.
AWS SCT analyzes the source code
and collects statements from different application objects,
such as functions, parameters, local variables, and so on.
We switch to the assessment report view
to review the conversion summary.
Several SQL code statements
require manual conversion actions.
You can save the extracted SQL statements to adjacent file.
(upbeat music)
For the string builder append source file,
AWS SCT extracted this SQL query.
This query consists of two parts,
which were located in different code objects.
In AWS SCT, we switch to the action items tab
and review the conversion action items.
(upbeat music)
You can see the code
of the string builder append source file in the left panel.
AWS SCT converts the SQL code, inserts it in the C# file,
and displays the result in the right panel.
(upbeat music)
AWS SCT creates a node
with your updated application source code files
in the target metadata tree.
Now you can save your application code
and build a new application
to interact with your new PostgreSQL database.
(upbeat music)
After you save the application code to files,
you can review them.
In the string builder append file,
you can see the converted SQL statement here.
You can review and edit your source application code here,
and then add it to your application project.
This completes the overview of SQL code conversion
in C# applications for Oracle to PostgreSQL migrations.
Thanks for watching this video.