Must declare the scalar variable “@variable”

15 Jan by dbtut

Must declare the scalar variable “@variable”

  If there is a variable in the script we run and we have not declared this variable, we will get this error. For example, with the help of the following script, let’s create a table named “databaseandlogins” in the “TestDB” database. [crayon-5c3e710f9d88d662567849/] Then try to add data to this table as follows. [crayon-5c3e710f9d897192061945/] When […]
15 Jan by dbtut Tags: , , , ,

How To Find and Change Owner of All Databases in an Instance in SQL SERVER

  Sometimes, we can receive the below error. SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed   [CLIENT: 1.1.1.1] The reason for this error may be that […]
15 Jan by dbtut

How To List RMAN Jobs

  It is often time consuming job to gather detailed information about the backups of Oracle databases with RMAN. You need to collect information from many different environments. However, it is easier to access RMAN backup information with queries. You can reach detailed information about the backups taken in the last x days with the […]
15 Jan by dbtut

How To Solve Errors in DPM Backup(Failed Backups in DPM)

  DPM (Data Protection Manager) is Microsoft’s software for backup. Before reading this article, I recommend you to read other articles related to DPM on our website. If you type DPM in the search bar, the related articles will appear. You can open the DPM Administration Console and come to the Monitoring tab as shown […]
14 Jan by dbtut Tags: ,

UNION and UNION ALL Operators in SQL Server(TSQL)

  With UNION and UNION ALL Opertors, we can merge multiple sql statement’s result in a single result set. When we merge two SQL statements with the UNION operator, duplicate records are listed once in the result set. When we merge two SQL statements with the UNION ALL operator, all results are listed. If there […]
14 Jan by dbtut

How To Calculate Actual Size of All Tables in a Schema in Oracle

  When calculating the size of a table in an Oracle database, it is incorrect to just look at the data size. It is necessary to calculate the size of the index, lobsegment and lobindex objects of the table. Because when we move the table to another database, all objects belonging to the table will […]
14 Jan by dbtut

Testing SQL Server Database Connection

  Sometimes the application owners can come to you because the application cannot connect to the database. In this case, a DBA must first test the connection from the application server to the database. It is very easy to test this connection if you have SSMS (SQL Server Management Studio) on the application server. You […]
13 Jan by dbtut Tags: , , , , , , , , , , , , ,

SQL Server Conditions and Loops(TSQL)

  In this article, we will examine the loops and conditions we use in TSQL. Conditions in TSQL: IF Statement in SQL Server: You can use it as follows. [crayon-5c3e710f9e6dc477481427/] IF…ELSE Statement in SQL Server: You can use it as follows. We’re running the same IF … ELSE Statement twice by changing the parameter value. […]
13 Jan by dbtut

How To Find Database Query From the Linux PID

  In Oracle databases running on Linux, you can access the relevant session information from each user processes. In most cases, it is necessary to detect queries that use excessive resources in the operating system. For this determination, the process id of the corresponding process on linux can be matched with the session’s spid information […]
13 Jan by dbtut

SQL Server Data Types(TSQL)

It is a very critical step to correctly determine SQL Server Data Types when designing tables to prevent unnecessary growth of the database. The space that data types allocate on the disk is different. For example, suppose you have a column in your table that will contain numbers. If the value of this column will […]