Search Results

Search found 28024 results on 1121 pages for 'sql 2014'.

Page 78/1121 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Comparing date range quarters sql server

    - by CR41G14
    I have a policies in a system PolRef Start End POL123 22/11/2012 23/12/2014 POL212 24/09/2012 23/10/2012 POL214 23/08/2012 29/09/2012 I am asking a user for a reporting date, the user enters 24/10/2012 this becomes @StartDate From this I derive what the quarter is by the month: set @currentMonth = Month(@StartDate) if @currentMonth = 1 or @currentMonth = 2 or @currentMonth = 3 begin set @startmonth = 1 set @endmonth = 3 end if @currentMonth = 4 or @currentMonth = 5 or @currentMonth = 6 begin set @startmonth = 4 set @endmonth = 6 end if @currentMonth = 7 or @currentMonth = 8 or @currentMonth = 9 begin set @startmonth = 7 set @endmonth = 9 end if @currentMonth = 10 or @currentMonth = 11 or @currentMonth = 12 begin set @startmonth = 10 set @endmonth = 12 end I then get a date range: @quarterStartDate = CAST(CAST(YEAR(@StartDate) AS varchar) + '-' + CAST(@startMonth AS varchar) + '-' + '01') AS Date) @quarterEndDate = CAST(CAST(YEAR(@EcdDate) AS varchar) + '-' + CAST(@endMonth AS varchar) + '-' + '31') AS Date) This will give me 01-10-2012 and 31-12-2012. Basically I need a script to only bring back the policies that are in this quarter. The policy doesn't have to span the entire quarter date range, just exist in the quarter date range. The results expected would be PolRef Start End POL123 22/11/2012 23/12/2014 POL212 24/09/2012 23/10/2012 Pol123 appears because it spans over the quarterly date range. Pol212 is there because it expires in that quarter date range. Pol214 does not appear because it neither spans, expires or starts in this quarter. Any help would be greatly appreciated

    Read the article

  • Missing menu items for Azure SQL tables within SQL Server Management Studio?

    - by Sid
    I have a table (say Table1) that is replicated via SQL Data Sync Agent across a local SQL Server 2012 as well as an Azure SQL Server (part of Microsoft Azure). Everything about Table1 (schema, table values etc ) is identical to the best of my understanding. However, when I list and right click Table1 from Microsoft SQL Server Management Studio 2012 (SSMS), I get some very different menu options, even for seemingly basic stuff. Lets focus only on the 'Design' menu item: It is visible for Table1 on the local SQL server in SSMS It is missing for Table1 on Azure SQL via SSMS It is visible for Table1 (as Open Table Definition) on Azure SQL when reaching it via Visual Studio 2012 (Server Explorer - Data connections) This is seen in the screenshots below: Now I use scripts from some real stuff (esp when I need to check in the SQL scripts etc) but this difference concerns me to some extent. Am I witnessing just a tools artifact in SQL Server Management Studio when connecting to Azure SQL? or is it something more serious about limitations of Azure SQL itself (although, just seeing the Design surface is so basic!)?

    Read the article

  • SQL Error Log Message- 'ACCESS_METHODS_SCAN_RANGE_GENERATOR'

    - by Chirag
    One of our SQL2005 Enterprise Servers running on Win2003 became unresponsive and on reboot I saw these errors logged before it went down. Date 17/09/2009 10:16:22 Log SQL Server (Archive #1 - 17/09/2009 10:17:00) Source spid111 Message Timeout occurred while waiting for latch: class 'ACCESS_METHODS_SCAN_RANGE_GENERATOR', id 000000002A761760, type 4, Task 0x000000000E609EB8 : 14, waittime 600, flags 0x1a, owning task 0x000000000E6129B8. Continuing to wait. Anyone know what this error points or relates to? Many thanks in advance.

    Read the article

  • Fatal error 9001 on shared SQL Server 2008

    - by user643192
    I've asked this same question on StackOverflow, but I might actually have a better chance for an answer here so am posting here as well. I know this question has been asked here before, but none of the suggestions have worked for me. I have an ASP.NET MVC (v. 3) website on a shared server. The website was working fine for a few weeks now, until I started getting a Fatal Error 9001 error straight after login. Because this is a shared server, there are only very limited things I can do with the database (and I don't know that much about databases anyway). The help desk insist that there is nothing wrong with their server. I got various suggestions from them: Upgrading to the business plan because I am out of space (first suggestion) Even though the .mdb file is small, the .ldb can grow very quickly. The .ldb file is probably taking up all the space. I have 100MB available, the database size is 16.5MB. Can the .ldb file take up the remaining space? On querying this with the helpdesk, they admitted that my entire db is only 25MB. There is something wrong with my SQL queries and I should check the website. I'm using EF with linq to SQL. Everything was working fine until now... Can there be something that goes wrong in the queries that causes this sort of error? There is nothing wrong to be seen in the db logs, so this error cannot possibly have happened. I should log it next time it happens and contact again. I found some posts suggesting that restoring a DB backup can get rid of the issue. I do not have a recent backup, and can't take a new one because of a fatal error 9001 occurring. Since this is a shared server I have about 0 authority to execute anything against the DB (think CHECKDB, truncating the log, etc.). So I am at my wits end pretty much. What else can I do/try to get my website moving again?

    Read the article

  • Alter Stored Procedure in SQL Replication

    - by Refracted Paladin
    How do I, properly, ALTER a StoredProcedure in a SQL 2005 Merge Replication? I just need to add a Column. I already successfully added it to the Table and I now need to add it to a SP. I did so but now it will not synchronize with the following error -- Insert Error: Column name or number of supplied values does not match table definition. (Source: MSSQLServer, Error number: 213)

    Read the article

  • SQL Server Management Studio Color Schemes?

    - by sunpech
    Is there a way to apply color schemes and themes to SQL Server Management Studio? I really enjoy the ones for Visual Studio 2005/2008/2010 and would love to have something like that. Color Schemes for Visual Studio: Create and share Visual Studio color schemes

    Read the article

  • Generating the SQL query plan takes 5 minutes, the query itself runs in milliseconds. What's up?

    - by TheImirOfGroofunkistan
    I have a fairly complex (or ugly depending on how you look at it) stored procedure running on SQL Server 2008. It bases a lot of the logic on a view that has a pk table and a fk table. The fk table is left joined to the pk table slightly more than 30 times (the fk table has a poor design - it uses name value pairs that I need to flatten out. Unfortunately, it's 3rd party and I cannot change it). Anyway, it had been running fine for weeks until I periodically noticed a run that would take 3-5 minutes. It turns out that this is the time it takes to generate the query plan. Once the query plan exists and is cached, the stored procedure itself runs very efficiently. Things run smoothly until there is a reason to regenerate and cache the query plan again. Has anyone seen this? Why does it take so long to generate the plan? Are there ways to make it come up with a plan faster?

    Read the article

  • SQL commands when SQL only exists on network

    - by chama
    I'm trying to find a list of all sql servers on the network using the osql -L command in the command prompt. This command only works when SQLServer is installed on the computer that I'm working on. Is there any way to run this command when SQLServer is not installed on that particular computer, but is installed somewhere on the network? Thank you! EDIT: I'm writing a program in java, so the easy enumerations that you can do in the .NET framework won't work for me.

    Read the article

  • SQL Server 2008 - Performance impact of transactional replication?

    - by cxfx
    I'm planning to set up transactional replication for a 100Gb SQL Server 2008 database. I have the distributor and publisher on the same server, and am using push subscription. Should there be a performance impact on my publisher server when it creates the initial snapshot, and synchronises it with a subscriber? From what I've tried so far on a staging server, it seems to slow right down. Is there a better way to create the initial snapshot without impacting my production publisher server?

    Read the article

  • SQL Server 2012 Read-Only Replica physical requirements

    - by Ddono25
    We are going to be setting up two replicas of our DataMart and related databases, and our plan includes using Hyper-V VM's to handle the load. When creating the VM's, we cannot find specific requirements or recommendations for RAM/CPU power for read-only replicas. Our current Primary DataMart setup has 64GB RAM and Two Quad-Core procs, which so far has been adequate for our usage. What should be the server setup for replicas and SQL Server to adequately support the read-only usage?

    Read the article

  • Cannot drop a table in SQL 2005

    - by David George
    I have a SQL Server 2005 SP3 box that one of my developers created a temp table on that we cannot seem to remove because it somehow got brackets in the name of the table? SELECT Name, object_id FROM sys.objects WHERE Name LIKE '%#example%' Results: Name object_id [#example] 123828384 Anyone know how we can get rid of this? Thanks!

    Read the article

  • SQL Server: error when connecting

    - by atricapilla
    (migrated from stackoverflow) The application I'm using tries to connect SQL Server named instance running on a dedicated database server. Here's the error I'm getting: The TCP/IP connection to the host <instance_name>, port 1433 has failed. Error: Connection refused: connect. Is the firewall blocking my access or what? Should I dedicate a different port for this application?

    Read the article

  • Setting up a SQL server outside the domain

    - by user41013
    Hi, im very new to this. I've set up an account "SQLBOX" thats on the a network, but not connected to the domain. I have installed an instance of SQL Server 2008 and am trying to connect to it from another machine on the network but am getting "Cannot connect to "SQLBOX"". From the "SQLBOX" i can connect to sqlservers on the domain, but not vice-versa. Any help would be grately appreciated. Sorry if the description isn't great. Thanks

    Read the article

  • SQL Server: how to check securables

    - by jrara
    I would like to make a t-sql query to check which logins have 'view server state' permission in server type securables. How to achieve this? This query from mssqltips don't show this: http://www.mssqltips.com/tip.asp?tip=1718 SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission] FROM [sys].[database_permissions] sec JOIN [sys].[database_principals] prin ON sec.[grantee_principal_id] = prin.[principal_id] WHERE sec.class = 0 ORDER BY [User], [Permission];

    Read the article

  • T-SQL for autogrowth of multiple data files

    - by ddono25
    I can't seem to figure out the problems with my script to alter SQL Server 2008 database and file growth. There are two data files and a log file, all which need to have Autogrowth ON. Does this look completely wrong? Thanks! USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE, FILENAME = "H:\MSSQL\Data\BigDB.mdf", MAXSIZE = UNLIMITED, FILEGROWTH = 2000MB) USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE1, FILENAME = "K:\MSSQL\Data\BigDB_data1.ndf", MAXSIZE = UNLIMITED, FILEGROWTH = 2000MB) USE MASTER GO ALTER DATABASE BigDB MODIFY FILE ( NAME = BIGDBPPE_log, FILENAME = "O:\MSSQL\Data\BigDB_log.ldf", MAXSIZE = UNLIMITED, FILEGROWTH = 200MB) GO

    Read the article

  • Cancel/Kill SQL-Server BACKUP in SUPSPENDED state (WRITELOG)

    - by Sebastian Seifert
    I have a SQL 2008 R2 Express on which backups are made by executing sqlmaint from windows task planer. Several backups ran into an error and got stuck in state SUSPENDED with wait type WRITELOG. How can I get these backup processes to stop so they release resources? Simply killing the processes doesn't work. The process will stay in KILL/ROLL for a long time. This didn't change for several hours.

    Read the article

  • Cancel/Kill SQL-Server BACKUP in SUPSPENDED state (WRITELOG)

    - by Sebastian Seifert
    I have a SQL 2008 R2 Express on which backups are made by executing sqlmaint from windows task planer. Several backups ran into an error and got stuck in state SUSPENDED with wait type WRITELOG. How can I get these backup processes to stop so they release resources? Simply killing the processes doesn't work. The process will stay in KILL/ROLL for a long time. This didn't change for several hours.

    Read the article

  • Transaction Log filling up on SQL database set to Simple

    - by Will
    We have a database on a SQL 2005 server that is set to Simple transaction mode. The logging is set to 1 MB and is set to grow by 10% when it needs to. We keep running into an issue where the transaction log fills up and we need to shrink it. What could cause the transaction log to fill up when its set to Simple and unrestricted growth is allowed?

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >