I must create a post deploy script based on data from a previous sql server database. I'm making a data-only backup, but it must be done table by table due to avoid the cyclic dependency from the forward keys. For each table, I go to SQL Management Studio, go to task, generate script, configure the backup and generates data only backup. But this proccess done table by table takes much time and due to have to reconfigure each one of those times and is a quite boring process, it is also very sensitive to human error.
I would like to know if there's a way to create a script to make it. Can be some command in tsql, sqlcmd or powershell. Google just gives me the full backup for line command or some another process involving some kind of "windowed wizard" in case of backuping just one table, and it does not satisfy my restrictions.