调度SQL SERVER自动备份
SQL SERVER的备份可以手动地执行,但在生产系统中,它的备份应该按周期自动执行。 在SQL SERVER中,可以利用SQL Maintenance Plan Wizard ,配置一个SQL Server Agent Job,来完成日常的备份
SQL SERVER的备份可以手动地执行,但在生产系统中,它的备份应该按周期自动执行。 在SQL SERVER中,可以利用SQL Maintenance Plan Wizard ,配置一个SQL Server Agent Job,来完成日常的备份
SELECT * FROM sys.dm_exec_sessions
exec sp_rename ‘old_table_name’, ‘new_table_name’
可以用 bcp 或 bulkinsert
从左到右分别是: 外键约束名,子表名,外键列名,父表名 select fk.name fkname , ftable.name ftablename, cn.name fkcol, rtable.name ftablename from sysforeignkeys join sysobjects fk on sysforeignkeys.constid = fk.id join sysobjects ftable on sysforeignkeys.fkeyid = ftable.id join sysobjects rtable on sysforeignkeys.rkeyid = rtable.id join syscolumns cn on sysforeignkeys.fkeyid = cn.id and sysforeignkeys.fkey = cn.colid
也就是说备份时仍可以提交事务,且备份过程不会破坏事务的一致性,具体来说: 当备份过程完成时: 1.已提交了的事务将在副本数据中得到体现 2.未提交的事务,在副本中会被回滚,数据仍然保持一致性 原文是这样的: The term consistent state means that all transactions that are committed while the backup is being performed are applied and all transactions that are not finished are rolled back.
MYSQL 新版出现 Client does not support authentication protocol requested by server时的解决办法zz MYSQL 帮助: A.2.3 Client does not support authentication protocol MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. If you upgrade the server to 4.1, attempts to connect to it …
Client does not support authentication protocol… Read More »
insert into tableName default values
最大可容纳 2^31 -1 个字节
select * from OPENDATASOURCE( ‘SQLOLEDB’, ‘Data Source=ServerName;User ID=MyUID;Password=MyPass’ ).dbname.dbo.tablename