Tag Info

New answers tagged

0

I would Get together a simple spreadsheet of your estate, find out exactly what you are responsible for. You are almost putting together a small CMDB for SQL really, you want to know the application names, service owner names etc. This will be invaluable later. Find out if you have any company build standards on SQL, someone may have left behind a ...


0

That is a great list. I would also use Brent Ozar Unlimited sp_Blitz, http://www.brentozar.com/first-aid/sql-server-downloads/. It will give you great overview of what might not be setup quite right.


-2

something is wrong here. Back up the table again inc. all the NOT NULL columns, drop it and restore it If it doesn't work, please paste your backup and restore procedures here. about you last question: yes, you can. In our world you can do everything that makes logical sense and even more.


4

You can discover all of these events that are in the current event log cycle using sp_readerrorlog: EXEC sys.sp_readerrorlog @p1 = 0, @p2 = 1, @p3 = N'OFFLINE'; You can cycle through values of @p1 if you don't find it in the current event log. By default you should be able to read the current and prior 6 error log files, so use 0-6 as the arguments there ...


2

If the database was set offline: i.e. alter database AdventureWorks2012 set offline; go You would indeed see a logged message in the SQL Server error log: Setting database option OFFLINE to ON for database 'AdventureWorks2012'. select * from sys.messages where language_id = 1033 and text like '%setting database option%for database%'; Message ID ...


0

I suspect it is related to network config, e.g. DNS / IP address / firewall, etc. Can you sqlplus to the tns "remotedr" from primary? You should get something along "sqlplus failed because instance not opened", if the config ia correct. If not, you may try step by step turning off firewall, convert DNS to IP in tnsnames.ora.


0

I worked it out, in-case anyone would like to know the following Query did it: SELECT CONCAT( 'SELECT `ost_ticket_event`.ticket_id', GROUP_CONCAT(' , `t_', REPLACE(state, '`', '``'), '`.timestamp AS `', REPLACE(state, '`', '``'), '`' SEPARATOR ''), ' FROM `ost_ticket_event` ', GROUP_CONCAT(' LEFT JOIN `ost_ticket_event` AS `t_', REPLACE(state, ...


2

Starting from 2008 onwards Index rebuild is fully logged in full recovery model. If you rebuild huge index in full recovery model its bound to produce too much logs. So in this table you have how many indexes? Are you rebuilding all such indexes in one go. If you are doing this you must consider doing it piece meal. One index at a time Of course you can ...


2

DBCC REINDEX is minimally logged in the SIMPLE or BULK_LOGGED recovery model. If the database is currently in the FULL recovery model, consider toggling it to BULK_LOGGED for the index maintenance. See http://technet.microsoft.com/en-us/library/ms191484(v=sql.105).aspx


0

I had same issue today, one of my client's Joomla site hosted at bluehost. Two days ago he informed me that their site has been hacked, they just uploaded maintenance.html & shared required credentials with me. After some research I found that almost 10 tables were crashed. I used Repair DB option from cPanel, repair report show following logs: ...


2

The only correct way to back up an Oracle database is to use RMAN. There are alternatives but they are not as reliable as RMAN. RMAN has a ton of features and this might make it look complicated. But in fact it's not difficult and should always be the choice to back up a database. RMAN does not do logical backups like tables, indexes, procedures. RMAN does ...


1

If the file hasn't exceeded max_binlog_size or if a log flushing event hasn't occurred then it won't start a new file. expire_logs_days only removes non-active binary logs (i.e. files other than the one that shows up under a "show master status;").


1

The issue is specific to ANSI_WARNINGS as the value of ANSI_NULLS is stored with the definition of the Stored Procedure when it is created. Just run: SELECT * FROM sys.sql_modules; To see the difference between ANSI_NULLS and ANSI_WARNINGS, run the following: -- Check current values (SSMS defaults to ON for both unless changed in -- Tools -> Options ...


0

Run this on your current instance: select 'CREATE LOGIN ['+p.name+'] FROM WINDOWS;' from sys.server_principals as p where type in ('U','G') Take it's output and run it on the new instance. Those AD accounts will now have logins on both instances. (This is a good opportunity to audit your access and ensure all those users really are needed.) Backup ...


1

Yes, you can. The backup entries in the controlfile point to 'E:...', so after restoring the controlfile, you will have to catalog the backup pieces in RMAN by: catalog start with 'G:\'; After this you can restore the database.


6

The guidance concerning the minimum number of pages is somewhat arbitrary. The biggest benefits of reducing fragmentation are: It can improve read-ahead performance for large range scans; and It may improve the page density (number of rows per page) Both of these factors are less important for small indexes, by definition. The counter-argument to ...


6

There is no built-in command to remove the identity property from a column in SQL Server. You may have to create a new table, copy all the data across, and then rename the table. This can be time-consuming and awkward, especially if you have things like foreign key constraints, schema-bound functions, indexed views and so on. That said, there is a way to ...


1

You need to refer Oracle installation guide but you should need to consider your server technical details too. If your server is having 64 GB physical memory then you can keep 1/3 SHMMAX size of this physical memory but it depends on server configuration and your requirements. After setting SHMMAX, your SGA size cannot extend more than this SHMMAX size. If ...


3

Sure, you can hook into some mechanism to watch for changes, either at the db- or fs-level. And your code will probably work correctly.. for a while, at least. But then, someday, someone will add code to do something additional that you weren't expecting. Which may not matter. And it will happen again, and again. Soon, all kinds of data is being changed that ...


14

You can't rely on things like journaling or physical file changes to see if data has changed. I hesitate to mention LSNs because I certainly don't want to encourage any attempt down that road. Trying to do this just to determine whether it might not be worth it to actually go ahead and take a log backup is a disaster waiting to happen. Take full backups on ...


1

That trace flag isn't documented and shouldn't be used in production environments. That said, it appears that the trace flag stopped working in SQL Server 2008 R2 and newer. As it's undocumented Microsoft won't take a support ticket to fix it as you shouldn't have been using an undocumented trace flag. All undocumented commands and features can be changed ...



Top 50 recent answers are included