Hot answers tagged database-administration
Right click on the database, go to files. You can see the original file names. This will help you to find the correct database name easily. The file names won't be changed on a rename. You can also try to take a look at your fn_dblog. It's undocumented but you can see (and filter) for the latest actions. SELECT * FROM fn_dblog(NULL,NULL)
I doubt you would have a database in production whose name you do not know or not have documented it somewhere. If incase it happens in production, You could look up list of existing backups using RESTORE HEADERONLY FROM DISK = '<backuplocation>' Or use dbo.backupset from msdb. SELECT DISTINCT database_name FROM msdb.dbo.backupset
You could look at the SQL Server Logs for the last time SQL Server started up and look out for each instance of 'Starting up database 'DBName'. You could then compare this list against the results of sys.databases. Any new databases and the one you changed will not be in the SQL Server log list. Another, perhaps better way would be to query the default ...
Actually there is a way to automate being notified of an update for SQL Server, there are two actually. Windows Server Update Services If you are using WSUS in your environment you can setup an email notification report. I am not sure how granular you can get with this report but expect there is some way of setting up a report for only your SQL Server ...
My answer doesn't answer your question directly, but addresses your method of operation. You shouldn't be logging in as postgres, just like you shouldn't be logging in as root on your servers. On your servers you should be logging in as real users and be using sudo for the odd occasion that you need superuser privileges. And preferably sudo su - ...
sp_executesql creates a new execution context which ceases to exist when the executed statements return. The USE only has effect within the sp_executesql. Try this SET @SQL02 = 'USE ['+ convert(nvarchar(50),@dbName) +']; SELECT DB_NAME();' and you'll get what you're after.
You will find listener.ora in here: %ORACLE_HOME%/network/admin The usual problem is that %ORACLE_HOME% isn't set as a system variable and not exposed to a command shell. My quickest way to locate ORACLE_HOME from the command shell is: C:\>where sqlplus The full path to the executable will show. Go there. Go one up, and add /network/admin ...
You can use a third party tool Idera Diagnostic Manager to identify the growth and cost. There is a report inbuilt which forecast database and table growth depending upon how much historical data it has. You can also set up this with the help of combination of TSQL + Powershell as described Database Space Capacity Planning by chad. It will help you in ...
You can easily change the schema ownership to dbo, then you should be able to drop the user, and add them back using ALTER AUTHORIZATION: ALTER AUTHORIZATION ON SCHEMA::[schema_they_own] TO dbo; DROP USER [user_name]; ALTER AUTHORIZATION ON DATABASE::[database_name] TO login_name; Now, they will be the dbo user in the database (and will have automatic ...
There can be many reasons for that. You're queries run and generate a version, during another query use the same tables. During this phase version 1 will be hold back. If your transaction isn't commited at the end, it may occur that version 1 will last for a long time in your tempdb. Make sure that all transactions are probably commited and closed. Make ...
If you did it with a GRANT, run the corresponding REVOKE. Or you could run this. (Suggest you dump mysql.user first, just in case.) DELETE FROM mysql.user WHERE user = 'root' AND host = '%';
romeo, before I craft a reply, I want to ask: Is there any chance you have the opportunity to edit the schema in this case? If you can, you definitely should, because the problems you're running into are because of denormalization. Normalization of the schema From your example table above, it appears this should be split into at least two separate tables. ...
You could subscribe to the RSS feed on Brent Ozar's new site sqlserverupdates.com He keeps an up to date list of the latest Service Packs and Cumulative Updates required for each version of SQL Server since 2005.
No, there is not an automated way to have SQL Server notify you, but there are several good resources for checking in this question, such as sqlserverbuilds.blogspot.com.
I was going to just comment the link to the SQL Server 2012 Best Practice security white paper...but found out Microsoft took it off the Internet for some reason. You might be able to find a cached version of it some where online, but I will paste in the contents of contained database section of the document here. There is also a BOL article for Security ...
Perfect tuning is an art and the underlying system (meaning the data and its usage patterns) is almost always evolving in ways automation can't predict or react to. Tuning is also based on past activity; the system can't predict tomorrow's growth or usage patterns, but a DBA can to some degree. We're a long way away from decent artificial intelligence and I ...
Only top voted, non community-wiki answers of a minimum length are eligible