有 21 筆資料符合您搜尋的條件

arvin
2021年 10月 27日, 16:21
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: [mysql] sql_mode
回覆: 1
觀看: 3703

[mysql] sql_mode

MySQL的sql_mode模式,mysql5.0版本以上支援了三種sql_mode模式,如下:

ANSI 寬鬆模式,對插入資料進行校驗,如果不符合定義型別或長度,對資料型別調整或截斷儲存,報warning警告。
TRADITIONAL 嚴格模式,當向mysql資料庫插入資料時,進行資料的嚴格校驗,保證錯誤資料不能插入,報error錯誤。用於事物時,會進行事物的回滾。
STRICT_TRANS_TABLES 嚴格模式,進行資料的嚴格校驗,錯誤資料不能插入,報error錯誤。

預設是:ANSI模式,請改成 STRICT_TRANS_TABLES
arvin
2014年 7月 18日, 15:32
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: [MSSQL]如何能將資料庫中的所有stored procedure給予某user執行權限
回覆: 4
觀看: 15870

Re: [MSSQL]如何能將資料庫中的所有stored procedure給予某user執行權限

補充一下,由於 2008 之後的版本有Diagrams,若有不小心點到時會自動處產相關的sp, fu, CLR and table, 若要過濾這些資料,可以改成以下的code。 declare @name nvarchar(255), @cmd nvarchar(1000), @loginame nvarchar(200) select @loginame = 'exec_role' declare cursor_sp cursor for select name from sysobjects where xtype in ('P', 'FN', 'FS', 'FT') and id not...
arvin
2013年 3月 18日, 16:20
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: restore master database
回覆: 0
觀看: 5174

restore master database

restore master database 1. sql server name: default or instance, sql server name need to be the same. 2. tempdb path: if not match, after restore the master database, we need to alter tempdb database file path 3. net stop mssql$instancename 4. net start mssql$instancename /m 5. sqlcmd -S servername\...
arvin
2013年 3月 11日, 17:11
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: SQL Server memory suggested value for Virtual / Max server
回覆: 0
觀看: 4509

SQL Server memory suggested value for Virtual / Max server

1. Virtual Memory : Greater than 8G for any physical memory sizes (example: 64G physical memory, Virtual Memory 8G) Difference: NOT MEMORY DUMP 2. Max Server Memory: Physical Max Server 2GB 1500 4GB 3200 6GB 4800 8GB 6400 12GB 10000 16GB 13500 24GB 21500 32GB 29000 48GB 44000 64GB 60000 72GB 68000 9...
arvin
2013年 3月 11日, 16:57
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: Force to drop cluster for Windows 2003 + SQL Server 2005
回覆: 0
觀看: 3953

Force to drop cluster for Windows 2003 + SQL Server 2005

1. Remove Programs Microsoft Office 2003 Web Components Microsoft SQL Server 2005 Backward compatibility Microsoft SQL Server 2005 Books Online Microsoft SQL Server 2005 Native Client Microsoft SQL Server 2005 Setup Support Files Microsoft SQL Server 2005 VSS Writer MSXML 6.0Parser SQLXML 4 2. Backu...
arvin
2013年 1月 10日, 17:54
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: 利用log shipping 做DR
回覆: 0
觀看: 3739

利用log shipping 做DR

A 異地備援 B Prepare 1. 將所有database 改成full Recovery model 2. 備份一份full backup 傳回A 3. A site 進行每天的Transaction log backup,並傳送至B site deploy 1. 在A site 設定 log shipping ,並將剩餘trn備份檔傳至B site 同步 Failover 1. revert log shipping database to normal database 2. 重設view, sp的server link 位置到B 3. 將application 切回B Post F...
arvin
2013年 1月 10日, 17:20
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: Log shipping & Mirror 原理
回覆: 0
觀看: 3525

Log shipping & Mirror 原理

今天做了一個lab,關於Log shipping & Mirror 有些結論
只要在Lsn 相同的狀況下:
1. 你要Log shipping 轉Mirror 或是相反,都是可以互轉的
2. 若發生failover狀況下,要failback 回去是可行的。
arvin
2013年 1月 10日, 17:12
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: Peer to peer replications add Articles
回覆: 0
觀看: 3128

Peer to peer replications add Articles

1. 要由Peer originatorid 低的開始手動加入
2. 兩邊加完DDL後,兩邊都要加articles
3. 等sync 完後,才能開始新增資料,否則會錯誤
arvin
2013年 1月 10日, 17:09
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: Peer to peer replications fix problem for DDL
回覆: 0
觀看: 2920

Peer to peer replications fix problem for DDL

原因:
在非Peer originator id 1 的server 上做DDL 的更動,造成peer to peer replications 發生issue。
避免再發生:
有任何的DDL更動需要在peer originator id 1 做,由replications sync structure。
解決方法:
1. 不可用reinitialize。
2. 只能將有問題的Articles 全部都移除,若有三個點,就需要將三個點都移除後等待replications 正常。
3. 等待正常後再將所有點的加入Articles 加回去即可。
arvin
2012年 11月 23日, 16:43
版面: 資料庫專區(SQL/ORACLE/MySQL/...)
主題: [SQL]將多筆資料中某一欄的資料轉作一列顯示
回覆: 0
觀看: 2719

[SQL]將多筆資料中某一欄的資料轉作一列顯示

可以使用 STUFF + FOR XML PATH('') 的方式如下: SELECT DISTINCT A.busid , A.drivername , A.insurlistnum , STUFF(( SELECT ', ' + insurchildname FROM @T1 B WHERE A.busid = B.busid FOR XML PATH('') ), 1, 1, '') AS [insurchildname] FROM @T1 A ; 原範例網址如列: http://www.dotblogs.com.tw/rainmaker/archive/2012/02/20/69625...