Tag Info

New answers tagged

3

But I read online that I have to stop and start the sql Server services inorder for this change to be effective. Is that True? Yes, you have to stop and restart sql server services. fill factor (%) This has is_dynamic = 0 in the master.sys.configurations. This means that when you run sp_configure 'fill factor (%)', 75, the VALUE will be set to ...


1

Yes, it is clearly stated here which options require a restart: https://msdn.microsoft.com/en-us/library/ms189631.aspx


0

Referring https://msdn.microsoft.com/en-us/library/ms188414.aspx Update the stats - sysviews are out of sync. EDIT: [thanks for the advice, John] It seems the system views are not always accurate, and sp_spaceused is notorious for this. A form of caching is applied to non-critical, but heavy process data collection functions - like measuring partitions ...


1

It is a little bit silly, but after restarting the machine audit was enabled without any problem.


1

Depends on who is allowed to access your application. Probably not a good idea to give DB access to users since they'll be able to connect to the database directly which is probably not what you want. If its a whitelist, maintain a list of users and if applicable which roles they hold in the database. Run your web application using a Windows account, and ...


0

Use 12 partitions -- 10 days, plus one at each end. REORGANIZE PARTITION to split the empty, future, partition at the end before the new day; drop the oldest. All the details, including code, are spelled out in http://mysql.rjweb.org/doc.php/partitionmaint . Hourly partitions would lead to over 240 partitions; that large a number slows things down.


1

No, external locking is (was) only needed for MyISAM when you tried to execute several processes on the same data directory, such as two server instances, or an instance and a file repair. Sincerely, I would be surprised if that page manual was accurate and was still fully supported. In any case, it is mostly impossible to do that now, as InnoDB (default ...


3

Real world financial transactions do not follow simple assumptions such as "the client will make one payment per month". Make a TRANSACTION table that records money coming in and money going out along with the details of that transaction, such as where the money came from (which client), where the money went to (which loan), and importantly when this ...


0

innodb_log_file_size -- Did you change that after running mysql? It cannot easily be changed. Recommend you set it back to what it was (or remove the line). The are many answers on the web to "How do I change innodb_log_file_size". "On startup, MySQL would not start if there was a mismatch between the value of the innodb_log_file_size configuration ...


2

You can cast your date to perform where clause on it just like this. WHERE CONVERT(DATETIME, MyStringDateField, 120) BETWEEN @DateParam1 AND @DateParam2 The last parameter in CONVERT is the date format. You must choose the one that match your text data of your date. You can find the list here You must be aware that if a string does not match a date for a ...


0

The reason your logs are filling up is due to the Index maintenance, not the backups. Kin alluded to this and suggested you take those index maintenance routines out of the maintenance plans. However, this will not stop the logs from filling up during index maintenance. Solutions like Ola Halengren's maintenance scripts will provide some logic around ...


5

What I am trying to understand is why this is occurring, and how to prevent it. Maintenance Plans do not have much logic that you can implement when dealing with index fragmentation and once you configure it, they run regardless if you really need a reorg or rebuild on your indexes. You are better off implementing Ola's backup solution as well as ...


0

It was a combination of making too many transactions and too many functions. After combining statements into the same transactions and removing the functions, the CPU hasn't risen past an average of 5%.


1

Since you said you are beginner and is in learning phase I would give you lot of good articles to learn about SQL Server backup. To start with main question as already mentioned in my comment So can I restore 4th one with 1st one. With out the 3rd ? Differential backup only relates to previous full backup you have taken so NO you cannot restore 4th ...


2

Here's a very quick example that will create a user blat given an existing login blat in all new databases created (this won't work for attach/restore). You could extend this to adding them to roles, granting permissions, even building the list based off of some query from sys.server_principals in master, sys.database_principals in another database, or your ...


0

My understanding of your situation is that you are backing up the database, and then transferring the file via the internet. I'm assuming that this is being done for troubleshooting or finding issues. (If these assumptions are wrong, that may change things depending...) You could try backing up the database across multiple files. To do that, you simply ...


3

I started writing this in comments, but quickly ran out of space so I'm putting in this answer. The way backups work with FULL recovery in SQL Server you can do what you want with transaction and differential backups (as said in the comments). A transaction log has all the statements since the last linked backup (be it a full, differential or trn backup). ...


1

You can get all open dblink connections using dblink_get_connections(). Those that are not used can only be found by examining your function code like Erwin suggests. I thought that with SQL functions one can query for the dblink functions it depends on, but it happens not to be the case (actually, you can even drop the extension while having functions ...


0

How about creating table with autoincrement option? create table t ( id int not null auto_increment, v varchar(100), primary key(id) ) auto_increment=101; mysql> insert into t (v) values ("abc"); Query OK, 1 row affected (0.00 sec) mysql> select * from t; +-----+------+ | id | v | +-----+------+ | 101 | abc | +-----+------+ 1 row in ...


0

Actually, yes you can start an empty table's auto_increment from 101. SAMPLE CODE use test drop table if exists fizzydrink; create table fizzydrink (id int not null auto_increment,num1 int,num2 int,primary key (id)); show create table fizzydrink\G alter table fizzydrink auto_increment = 101; show create table fizzydrink\G insert into fizzydrink (num1,num2) ...



Top 50 recent answers are included