Hot answers tagged

8

You're using a local variable, not a parameter. So because this is part of your query text: DECLARE @id INT=43865 It gets included as part of the query hash (which converts the query text, including 43865, to binary), and thus produces a different hash every time you change the text. This is how it will work in a Management Studio query window, but it ...


5

I have been in the noSQL field since last 3 years. Being a MongoDB DBA you need to work closely with Development and Ops team. Following are the things you need to do as day to day task as MongoDB DBA: The role can be broadly classified into three parts: Administration: New deployments (manual/automated) Deployment design of you database systems ...


5

DBA is a small acronym but a large role. At various times I have seen a DBA look after storage network VMs compute nodes installation and configuration of the above backups, and testing restores DR strategy enterprise data integrity ETL data security data modelling, normalisation and database design data tier programing performance tuning operational ...


3

Ensure you have a valid backup; hopefully it will be from prior to the corruption, but not so long ago that the data isn't useful. You should set this aside in case direct repair isn't possible and you need to recover data from the backup. The documentation explains what to do to correct the problem - you can try the REPAIR_REBUILD option, and if that ...


3

Its easy using T-SQL. I would suggest not to use Maiantenance plan. Instead go with a much flexible and widely adapted TSQL based solution - SQL Server Backup by Ola Hallengren EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES, -DB1,DB2', -- All user databases, except Db1, DB2 @Directory = 'C:\Backup', @BackupType = 'FULL', @Verify = 'Y', @Compress ...


3

I think you will be much better off testing your actual workload under sync and async, and see if you observe any differences. Coming up with a sweet spot to suit a particular feature is kind of backwards. Generally, async is primarily beneficial when you don't care if the query that triggered the stats update still runs that last time with the old stats ...


3

In Oracle 12c there are 4 key name-related concepts you need to know: SID, or instance ID. Database name / database unique name Container / Pluggable database names Service names The instance ID is an ID that uniquely identifies one database instance running on one server. On a Linux server, this is normally specified in the $ORACLE_SID variable, but ...


3

You can't add a database that way, you will need to attach the database using the files you have as follows: Copy the files to the correct location. Attached the database with EXEC sp_attach_db '<name>', '<name.mdf>', '<name.ldf>' or using the relevant GUI command in SSMS (if the files are not in the SQL instance's default directories you ...


2

assuming licensing is not an issue, security and compatibility can be easily grouped and managed (very small user base, very small lightweight databases) You already have addressed the concerns. IMHO, depending on the VM capacity (memory, CPU and disk space), you should consolidate databases to one instance. This gives you advantage of managing one ...


2

Stop postgresql service cp -a source_data_directory destination_data_directory chown -R postgres_user /destination_data_directory export PGDATA=destination_data_directory Changing data directory to destination_data_directory within postgresql.conf pg_ctl start


1

Redo logs can be mirrored, your query does not take into account that. Controlfiles are also part of the database. select 'Datafiles', sum(bytes)/1024/1024 from dba_data_files union all select 'Tempfiles', sum(bytes)/1024/1024 from dba_temp_files union all select 'Redo logs', sum(bytes)/1024/1024 from v$log l join v$logfile lf on (l.group# = lf.group#) ...


1

Do I have to write SQL for that manually? Yes, but it's not that hard: create table original (id integer, url text); insert into original values (1,'VeryLongURLText'), (2,'VeryLongURLText'), (3,'LoooongURLText'), (4,'LoooongURLText'), (5,'LoooongURLText'); create the dictionary create table dictionary (id serial, url text); insert into dictionary ...


1

ApexSQL Restore will mount the backup as virtual Database, and you can query it using SSMS. I also published a PowerShell script that will let you analyze your backups in a given folder. I wrote it for analyzing size but you could easily adjust this to include properties like the date taken and such to find which backup you need to mount. You can find the ...


1

If you use Availability Groups you must do log backups. If you use Hallengren's backup solution then you'll need to set it up on both the primary and secondary node(s). Then direct the jobs it creates to point to the same network share. What will happen next is the script will create one directory for each server to hold system databases and any databases ...


1

Simply make these changes: call mysql.insertTables (`Debbie`, `Hopkins`, NULL, NULL, NULL, -- Changed 1, 123456789, 0, NULL, NULL, NULL, 12211985, 12345678, 1) NULL tells the INSERT to invoke the DEFAULTs.


1

When you delete from links_publicreply, it cascades that to delete child rows from links_link which would otherwise become orphaned (because the constraint is defined with ON DELETE CASCADE). But some of those rows being deleted in links_link are still referenced by rows in links_vote. The constraint between links_link and links_vote is not defined with ON ...


1

What you are describing is data migration. To do this successfully you need to understand both the old data and new schemas, business rules and the data itself. To migrate the data the most common option is to write conversion scripts which insert data into the new schema that respect the new schemas rules, referential integrity and business logic. If ...


1

This seems to me like the opposite of a problem... Regardless of requirements, I just feel better knowing every database is being backed up. Unless these two databases are quite large and can fill up a significant amount of disk space with backups, what negatives are there to backing up those files?


1

I would check the Management > Maintenance Plans folder, in the Object Explorer pane of SSMS. The other place would be under SQL Server Agent > Jobs, so I'm curious what you meant by, "I was able to find the full backup option on the SQL Agent." If there is a job titled "Full Backup" under the Jobs folder, then that's probably what you're looking for.


1

To answer your question simply, if you have 1 VM with several instances, you have the possibility of resource contention between the instances on that VM. In that scenario, I would consolidate databases onto a singular instance. But if you're talking about multiple virtual servers with one instance per virtual machine, I'm going to go against the grain here ...



Only top voted, non community-wiki answers of a minimum length are eligible