@Reema
You didn't indicate whether you're planning to use NiFi using an on-premises installation or at at cloud services provider, but in general, yes someone with a sufficient understanding of how to set up NiFi should be able to migrate data from one RDBMS, such as DB2, to another RDBMS, such as SQL Server with a bit of effort. You say you don't know anything about NiFi, so you probably won't be able to achieve your goals without some preliminary learning of the fundamentals on your part, but it will prove to be well worth it.
There are a wealth of resources on the Internet for learning NiFi. I'd personally recommend that you start by downloading the e-book Apache NiFi for Dummies and reading it. Then, you can dive deep by viewing the recording of Apache Nifi Crash Course from the Spring of 2018.
If that's not enough, you can review the links offered in response to a previous time when the second part of your question was asked and answered on the cloudera community here:
How to learn NiFi practically for beginners…Please send me any books or links of blogs.
Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.