I have requirement to get spool data from sql server and oracle into 2 seperate files from linux server. both db has one column account number to extact in both files
I can connect oracle server and spool data into file like sqlplus user/pass @spool.sql
to connect sql server sqlcmd which path or client software or pacakge needs to install on linux server or can i run that command on sql server from this server so no
need to install anything locally.
1.I need to know which sqlcmd(envinemnt setting in linux ) needs to use to connect sql server db and run given sql and get output in textfile without header/feedback.
2. need to comapre both data files and get different accountno file only for another sql server query
Below is the data from one file SQLSERVERFILE
AND below is the data from Oracle ORACLEFILE
So compaire above 2 files and create new files with missing records.
Output of NEWFILE
BUT I need output like - this is critical for me now.. how to keep accountno one by one
as this will be pass to another sql server query like where accountno in(5555,6666);
i also need to know if there is error then it will stop at taht process and give me someoutput saying it failed on which step.
create script with logfile to append
run sql server extracr cmd
check status for above run . good then go for next
run oracle sql extract cmd
find different accountno and create file with ,