In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to back up SQL database files to the local", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to back up SQL database files to the local" bar!
Response.Charset= "utf-8"
Session.Codepage=65001
Response.Buffer=true
Response.Clear
Change the user name and password according to your situation
Constr= "Provider=SQLOLEDB.1;PersistSecurityInfo=True;UserID=endiva;Password=endiva;DataSource=211.160.78.6"
Setconn=server.createobject ("adodb.connection")
Conn.openconstr
Bkfname=server.mappath (Format_Time (Now (), 5) & "database.bak")
Sqlstr= "backupdatabasefangtodisk='" + bkfname+ "'withinit"
Conn.executesqlstr
Conn.close
Response.Write "database [fang] isbackupsuccess!
"
Response.Write "clickdownload"
How to back up SQL database files locally
If you want to back up and download directly, you can add this section below and it will be automatically saved after backup. But the pop-up file is a .asp file, modify it on OK.
'setfn=server.createobject ("adodb.stream")
'fn.mode=3' read and write
'The fn.type=1' data type is: adTypeBinary
'fn.open
'fn.LoadFromFilebkfname' mounts the file specified by bkfname into the object
'Response.ContentType= "application/octet-stream"
'Response.BinaryWritefn.read
'fn.close
Through the steps described above, you can easily back up the files of the SQL database to the local, convenient and fast, I hope everyone can have a good grasp, and then can help you in the future work.
Thank you for your reading, the above is the content of "how to back up the files of the SQL database to the local". After the study of this article, I believe you have a deeper understanding of how to back up the files of the SQL database to the local, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.