SQLTeam.com | Weblogs | Forums

MsSql auto Script to backup data only


#1

Hello Everyone,

I am looking for a sql script to backup all data of all tables of a specific database, without the schema, data only.
I need this script so that I can execute it from code. As output would be great a text file.
I cannot use Ms Management Studio.

I would appreciate any help greatly, kindest blessings


#2

You can create daily backup job with the help of SQL Server Agent. To know more about please go this one it may be helpful to you. https://blogs.msdn.microsoft.com/sqlagent/2010/10/12/create-a-database-backup-job-using-sql-server-management-studio/


#3

Pity, because SSMS has an "Script all data in all/selected Tables to INSERT statements" which would do exactly what you want.

Sounds to me like you have access to the data, and want to export it into a different database, but don't have access to any tools. The only reasons I can think of that fit that scenario are dishonest, but hopefully you can reassure me that that is not the case ?


#4

why not? It's a free download


#5

Have you seen the incredibly bloated, slow loading mess that makes?


#6

Sure ... I'd only use it as a get-out-of-jail nothing-else-available user-incapable-of-better-solution situation ... :yak:


#7

Heh... I definitely get that, Kristen.


#8

@BolligeA,

You might want to look into using BCP (a program that comes with SQL Server) for doing your "text file, data only" exports.