Tag Info

New answers tagged

0

Version store basically cause from long running transaction or high transaction throughput. You need to look for the queries which are causing this. Other than that version store is used in following conditions: Row version which are generated by data modification transactions for features (MARS, online indexes, AFTER trigger etc) Row version which are ...


3

Why do you think clustering will help performance? There is no such thing as active/active anyway - a failover cluster exists to provide a fallback so that the database can continue running if the hardware fails (the database is only ever active on one of the cluster nodes at any one time). Clustering <> load balancing. If you mean splitting up the data ...


1

As this answer on Stack Overflow indicates there is no built in functionality to do what you want but there are alternatives: export your tables to csv files and then import into MySql using LOAD DATA INFILE. This solution does not scale well for large databases or schemas with clobs and blobs that are images or documents. SQL Developer can help you ...


0

Ugliest paste in history. Be aware if your slave does not have significantly more hardware than you M1 and M2 it will probably lag behind in replication. This requires nothing special from setting up normal replication. Copy the M1 data (either mysqldump or some other suitable solution) to the first instance, login into the first slave instance and execute a ...


1

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 ...


0

You can't use sysadmin (sa) if you register shared hosting. You need to create your database via their control panel, then you can manage your database via your CP. Or some providers allow to connect remotely. For more information, just contact your hosting provider. Good luck


3

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 - ...


1

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 ...


1

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 = '%';


0

You can override the way DELETE commands are replicated to the subscriber by using the @del_cmd parameter for sp_addarticle. You can specify a custom stored procedure that takes care of the archive logic or ignore DELETE commands altogether by setting it to NONE. However, the rows kept at the subscriber won't be replicated any more if for some reason you ...


0

If you have special requirements for the values of your id, do not use AUTO_INCREMENT. There are too many cases (crashes, DELETEs, REPLACEs, INSERT IGNORE, etc) where the numbers will behave in unexpected ways.


7

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


10

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)


4

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 ...


1

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. ...


0

exec sp_helpdb gives you the size of each database. You can create a table dbsize and do insert into dbsize exec sp_helpdb to insert data into it once a week using a job. After a month, you can see how much each db grew


2

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 ...


3

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 ...


0

Take a look at this and this. These were obtained by simply Googling "location of listener.ora windows". If, for whatever reason, your file isn't located in one of the default locations, you can use the Windows find command to pick up the file.


0

When I learned PL/SQL I started with Steven Feuerstein's PL/SQL Best Practices. Several more edition have come out, but it gives you a good perspective on how to think about code.


0

Can you try net stop "MSSQLServer$SQLExpress" Net Start "MSSQLServer$SQLExpress" /m”SQLCMD” That way it won't let anything connect but SQLcmd.exe and you can hope nothing else connects before you. Maybe you have a script or a service connecting before you.


4

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 ...


1

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.


1

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.


0

For such a situation we have made use of PSExec utility to get regain access on the SQL server. You can download the utility from here , extract and copy the exe file to the drive location from where you can run below command. Once downloaded you need to open the cmd with admin and run below: PsExec -s -i "C:\Program Files (x86)\Microsoft SQL ...


0

but statements AFTER this will Not be using the new db assignment - which is what I want You can use 3 part naming dbname.schema.objectName. Below is an example to get you started. You can modify as per your needs : SET NOCOUNT ON DECLARE @dbname VARCHAR(max) ,@SQLText VARCHAR(8000) SELECT @dbname = min(NAME) FROM master..sysdatabases WHERE ...


3

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.


0

If you see below segment of the code CREATE DATABASE [TestTom] CONTAINMENT = NONE ON PRIMARY ( NAME = N'TestTom', FILENAME = N'G:\MSSQL11.MSSQLSERVER\MSSQL\DATA\TestTom.mdf' , SIZE = 1048576KB , FILEGROWTH = 1048576KB ) LOG ON ( NAME = N'TestTom_log', FILENAME = N'F:\MSSQL11.MSSQLSERVER\MSSQL\Data\TestTom_log.ldf' , SIZE = 1048576KB , FILEGROWTH = ...


1

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 ...


0

Here's 2 approaches. This approach assumes that the combination (name, city) needs to be unique: INSERT INTO New ( SELECT name, city FROM tbl1 ) UNION DISTINCT ( SELECT name, city FROM tbl2 ) UNION DISTINCT ( SELECT name, city FROM tbl3 ); In this approach, your New table needs to have a UNIQUE KEY (or PRIMARY KEY) that contains all ...



Top 50 recent answers are included