Situation:
Could not allocate space for object 'dbo.SORT temporary run storage: 141564582166528' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup
Solution:
CHECKDB (Part 6): Consistency checking options for a VLDB
Once you set up SQL Log Shipping, it will produce 4 Major jobs:
I assume the Primary server is R1, the Secondary is R2
I assume the Primary server is R1, the Secondary is R2
- Alerts (Both on Primary R1 and Secondary R2)
- Backup (On Primary)
- Copy (On Secondary)
- Restore (On Secondary)
Recently our Domain team created an exclusive OU for DBA. I’d like to control all the SQL service accounts. But SQL server not only has SQL Engine and SQL Agent accounts but also SSIS/SSAS/SSRS/Full Text, etc.....
How do I know all the accounts in SQL Server? If you have SQL 2008+, you can use a new DMV “sys.dm_server_services”.
If you have SQL 2005, you have to use undocumented “xp_regread” function to read registry records that in Windows Server.
It’s also fit to SQL 2008+…
How do I know all the accounts in SQL Server? If you have SQL 2008+, you can use a new DMV “sys.dm_server_services”.
If you have SQL 2005, you have to use undocumented “xp_regread” function to read registry records that in Windows Server.
It’s also fit to SQL 2008+…
Limitation:
In order to be compatible with SQL 2005 ( no default value for T-SQL variable), I changed the code script method.
A lot of posts that used “RESTORE FILELISTONLY” and “BackupSet” table to grab backup files.
Yes, I agree it would be more accurate for latest backup and correct LSN/DB logical name. But if someone drop/detach DB and left backup histories and backup files. It would be incorrect. Additional, sometimes when you use “RESTORE FILELISTONLY” to grab backup files, it will show “Access Denied” message.
In order to avoid the problem, I use “sys.Master_files” table to match “Backupset” and “BackupsetMediafamily”.
Severity: 14, Logon Login failed . Reason: Failed to open the explicitly specified Database
No comments2014-11-10
I tried to figure it out from someone recommend to find out who tried to login the database.
The user is me and is a database sysadmin. So it slap backup the wrong solution.
What caused it?
The user is me and is a database sysadmin. So it slap backup the wrong solution.
What caused it?
Situation:
I created the customized SQL Endpoint for 3rd party vendor uses. I grant "Connection" permission for the account. Deny "Public" connect to Default [Tcp] Endpoint.
Turn on Firewall (ex: port 4999), Allow Remote Connection in SQL, Enable Tcp portocol, Name Pipe, SharedMemory. But it still showed the Error 64 even if the account was successfully established.
There are two facts of table that DBA want to check
1. For Tables structural change
1. For Tables structural change
IF OBJECT_ID('tempdb..#lastaccess1') IS NOT NULL
DROP TABLE #lastaccess1;
CREATE TABLE
#lastaccess1(
[DBName]
sysname,
[TableNames] NVARCHAR(256),
[create_date] datetime,
[modify_date] datetime,
)
DECLARE @Statement1 VARCHAR(4000)
SET @Statement1 = 'USE [?]
SELECT
''?'' as [DBNAME], [TableName] =
name,
create_date, modify_date
FROM
sys.tables
ORDER BY modify_date DESC'
INSERT INTO #lastaccess1([DBName] ,[TableNames]
,[create_date],
[modify_date] )
EXEC sp_MSforeachdb @Statement1;
SELECT * FROM #lastaccess1 WHERE
[DBNAME] not in ('master', 'msdb','model','tempdb');
DROP TABLE #lastaccess1;
The situation depends on what your SQL environment are? For
my case, I need to “DENY IMPERSONATE ON LOGIN::” to most of DBA logins and
general Logins except real necessary DBAs. But I don’t like to COPY/PASTE
command for lots users (if your server has over 20 accounts), so I created a
script to do this.
It’s an inefficient T-SQL script due to my desperate boss wants to see
the results for all SQL instances… if you can modify it for me, I will be very
appreciated.
Subscribe to:
Posts (Atom)

