Answers for "python get backup of sql"

SQL
0

python get backup of sql

>>> import pyodbc
>>> connection = pyodbc.connect(driver='{SQL Server Native Client 11.0}', 
                                server='InstanceName', database='master', 
                                trusted_connection='yes', autocommit=True)
>>> backup = "BACKUP DATABASE [AdventureWorks] TO DISK = N'AdventureWorks.bak'"
>>> cursor = connection.cursor().execute(backup)
>>> connection.close()
Posted by: Guest on June-03-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language