--显示高级选项(仅需执行一次) EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE GO --允许执行xp_cmdshell EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE GO --添加映射驱动器 declare @string nvarchar(200) set @string = 'net use
--•显示高级选项(仅需执行一次)
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
--•允许执行xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
--•添加映射驱动器
declare @string nvarchar(200)
set @string = 'net use m: \\200.31.154.47\mis_backup "helloMIS555" /user:cfets-zfj60i4jl\LocalAdmin'
exec master..xp_cmdshell @string
--其中192.168.1.2为文件服务器的地址,db_backup为该服务器的共享文件夹,administrator 123456 分别为共享时设置的用户名密码。
--•备份数据库至本地
declare @date datetime
set @date = GetDate()
declare @str nvarchar(100)
set @str = 'E:\DatabaseBackup\ManagementInformation_backup_'+ convert(nvarchar(12), @date, 112) +'.bak'
backup database ManagementInformation to disk=@str WITH init
declare @strh nvarchar(100)
set @strh = 'E:\DatabaseBackup\Portal_backup_'+ convert(nvarchar(12), @date, 112) +'.bak'
backup database ManagementInformation to disk=@strh WITH init
--
--
--With init为覆盖同名文件(本例设计为1天执行一次,不会出现覆盖的情况)。
--
--•拷贝到文件服务器
declare @str1 nvarchar(100)
set @str1 = 'copy '+ @str +' m:'
exec master..xp_cmdshell @str1
set @str1 = 'copy '+ @strh +' m:'
exec master..xp_cmdshell @str1
declare @datecount int
set @datecount=1
declare @delstr nvarchar(100)
declare @deldate datetime
set @deldate=dateadd(dd,-30,getdate())
while @datecount
Begin
set @deldate=dateadd(dd,-1,@deldate)
Set @delstr='del m:\ManagementInformation_backup_'+ convert(nvarchar(12),@deldate, 112) +'.bak'
exec master..xp_cmdshell @delstr
Set @delstr='del m:\Portal_backup_'+ convert(nvarchar(12), @deldate, 112) +'.bak'
exec master..xp_cmdshell @delstr
set @datecount=@datecount+1
End
--•删除映射以及本地备份
exec master..xp_cmdshell 'net use m: /delete'
declare @str2 nvarchar(100)
set @str2 = 'del '+@str+''
exec master..xp_cmdshell @str2
set @str2 = 'del '+@strh+''
exec master..xp_cmdshell @str2
--7关闭允许执行cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
RECONFIGURE
GO

mysqlviewshavelimitations:1)supportallsqloperations、制限、dataManipulationswithjoinsorubqueries.2)それらは、特にパフォーマンス、特にパルフェクソルラージャターセット

reperusermanmanagementInmysqliscialforenhancingsecurationsinginuring databaseaperation.1)usecreateusertoaddusers、指定connectionsourcewith@'localhost'or@'% '。

mysqldoes notimposeahardlimitontriggers、しかしpracticalfactorsdeTerminetheireffectiveuse:1)serverconufigurationStriggermanagement; 2)complentiggersincreaseSystemload;

はい、それはssafetostoreblobdatainmysql、butonsiderheSeCactors:1)Storagespace:blobscanconsumesificantspace.2)パフォーマンス:パフォーマンス:大規模なドゥエットブロブスメイズ階下3)backupandrecized recized recized recize

PHP Webインターフェイスを介してMySQLユーザーを追加すると、MySQLI拡張機能を使用できます。手順は次のとおりです。1。MySQLデータベースに接続し、MySQLI拡張機能を使用します。 2。ユーザーを作成し、CreateUserステートメントを使用し、パスワード()関数を使用してパスワードを暗号化します。 3. SQLインジェクションを防ぎ、MySQLI_REAL_ESCAPE_STRING()関数を使用してユーザー入力を処理します。 4.新しいユーザーに権限を割り当て、助成金ステートメントを使用します。

mysql'sblobissuitable forstoringbinarydatawithinarationaldatabase、whileenosqloptionslikemongodb、redis、andcassandraofferferulesions forunstructureddata.blobissimplerbutcanslowdowdowd withwithdata

toaddauserinmysql、使用:createuser'username '@' host'identifidedby'password '; here'showtodoitsely:1)chosehostcarefilytoconを選択しますTrolaccess.2)setResourcelimitslikemax_queries_per_hour.3)usestrong、uniquasswords.4)endforcessl/tlsconnectionswith

toavoidcommonMonmistakeswithStringDatatypesinmysql、undultingStringTypenuste、choosetherightType、andManageEncodingandCollationsEttingtingive.1)Usecharforfixed-LengthStrings、Varcharforaible Length、AndText/Blobforlardata.2)setCurrectCherts


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

SAP NetWeaver Server Adapter for Eclipse
Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

WebStorm Mac版
便利なJavaScript開発ツール
