Search Results

Search found 293 results on 12 pages for 'omit'.

Page 1/12 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Run database checks but omit large tables or filegroups - New option in Ola Hallengren's Scripts

    - by Greg Low
    One of the things I've always wanted in DBCC CHECKDB is the option to omit particular tables from the check. The situation that I often see is that companies with large databases often have only one or two very large tables. They want to run a DBCC CHECKDB on the database to check everything except those couple of tables due to time constraints. I posted a request on the Connect site about time some time ago: https://connect.microsoft.com/SQLServer/feedback/details/611164/dbcc-checkdb-omit-tables-option The workaround from the product team was that you could script out the checks that you did want to carry out, rather than omitting the ones that you didn't. I didn't overly like this as a workaround as clients often had a very large number of objects that they did want to check and only one or two that they didn't. I've always been impressed with the work that our buddy Ola Hallengren has done on his maintenance scripts. He pinged me recently about my old Connect item and said he was going to implement something similar. The good news is that it's available now. Here are some examples he provided of the newly-supported syntax: EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKDB' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKALLOC,CHECKTABLE,CHECKCATALOG', @Objects = 'AdventureWorks.Person.Address' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKALLOC,CHECKTABLE,CHECKCATALOG', @Objects = 'ALL_OBJECTS,-AdventureWorks.Person.Address' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKFILEGROUP,CHECKCATALOG', @FileGroups = 'AdventureWorks.PRIMARY' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKFILEGROUP,CHECKCATALOG', @FileGroups = 'ALL_FILEGROUPS,-AdventureWorks.PRIMARY' Note the syntax to omit an object from the list of objects and the option to omit one filegroup. Nice! Thanks Ola! You'll find details here: http://ola.hallengren.com/  

    Read the article

  • Run database checks but omit large tables or filegroups - New option in Ola Hallengren's Scripts

    - by Greg Low
    One of the things I've always wanted in DBCC CHECKDB is the option to omit particular tables from the check. The situation that I often see is that companies with large databases often have only one or two very large tables. They want to run a DBCC CHECKDB on the database to check everything except those couple of tables due to time constraints. I posted a request on the Connect site about time some time ago: https://connect.microsoft.com/SQLServer/feedback/details/611164/dbcc-checkdb-omit-tables-option The workaround from the product team was that you could script out the checks that you did want to carry out, rather than omitting the ones that you didn't. I didn't overly like this as a workaround as clients often had a very large number of objects that they did want to check and only one or two that they didn't. I've always been impressed with the work that our buddy Ola Hallengren has done on his maintenance scripts. He pinged me recently about my old Connect item and said he was going to implement something similar. The good news is that it's available now. Here are some examples he provided of the newly-supported syntax: EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKDB' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKALLOC,CHECKTABLE,CHECKCATALOG', @Objects = 'AdventureWorks.Person.Address' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKALLOC,CHECKTABLE,CHECKCATALOG', @Objects = 'ALL_OBJECTS,-AdventureWorks.Person.Address' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKFILEGROUP,CHECKCATALOG', @FileGroups = 'AdventureWorks.PRIMARY' EXECUTE dbo.DatabaseIntegrityCheck @Databases = 'AdventureWorks', @CheckCommands = 'CHECKFILEGROUP,CHECKCATALOG', @FileGroups = 'ALL_FILEGROUPS,-AdventureWorks.PRIMARY' Note the syntax to omit an object from the list of objects and the option to omit one filegroup. Nice! Thanks Ola! You'll find details here: http://ola.hallengren.com/  

    Read the article

  • how to omit extra bits in a file?

    - by thinthinyu
    I want to omit extra bit in txt file.eg ....ÿ 0111111110111101100011011010010001 in this string we want to omit extra bit "ÿ " which is appeared when we save a binary string. Save fun is as follow. please help me. void LFSR_ECDlg::Onsave() { this-UpdateData(); CFile bitstream; char strFilter[] = { "Stream Records (*.mpl)|*.mpl| (*.pis)|*.pis|All Files (*.*)|*.*||" }; CFileDialog FileDlg(FALSE, ".mpl", NULL, 0, strFilter); if( FileDlg.DoModal() == IDOK ) { if( bitstream.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite) == FALSE ) return; CArchive ar(&bitstream, CArchive::store); CString txt; txt=""; txt.Format("%s",m_B);//by ANO AfxMessageBox (txt);//by ANO txt=m_B;//by ANO ar <<txt;//by ANO ar.Close(); } else return; bitstream.Close();

    Read the article

  • Nested dereferencing arrows in Perl: to omit or not to omit?

    - by DVK
    In Perl, when you have a nested data structure, it is permissible to omit de-referencing arrows to 2d and more level of nesting. In other words, the following two syntaxes are identical: my $hash_ref = { 1 => [ 11, 12, 13 ], 3 => [31, 32] }; my $elem1 = $hash_ref->{1}->[1]; my $elem2 = $hash_ref->{1}[1]; # exactly the same as above Now, my question is, is there a good reason to choose one style over the other? It seems to be a popular bone of stylistic contention (Just on SO, I accidentally bumped into this and this in the space of 5 minutes). So far, none of the usual suspects says anything definitive: perldoc merely says "you are free to omit the pointer dereferencing arrow". Conway's "Perl Best Practices" says "whenever possible, dereference with arrows", but it appears to only apply to the context of dereferencing the main reference, not optional arrows on 2d level of nested data structures. "MAstering Perl for Bioinfirmatics" author James Tisdall doesn't give very solid preference either: "The sharp-witted reader may have noticed that we seem to be omitting arrow operators between array subscripts. (After all, these are anonymous arrays of anonymous arrays of anonymous arrays, etc., so shouldn't they be written [$array-[$i]-[$j]-[$k]?) Perl allows this; only the arrow operator between the variable name and the first array subscript is required. It make things easier on the eyes and helps avoid carpal tunnel syndrome. On the other hand, you may prefer to keep the dereferencing arrows in place, to make it clear you are dealing with references. Your choice." Personally, i'm on the side of "always put arrows in, since itg's more readable and obvious tiy're dealing with a reference".

    Read the article

  • How can I make ls and xargs combined omit path

    - by Steve McLeod
    I have a folder called lib. In that folder are some files. I want to obtain all the names of the files that end in .jar, and concatenate them into a line, separated by spaces. I don't want the path name at all. I've tried this: ls lib/*.jar | xargs and the output is lib/file1.jar lib/file2.jar But what I'm trying to get is file1.jar file2.jar How can I do this? I've also tried find but I get the same problem find lib -name *.jar | xargs

    Read the article

  • MYSQL JOIN SELECT Statment - omit duplicated

    - by mouthpiec
    Hi, I am tying to join the following 2 queries but I am having duplicated .... it is possible to remove duplacted fro this: ( SELECT bar_id, bar_name, town_name, bar_telephone, (subscription_type_id *2) AS subscription_type_id FROM bar, sportactivitybar, towns, subscriptiontype WHERE sport_activity_id_fk =14 AND bar_id = bar_id_fk AND town_id = town_id_fk AND subscription_type_id = subscription_type_id_fk ) UNION ( SELECT bar_id, bar_name, town_name, bar_telephone, subscription_type_id FROM bar, towns, subscriptiontype WHERE town_id = town_id_fk AND subscription_type_id = subscription_type_id_fk ) ORDER BY subscription_type_id DESC , RAND( ) Please note that I need to omit those duplicates that will have a lower subscription_type_id

    Read the article

  • Omit Properties from WebControl Serialization

    - by Laramie
    I have to serialize several objects inheriting from WebControl for database storage. These include several unecessary (to me) properties that I would prefer to omit from serialization. For example BackColor, BorderColor, etc. Here is an example of an XML serialization of one of my controls inheriting from WebControl. <Control xsi:type="SerializePanel"> <ID>grCont</ID> <Controls /> <BackColor /> <BorderColor /> <BorderWidth /> <CssClass>grActVid bwText</CssClass> <ForeColor /> <Height /> <Width /> ... </Control> I have been trying to create a common base class for my controls that inherits from WebControl and uses the "xxxSpecified" trick to selectively choose not to serialize certain properties. For example to ignore an empty BorderColor property, I'd expect [XmlIgnore] public bool BorderColorSpecified() { return !base.BorderColor.IsEmpty; } to work, but it's never called during serialization. I've also tried it in the class to be serialized as well as the base class. Since the classes themselves might change, I'd prefer not to have to create a custom serializer. Any ideas?

    Read the article

  • T-SQL: Omit/Ignore repetitive data from a specific column

    - by Dsyfa
    Hi, For my question lets consider the following sample table data: ProductID    ProductName    Price   Category 1                Apple                 5.00       Fruits 2                Apple                 5.00       Food 3                Orange               3.00       Fruits 4                Banana                 2.00       Fruits I need a query which will result in the following data set: ProductID    ProductName    Price   Category 1                Apple                 5.00       Fruits 3                Orange               3.00       Fruits 4                Banana                 2.00       Fruits As you can see ProductID 2 has been omitted/ignored because Apple is already present in the result i.e. each product must appear only once irrespective of Category or Price. Thanks

    Read the article

  • auto_increment in MySQL - can I omit it?

    - by kees-kist
    I've noticed that PHPmyAdmin creates the following SQL for table creation: CREATE TABLE something ( ... ) auto_increment=1; When I write a database creation script I don't use the auto_increment bit. From reading related questions here I understand that it determines the starting value for auto_increment values. But it is good practice to reset it to 1, or should I just leave it out of the SQL so that the default is used?

    Read the article

  • Mockito verify no more interactions but omit getters

    - by michael lucas
    Mockito api provides method: Mockito.verifyNoMoreInteractions(someMock); but is it possible in Mockito to declare that I don't want more interactions with a given mock with the exceptions of interactions with its getter methods? The simple scenario is the one in which I test that sut changes only certain properties of a given mock and lefts other properties untapped. In example I want to test that UserActivationService changes property Active on an instance of class User but does't do anything to properties like Role, Password, AccountBalance, etc. I'm open to criticism regarding my approach to the problem.

    Read the article

  • Modify MySQL INSERT statement to omit the insertion of certain rows

    - by dave
    I'm trying to expand a little on a statement that I received help with last week. As you can see, I'm setting up a temporary table and inserting rows of student data from a recently administered test for a few dozen schools. When the rows are inserted, they are sorted by the score (totpct_stu, high to low) and the row_number is added, with 1 representing the highest score, etc. I've learned that there were some problems at school #9999 in SMITH's class (every student made a perfect score and they were the only students in the district to do so). So, I do not want to import SMITH's class. As you can see, I DELETED SMITH's class, but this messed up the row numbering for the remainder of student at the school (e.g., high score row_number is now 20, not 1). How can I modify the INSERT statement so as to not insert this class? Thanks! DROP TEMPORARY TABLE IF EXISTS avgpct ; CREATE TEMPORARY TABLE avgpct_1 ( sch_code VARCHAR(3), schabbrev VARCHAR(75), teachername VARCHAR(75), totpct_stu DECIMAL(5,1), row_number SMALLINT, dummy VARCHAR(75) ); -- ---------------------------------------- INSERT INTO avgpct SELECT sch_code , schabbrev , teachername , totpct_stu , @num := IF( @GROUP = schabbrev, @num + 1, 1 ) AS row_number , @GROUP := schabbrev AS dummy FROM sci_rpt WHERE grade = '05' AND totpct_stu >= 1 -- has a valid score ORDER BY sch_code, totpct_stu DESC ; -- --------------------------------------- -- select * from avgpct ; -- --------------------------------------- DELETE FROM avgpct_1 WHERE sch_code = '9999' AND teachername = 'SMITH' ;

    Read the article

  • Omit return type in C++0x

    - by Clinton
    I've recently found myself using the following macro with gcc 4.5 in C++0x mode: #define RETURN(x) -> decltype(x) { return x; } And writing functions like this: template <class T> auto f(T&& x) RETURN (( g(h(std::forward<T>(x))) )) I've been doing this to avoid the inconvenience having to effectively write the function body twice, and having keep changes in the body and the return type in sync (which in my opinion is a disaster waiting to happen). The problem is that this technique only works on one line functions. So when I have something like this (convoluted example): template <class T> auto f(T&& x) -> ... { auto y1 = f(x); auto y2 = h(y1, g1(x)); auto y3 = h(y1, g2(x)); if (y1) { ++y3; } return h2(y2, y3); } Then I have to put something horrible in the return type. Furthermore, whenever I update the function, I'll need to change the return type, and if I don't change it correctly, I'll get a compile error if I'm lucky, or a runtime bug in the worse case. Having to copy and paste changes to two locations and keep them in sync I feel is not good practice. And I can't think of a situation where I'd want an implicit cast on return instead of an explicit cast. Surely there is a way to ask the compiler to deduce this information. What is the point of the compiler keeping it a secret? I thought C++0x was designed so such duplication would not be required.

    Read the article

  • jQuery .hasClass method to omit effect

    - by Jonny Wood
    I've created a simple background effect for some tabs on a page but don't want that effect to fire if the tab has the class 'current'. I presume there is a way to do this using .hasClass Here's what I'm using for the effect: $('ul.htabs a').mouseover(function(){ $(this).stop().animate( {backgroundPosition:"(0 -810px)"}, {duration:150}, {easing: 'easeOutCubic'}) }).mouseout(function(){ $(this).stop().animate( {backgroundPosition:"(0 -806px)"}, {duration:150}, {easing: 'easeInCubic'}) });

    Read the article

  • How to Omit the Page Number From the First Page of a Word 2013 Document Without Using Sections

    - by Lori Kaufman
    Normally, the first page, or cover page, of a document does not have a page number or other header or footer text. You can avoid putting a page number on the first page using sections, but there is an easier way to do this. If you don’t plan to use sections in any other part of your document, you may want to avoid using them completely. We will show you how to easily take the page number off the cover page and start the page numbering at one on the second page of your document by simply using a footer (or a header) and changing one setting. Click the Page Layout tab. In the Page Setup section of the Page Layout tab, click the Page Setup dialog box launcher icon in the lower, right corner of the section. On the Page Setup dialog box, click the Layout tab and select the Different first page check box in the Headers and footers section so there is a check mark in the box. Click OK. You’ll notice there is no page number on the first page of your document now. However, you might want the second page to be page one of your document, only to find it is currently page two. To change the page number on the second page to one, click the Insert tab. In the Header & Footer section of the Insert tab, click Page Number and select Format Page Numbers from the drop-down menu. On the Page Number Format dialog box, select Start at in the Page numbering section. Enter 0 in the edit box and click OK. This allows the second page of your document to be labeled as page one. You can use the drop-down menu on the Format Page Numbers button in the Header & Footer section of the Insert tab to add page numbers to your document as well. Easily insert formatted page numbers at the top or bottom of the page or in the page margins. Use the same menu to remove page numbers from your document.     

    Read the article

  • Which MIME type to compress? and what If I omit the `type` attribute from the HTML?

    - by rockyraw
    Per my request, my webhost had turned mod_deflate ON. In my Cpanel I now have an "Optimize Website" button. Inside that menu I could either choose: "Compress all content" or "Compress the specified MIME types" with the following default MIME types: "text/html text/plain text/xml" Which option should I choose and why? If I choose option 2, which types should I add (is there a recommended list with the exact way they should be written)? According to Google recommendations, I have omitted the type="text/css" attributes from all CSS references, as well as the type="text/javascript" attributes from all script references. Would this hinder the "gzipping" process?

    Read the article

  • Can LINQ-to-SQL omit unspecified columns on insert so a database default value is used?

    - by Todd Ropog
    I have a non-nullable database column which has a default value set. When inserting a row, sometimes a value is specified for the column, sometimes one is not. This works fine in TSQL when the column is omitted. For example, given the following table: CREATE TABLE [dbo].[Table1]( [id] [int] IDENTITY(1,1) NOT NULL, [col1] [nvarchar](50) NOT NULL, [col2] [nvarchar](50) NULL, CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([id] ASC) ) GO ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [DF_Table1_col1] DEFAULT ('DB default') FOR [col1] The following two statements will work: INSERT INTO Table1 (col1, col2) VALUES ('test value', '') INSERT INTO Table1 (col2) VALUES ('') In the second statement, the default value is used for col1. The problem I have is when using LINQ-to-SQL (L2S) with a table like this. I want to produce the same behavior, but I can't figure out how to make L2S do that. I want to be able to run the following code and have the first row get the value I specify and the second row get the default value from the database: var context = new DataClasses1DataContext(); var row1 = new Table1 { col1 = "test value", col2 = "" }; context.Table1s.InsertOnSubmit(row1); context.SubmitChanges(); var row2 = new Table1 { col2 = "" }; context.Table1s.InsertOnSubmit(row2); context.SubmitChanges(); If the Auto Generated Value property of col1 is False, the first row is created as desired, but the second row fails with a null error on col1. If Auto Generated Value is True, both rows are created with the default value from the database. I've tried various combinations of Auto Generated Value, Auto-Sync and Nullable, but nothing I've tried gives the behavior I want. L2S does not omit the column from the insert statement when no value is specified. Instead it does something like this: INSERT INTO Table1 (col1, col2) VALUES (null, '') ...which of course causes a null error on col1. Is there some way to get L2S to omit a column from the insert statement if no value is given? Or is there some other way to get the behavior I want? I need the default value at the database level because not all row inserts are done via L2S, and in some cases the default value is a little more complex than a hard coded value (e.g. creating the default based on another field) so I'd rather avoid duplicating that logic.

    Read the article

  • Omit attribute name from validation error message (at start of it)?

    - by mrbrdo
    I write code in English but I'm currently doing a site which is fully translated to another language (validation error messages included). However, I have a problem because validation error messages always seem to include the name of the attribute the error is on at the start of the error, e.g.: Title Prosimo izpolnite naziv fakultete. I want to get rid of the Title at the start, like so: Prosimo izpolnite naziv fakultete. Any help is appreciated. I would rather see if this can be solved without installing any 3rd party plugins. If it's possible to provide translations for attribute names, that would be a cool solution too, but I would still like to know how it can be done both ways (omit or translate).

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >