Row Count AFTER Filter Has Been Applied.
May 7, 2008
Is there a way to get a count of all the rows (total) after a filter has been applied at the row level?
Ie. Revenue has 11 rows but once the 6 blank ones are filtered count the total number of rows. So it should return 5.
View 1 Replies
ADVERTISEMENT
Mar 14, 2006
I have added a page refresh in combination with 'Command Notification' to ensure that my data is fresh,( it is updated on the sql server database approx. every 5 mins).
However, I also allow filtering on the table contents and every time I refresh the filtering is lost. Is it possible to maintain the filtering through the refresh?
<meta http-equiv="refresh" content="30"/>..<asp:SqlDataSource ID="SqlDataSource1" runat="server" ..SelectCommand="SELECT ... EnableCaching="true" CacheDuration="Infinite" CacheExpirationPolicy="Absolute" SqlCacheDependency="CommandNotification" >
View 1 Replies
View Related
Jul 24, 2007
Guys,
I'm using the following code and I just want display all glcodes that have a count less than 2:
select glcode,
sum(abs(sysvalue)) 'Movement',
count(glcode) 'Occurances'
from jet
group by glcode
order by occurances
The following sytax works i know i need to use the where function. Does anyone know the syntax?
Cheers
Michael
View 1 Replies
View Related
Mar 10, 2015
I have the table below and want to show the prop_code if the rent_review_date count is less than 1 in 12 months. This means to show only propcode if there has not been any rent update since the first rent_review_date
DECLARE @table TABLE
( Prop_Code INT
,Current_Rent INT
,Revised_Rent INT
,Rent_Review_Date varchar(10)
,Rent_Review_Time DATEtime)
[Code] .....
View 6 Replies
View Related
May 27, 2015
My requirement is to count the customer order number for premium order type orders which has some order quantity.I am using below MDX
count
(Â
Filter
(([Customer Order].[Dim Customer Orderkey].[Dim Customer Orderkey].members,
[Outbound Order Attributes].[Order Type].&[P]),[Measures].[Ordered, pcs]>0 ) ,
)
The result is accurate but the query execution time is 3-4 minutes for 10 fact records, when i use multiple dimension. it is showing me 0 valus for this measure for all the members for the dimesion attribute which doen't have any customer order. example it shows all the member of date dimension. is there any way to reduce the rows. i think this is the reason to take more execution time.when i use EXCCLUDEEMPTY the result is NULL
count
(Â
Filter
(([Customer Order].[Dim Customer Orderkey].[Dim Customer Orderkey].members,
[Outbound Order Attributes].[Order Type].&[C]),[Measures].[Shipped, pcs]>0 ) ,
EXCLUDEEMPTY)
View 3 Replies
View Related
Apr 15, 2008
Hello,
Here is my problem:
I use SQL Server 2005. I have approx. 50 tables in my database and 30 of them have a filed named "CompanyID". Example:
create table A (ID int identity, NAME varchar(100), COMPANYID int)create table A (ID int identity, REF_ID int, FIELD1 varchar(100), FIELD2 varchar(100), COMPANYID int)
Also there are nearly 200 stored procedures that read data from these tables. Example:
create procedure ABCasbegin /* some checks and expressions here ... */ select ... from A inner join B on (A.ID = B.REF_ID) where ... /* ... */end;
All my queries in the Stored procedure does not filter the tables by CompanyID, so they process the entire data.
However, now we have a requirement to separate the data for each company. That means that we have to put a filter by CompanyID to each of those 20 tables in each query where the tables appear.
Firstly, I put the CompanyID in the context so now its value is accessible through the context_info() function. Thus I do not need now to pass it as a parameter to the stored procedures.
However, I don't know what is the easiest and fastest way to filter the tables. Example:
I modified the above mentioned procedure in the following way:
create procedure ABCasbegin /* some checks and expressions here ... */
-- gets the CompanyID from the context: DECLARE @CompanyID int; SELECT @CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))
select ... from A inner join B on (A.ID = B.REF_ID) where ...
and A.COMPANYID = @CompanyID and B.COMPANYID = @CompanyID /* ... */end;
Now I have the desired filter by CompanyID. However, modifying over 200 stored procedures is rather tedious work and I don't think that this is the best approach. Is there any functionality in SQL Server that can provide the possibility to put an automatic filter to the tables.
For example: when I wrote "SELECT * FROM A", the actual statements to be executed would be "SELECT * FROM A WHERE CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))".
I was looking for something like "INSTEAD OF SELECT" triggers but I didn't manage to find any answer.
I would very grateful is someone suggests a solution for something like "global table filter" (that will help me make an easy refactoring)?
Thanks in advance.
Best regards,
Beroetz
View 5 Replies
View Related
Jan 26, 2006
Howdy,
I have a table that has a group. In this group, I want to filter by 2 different expressions, concatenated with an OR. BUT I can't change the "And/Or" column value for the first entry because it is grayed out. The column will automatically change to an OR value if both my expression column fields are the same (which I don€™t want) but if I put any other value in to the expression field of the second row, the "And/Or" field of the first row automatically changes to an AND.
PLEASE! How do I get the And/Or field "ungrayed" so I can change it to what I want?
The 2 filters I and using check the UserID = to the user, and the other is checking a count to get the Top N 1. (So just showing the current user and the top producer)
View 14 Replies
View Related
Aug 7, 2002
Hi All,
We have a development server and about 25 Production servers. Whenever we did any DDL modification to development, it should be applied to all 25 different servers. I am trying to find a way to apply the changes to these servers from Development server without going to each server and run the script. Is there any way I can automate this action. There is no replication in all these servers. Can you please advise me on how to do this. This is a high priority task i have been assigned and I would appreciate any comments asap.
Thanks in advance.
--Jay
View 1 Replies
View Related
Aug 31, 2007
How do I tell what hotfixes have been applied to an instance?
Thanks
View 3 Replies
View Related
Nov 6, 2006
I am using merge replication between SQL Server 2005 and SQL Express. Some of the articles in my publication have filter conditions. Changes to subscription databases are being applied to the publication database without regard to these filters.
The easiest way to see this problem is to create a merge publication with a single table article with @subset_filterclause of '0 = 1'. Any inserts to the publication database will not be propagated to the subscription database, but inserts to the subscription database will be propagated to the publication database. Can this be right?
View 4 Replies
View Related
Apr 30, 2007
I have created a foreach container to capture values from a query and run a script for each line. For some reason though I can't get past the variable mapping.
The SQL Task that is linked to the Foreach container is somthing like this:
SELECT str1, str2, str2, nValue1, nValue2
FROM MyTable
In the SQL Task I've set the following
ResultSet = Full Result Set
Connection Type = OLE DB
Result Name = 0
I've created the following Variables with a Package scope
s1 as String
s2 as String
s3 as String
n1 as Double
n2 as Double
When I run the package I get the following errors
Foreach variable mapping number 4 to variable "User : : n1" cannot be applied
Foreach variable mapping number 5 to variable "User : : n2" cannot be applied
The data type of nValue1 and nValue2 in MyTable are both numeric(19,4)
In setting the variable types in the package it seems that the closest to numeric(19,4) would be double. Is this why it is failing? Is there any way around it? I just need to pass the variables which are numeric and have decimal places.
Any insight would be greatly appreciated.
Regards,
Bill
View 3 Replies
View Related
Aug 29, 2006
Hello,
I finished applying SP 1 to sql2k5. Under the replication monitor all of the subscriptions now look like [].databasename when they were originally [subscriber1].databasename. Under Mgmt Studio I see the subscriptions correctly. When I try and replicate I get the message "The subscription to publication 'pub_databasename has expired or does not exist." I have tried to reinitialize the subscriptions but it doesn't work. Is there a way to solve this without have to drop the subscriptions and add them again as I do not want to lose the changes that were made on the subscriptions. We are using merge replication. Thanks.
John
View 16 Replies
View Related
Oct 11, 2006
Is the 4GB Database size calculated by totalling up the size of all the databases in an instance OR against each individual DB in an instance (e.g. you can have an unlimited number of DB each up to 4GB in size)?
TIA
Antony
View 3 Replies
View Related
Aug 28, 2007
I'm running sql server 2005 servicepack 2 build 3042 (32bit)
has anyone had any problems with this hotfix????
http://support.microsoft.com/kb/934459
View 9 Replies
View Related
Jul 23, 2005
A Win2k, SQL2k machine with SP2 that only just now has been updated to SP3afails in different ways. Among other things, when I now start EnterpriseManager, I get a message saying "rebbrui.rll" is missing and the snap-infails to initiate. But then the Manager starts anyway.But the SQL application does not work. I searched around the net, and Ifound that it looks as if SQL Slammer has been on the server. I can tell bythe similar symptoms other users have had, allthough I am not sure. Anyway,when I run some online virusscans and the Symantec SQLexp-tool to removeSlammer, I am told that the system is virusfree. Is that because SP3a toSQL2000 automatically got rid of the virus (if any)?But how do I get the SQL to run without any errors again?The server also runs in Terminal Application Mode.Regards, Lars.
View 4 Replies
View Related
Oct 21, 2015
USE [master]
RESTORE DATABASE [EmployeeRecovered] FROM Â DISK = N'D:BackupsNormalEmployeeFULL.BAK' WITH Â FILE = 1, Â
MOVE N'Employee' TO N'D:MSSQLDATAEmployeeRecovered1.mdf', Â
MOVE N'Employee_log' TO N'D:MSSQLLOGEmployeeRecovered1_log.ldf', Â
NOUNLOAD, Â STATS = 5, NORECOVERY
[Code] ....
Now I realze the recovery point is somewhere in TranBackup2.trn and need to go back to the state where only TranBackup1.trn is applied. How can i do this ?
View 4 Replies
View Related
May 29, 2007
The SQL server transition log backups for the ReportServer and ReportServerTempDB databases have stopped working ever since I applied SQL Server SP2 to my TFS. I know this because I know the date the SQL SP was applied and I see that my transaction logs started to fail immediately after application of the SP. This is noted because the backup logs for SQL server start to contain the failure immediately after SP2 application. The failure is because the databases are now set to the simple recovery model (or they were set to the simple model before application of SP2 and the previous SQL server allowed or properly ignored transaction log backups with the simple database recovery model). Why is this failing since the backup task indicates that databases with simple recovery are automatically excluded? Is the reportserver and reportservertempdb both supposed to be simple recovery? I thought reportserver was usually full recovery.
Here's the contents of TfsTransactionLogBackup_20070308160004.txt before the SP2 application:
Code SnippetMicrosoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047
Report was generated on "TEAMSERVER".
Maintenance Plan: TfsTransactionLogBackup
Duration: 00:00:00
Status: Succeeded.
Details:
Here's the contents of TfsTransactionLogBackup_Subplan_20070308180007.txt immediately after application of SP2:
Code Snippet
NEW COMPONENT OUTPUT
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.3042
Report was generated on "TEAMSERVER".
Maintenance Plan: TfsTransactionLogBackup
Duration: 00:00:05
Status: Warning: One or more tasks failed..
Details:
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-03-08T18:00:02.
Task end: 2007-03-08T18:00:02.
Failed:(0) Database 'ReportServer' will not be backed up because it does not have its recovery model set to Full or BulkLogged.
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-03-08T18:00:02.
Task end: 2007-03-08T18:00:02.
Failed:(0) Database 'ReportServerTempDB' will not be backed up because it does not have its recovery model set to Full or BulkLogged.
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-03-08T18:00:03.
Task end: 2007-03-08T18:00:03.
Failed:(-1073548784) Executing the query "BACKUP LOG [ReportServer] TO DISK = N'E:\SQL Server\Database Services\MSSQL.1\MSSQL\Backup\ReportServer_backup_200703081800.trn' WITH NOFORMAT, NOINIT, NAME = N'ReportServer_backup_20070308180002', SKIP, REWIND, NOUNLOAD, STATS = 10
" failed with the following error: "The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Command:BACKUP LOG [ReportServer] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupReportServer_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''ReportServer_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [ReportServerTempDB] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupReportServerTempDB_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''ReportServerTempDB_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsWorkItemTracking] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsWorkItemTracking_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsWorkItemTracking_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsIntegration] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsIntegration_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsIntegration_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsVersionControl] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsVersionControl_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsVersionControl_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsWorkItemTrackingAttachments] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsWorkItemTrackingAttachments_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsWorkItemTrackingAttachments_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsActivityLogging] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsActivityLogging_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsActivityLogging_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsBuild] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsBuild_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsBuild_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [STS_Config_TFS] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupSTS_Config_TFS_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''STS_Config_TFS_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [STS_Content_TFS] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupSTS_Content_TFS_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''STS_Content_TFS_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TFSWarehouse] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTFSWarehouse_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TFSWarehouse_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-03-08T18:00:03.
Task end: 2007-03-08T18:00:03.
Failed:(-1073548784) Executing the query "BACKUP LOG [ReportServerTempDB] TO DISK = N'E:\SQL Server\Database Services\MSSQL.1\MSSQL\Backup\ReportServerTempDB_backup_200703081800.trn' WITH NOFORMAT, NOINIT, NAME = N'ReportServerTempDB_backup_20070308180002', SKIP, REWIND, NOUNLOAD, STATS = 10
" failed with the following error: "The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Command:BACKUP LOG [ReportServer] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupReportServer_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''ReportServer_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [ReportServerTempDB] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupReportServerTempDB_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''ReportServerTempDB_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsWorkItemTracking] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsWorkItemTracking_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsWorkItemTracking_backup_20070308180002'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsIntegration] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsIntegration_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsIntegration_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsVersionControl] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsVersionControl_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsVersionControl_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsWorkItemTrackingAttachments] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsWorkItemTrackingAttachments_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsWorkItemTrackingAttachments_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsActivityLogging] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsActivityLogging_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsActivityLogging_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TfsBuild] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTfsBuild_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TfsBuild_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [STS_Config_TFS] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupSTS_Config_TFS_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''STS_Config_TFS_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [STS_Content_TFS] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupSTS_Content_TFS_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''STS_Content_TFS_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
BACKUP LOG [TFSWarehouse] TO DISK = N''E:SQL ServerDatabase ServicesMSSQL.1MSSQLBackupTFSWarehouse_backup_200703081800.trn'' WITH NOFORMAT, NOINIT, NAME = N''TFSWarehouse_backup_20070308180003'', SKIP, REWIND, NOUNLOAD, STATS = 10
And here it is after the KB934458 has been applied:
Code Snippet
NEW COMPONENT OUTPUT
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.3054
Report was generated on "TEAMSERVER".
Maintenance Plan: TfsTransactionLogBackup
Duration: 00:00:06
Status: Warning: One or more tasks failed..
Details:
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-05-01T08:00:03.
Task end: 2007-05-01T08:00:04.
Failed:(0) Database 'ReportServer' will not be backed up because it does not have its recovery model set to Full or BulkLogged.
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-05-01T08:00:03.
Task end: 2007-05-01T08:00:04.
Failed:(0) Database 'ReportServerTempDB' will not be backed up because it does not have its recovery model set to Full or BulkLogged.
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-05-01T08:00:04.
Task end: 2007-05-01T08:00:04.
Failed:(-1073548784) Executing the query "BACKUP LOG [ReportServer] TO DISK = N'E:\SQL Server\Database Services\MSSQL.1\MSSQL\Backup\ReportServer_backup_200705010800.trn' WITH NOFORMAT, NOINIT, NAME = N'ReportServer_backup_20070501080004', SKIP, REWIND, NOUNLOAD, STATS = 10
" failed with the following error: "The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Back Up Database (Transaction Log) (TEAMSERVER)
Backup Database on Target server connection
Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped.
Databases: All user databases
Type: Transaction Log
Append existing
Task start: 2007-05-01T08:00:04.
Task end: 2007-05-01T08:00:04.
Failed:(-1073548784) Executing the query "BACKUP LOG [ReportServerTempDB] TO DISK = N'E:\SQL Server\Database Services\MSSQL.1\MSSQL\Backup\ReportServerTempDB_backup_200705010800.trn' WITH NOFORMAT, NOINIT, NAME = N'ReportServerTempDB_backup_20070501080004', SKIP, REWIND, NOUNLOAD, STATS = 10
" failed with the following error: "The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
.
View 13 Replies
View Related
Jun 2, 2006
I have a problem where after applying SQl Server 2005 SP1 to my workstation, where it presumably updates Visual Studio, I cannot open a package that is password protected and was created before applying SP1. My colleague has not applied SP1 and can still open the package, but I don't even get prompted for the password.
Has anyone else come across this?
View 7 Replies
View Related
Jan 28, 2008
I realize this gets into business logic, but a DB based solution might be best. Possibly some pre-calculated measurement tables.
Business problem: Creating a cut list for a window covering (blinds) system. It's preferably a fast calculation I could execute while the user awaits "order confirmation and pricing". A .5 second delay per order would be acceptable.
An order can have unlimited number of line items, but typically between 1 and 20 (number of windows in a single house).
(For this problem) the raw material is man-made, and therefore is always the same length for a particular pattern/color (take 12' for this example; we stock patterns in 9', 12', or 16' but it's always the same for a given pattern/color). I need to tell the cutters how to use the rawmaterial with minimal waste. Note: The saw blade takes 1/16th inch.
For each line item; I have pre-calculated the exact cut size and number of slats. Measurements are in inches at 1/8 (.125) inch increments. The length of raw material length we stock for this pattern is an easy link.
The goal is to average less than 6 inches waste per 12' piece of raw material.
Example order:
5 line items for pattern/color FAUX/white, stocked in 12' lengths.
Line 1: 34 slats at 35.125 inches.
Line 2: 36 slats at 36.875 inches.
Line 3: 50 slats at 42 inches.
Line 4: 55 slats at 70 inches.
Line 5: 52 slats at 30 inches.
The resulting cut-list-workorder would evaluate all lines together and tell them how many 12' slats to pull and how to cut them with minimal material waste.
My question:
I'm left wondering if a database style pre-populated answer list (or some other database based solution) might be a lot faster and simpler than some chess-style complex trial-and-error array based VB algorythm (that I haven't even begun to imagine how to write). If so; how would it look?
In addition; the cutters get something like $10/hr so we can't make it too complex. I'd rather waste a little material and avoid undue confusion, but not much. With $5+ million in this material per year, excess waste can really add up. Imagine the difference between 12% and 15% waste. It's an area worth investing in.
Sorry; I know it's not a simple question. Someone might find it interesting enough to solve, or at least provide hope for a DB solution. At present; I just can't imagine it.
View 3 Replies
View Related
Mar 4, 2014
What's the most straight forward to determine what the last cumulative update was that was applied to SSMS?
I know that CU8 is out for SQL Server 2012, I just need to confirm which (if any) update was last applied to SSMS I'm currently looking at.
View 4 Replies
View Related
Sep 10, 2015
Probably not the best "Subject Title", but no the less what I am looking for is a way to get the order in which I should insert data into a table that has 10 FK's to it. I have queries that list them out for me, but they do that in what seems to be alphabetical order. You can also right click the table in question and select view dependencies, but that as well appears to be in alphabetical order.
Is there any query or any way to see what order I should be inserting and/or deleting data into FK tables?
View 0 Replies
View Related
Mar 12, 2007
After applying the DST (daylight savings time) fix by METHOD-2 in the following KB article:
http://support.microsoft.com/default.aspx/kb/914387
We are receiving the following error for all reports we currently serve:
aspnet_wp!webserver!3c88!03/12/2007-08:44:53:: e ERROR: Internal error: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: date
at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
at System.Web.HttpCachePolicy.SetLastModified(DateTime date)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.ReturnResponseHeaders(HttpClientRequest sessionManager, RSStream result, HttpResponse resp)
at Microsoft.ReportingServices.WebServer.ResponseHeaderData.ReturnResponseHeaders()
at Microsoft.ReportingServices.WebServer.HttpResponseStream.InternalFlush(Boolean finalFlush)
at Microsoft.ReportingServices.WebServer.HttpResponseStream.Close()
at Microsoft.ReportingServices.WebServer.HttpResponseStreamFactory.CloseAllOpenStreams()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Reporting Services Version: Microsoft SQL Server Reporting Services Version 8.00.1042.00
SQL Server Version: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
We are using the work around specified in the following post to fix this issue:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/3f2b4854dc79e5e8/1b8261f4cf149078?lnk=st&q=Reporting+Services+dst+error&rnum=2&hl=en#1b8261f4cf149078
Any Help would be greatly appreciated!
Thanks,
ML
View 4 Replies
View Related
Mar 28, 2006
I choose SQL and windows authetication during SQL Express 2005 install. Will this has any impact on the connection string in my Visual Studio 2005 environment?
View 3 Replies
View Related
Feb 13, 2008
I have setup Log shipping between two SQL 2005 servers, and everything seems to be working well. The files are transferring and restoring correctly.
My question is whether I need to add any backup procedures for the secondary server to prevent the secondary server's log file size from growing continuously. Should I be doing a transaction log backup on the secondary server? Or will that break the Log chain?
If it makes a difference, the secondary server is in Standby mode after applying the logs.
Any advice would be appreciated,
~ Michelle
View 4 Replies
View Related
Aug 6, 2006
With the function below, I receive this error:Error:Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.Function:Public Shared Function DeleteMesssages(ByVal UserID As String, ByVal MessageIDs As List(Of String)) As Boolean Dim bSuccess As Boolean Dim MyConnection As SqlConnection = GetConnection() Dim cmd As New SqlCommand("", MyConnection) Dim i As Integer Dim fBeginTransCalled As Boolean = False
'messagetype 1 =internal messages Try ' ' Start transaction ' MyConnection.Open() cmd.CommandText = "BEGIN TRANSACTION" cmd.ExecuteNonQuery() fBeginTransCalled = True Dim obj As Object For i = 0 To MessageIDs.Count - 1 bSuccess = False 'delete userid-message reference cmd.CommandText = "DELETE FROM tblUsersAndMessages WHERE MessageID=@MessageID AND UserID=@UserID" cmd.Parameters.Add(New SqlParameter("@UserID", UserID)) cmd.Parameters.Add(New SqlParameter("@MessageID", MessageIDs(i).ToString)) cmd.ExecuteNonQuery() 'then delete the message itself if no other user has a reference cmd.CommandText = "SELECT COUNT(*) FROM tblUsersAndMessages WHERE MessageID=@MessageID1" cmd.Parameters.Add(New SqlParameter("@MessageID1", MessageIDs(i).ToString)) obj = cmd.ExecuteScalar If ((Not (obj) Is Nothing) _ AndAlso ((TypeOf (obj) Is Integer) _ AndAlso (CType(obj, Integer) > 0))) Then 'more references exist so do not delete message Else 'this is the only reference to the message so delete it permanently cmd.CommandText = "DELETE FROM tblMessages WHERE MessageID=@MessageID2" cmd.Parameters.Add(New SqlParameter("@MessageID2", MessageIDs(i).ToString)) cmd.ExecuteNonQuery() End If Next i
' ' End transaction ' cmd.CommandText = "COMMIT TRANSACTION" cmd.ExecuteNonQuery() bSuccess = True fBeginTransCalled = False Catch ex As Exception 'LOG ERROR GlobalFunctions.ReportError("MessageDAL:DeleteMessages", ex.Message) Finally If fBeginTransCalled Then Try cmd = New SqlCommand("ROLLBACK TRANSACTION", MyConnection) cmd.ExecuteNonQuery() Catch e As System.Exception End Try End If MyConnection.Close() End Try Return bSuccess End Function
View 5 Replies
View Related
Jul 21, 2015
I have been adding a lot of Articles for Publication.
They make it to the distributer but they do not make it to the subscriber.
If I add articles before the previous batch of articles get applied to the subscriber could that cause a problem and for replication to become out of sync?
It is a pull transactional replication.
I have had to generate a snapshot for the problem to go away but it keeps happening.
Fortunately it is not in production yet.
[URL]
View 0 Replies
View Related
Feb 9, 2007
I installed my SQL 2005 Developer edition and applied the SP1. I didn€™t have a time to wait the installation to complete (I needed to reboot) so I cancelled the SP1 which was downloaded from Windows Update.
Now, my development PC says that SQL 2005 SP1 is applied but I am not sure if it€™s applied correctly. I tried to reinstall SP1 in order to be assured but I can€™t get it reinstalled. I get error message saying that you already have SP1 2047 ENU applied.
I just don€™t want (have a time) to troubleshoot some possible upcoming issues in development because of this. So, how can I be assured that I do have SP1 applied correctly?
View 4 Replies
View Related
May 16, 2006
I have recently applied SQL Server 2005 SP1 to a dev machine, and my workstation, where it rpesumably updated Visual Studio. Since then I cannot open an SSIS package that contains some encrypted data, due to storing a database password. I get various error messages, and Visual Studio reports that it cannot load the package - I never get prompted for the password. My colleague who has not applied SP1 yet has no problem. Has anyone else encountered this problem, and if so do they have a solution ?
Errors below:
Error 1 Error loading 'Dim_Staff.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. . A:DevelopmentVisual Studio 2005Production_DeploymentSSIS_PackagesSales_DimensionsDim_Staff.dtsx 1 1
Error 2 Error loading Dim_Staff.dtsx: Failed to decrypt an encrypted XML node because the password was not specified or not correct. Package load will attempt to continue without the encrypted information. C:Dim_Staff.dtsx 1 1
Error 3 Error loading Dim_Staff.dtsx: Error loading value "<DTS:VariableValue xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:DataType="7">12:00:00 a.m.</DTS:VariableValue>" from node "DTS:VariableValue". C:Dim_Staff.dtsx 1 1
Error 4 Error loading Dim_Staff.dtsx: Error loading value "<DTS:Variable xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:Property DTS:Name="Expression"></DTS:Property><DTS:Property DTS:Name="EvaluateAsExpression">0</DTS:Property><DTS:Property DTS:Name="Namespace">User</DTS:Property><DTS:Property DTS:Name="ReadOnl" from node "DTS:Variable". C:Dim_Staff.dtsx 1 1
Error 5 Error loading 'Dim_Staff.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. . C:Dim_Staff.dtsx 1 1
View 4 Replies
View Related
Jan 25, 2007
Hi
We have setup transactional replication between 2 databases on SQL Server 2000 SP3a (~70GB), using a concurrent snapshot (to prevent locking out of the live database) to initilaise the data and a pull subscription from the second database.
From analysing the msdistribution_history table in the distribution database on the subscriber it appears that the snapshot is being applied in a continuous loop to the subscriber database. Viewing the comments column in the msdistribution_history table we can see the following sequence of events occuring
Initialising
Applied script 'snapshot.pre'
Then it applies all the schema files .sch
Then it applies all the index files .idx
The it bulk copies the data in (bcp)
Then it creates the Primary Keys
Then it applies all the trigger files .trg
Then it applies all the referential integrity files .dri
These all complete successfully but then the process kicks off again immediately after reapplying the snapshot. We are unaware of any settings that may be causing this.
Any help on what maybe causing this would be much appreciated.
View 5 Replies
View Related
Oct 11, 2006
hello we want to evaluate TS foundation server but it says it won't support developer edition sql, only sql2k5 stanard. But now we have DEVELOPER version on our development sql server, DEVDATA1, i.e. instances DEVDATA1DEV, and DEVDATA1QA are both installed on the same sql server box with both SP1 applied.
How can we update DEVDATA1QA to Standard version while still have SP1 applied? we just install Standard CD and then apply SP1 again?
Because this instance is our QA version, before we do something silly, if any of you did that before, any advice would be really helpful.
thanks in advance.
View 1 Replies
View Related
Nov 30, 2007
Hi all,
Not sure what's going on here...
I had reports using the HTML Viewer working in RS 2000. The servers were both O/S Windows 2000, SQL Server 2000, IIS 5.0, Reporting Services 2000) The default toolbar and parameters area were formatted and looked fine.
We just migrated to new servers with Windows 2003 Server, SQL Server 2005, IIS 6.0, Reporting Services 2005. I have the reports working fine...except the toolbar and parameters areas look as if there is no formatting at all...as if the style sheet isn't being applied (not even the default one --see below).
Although I don't think this is necessary....I tried the following to resolve the issue....
Updated the RSReportServer.config file.
Driveletter:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServerRSReportServer.config
Checked that the HtmlViewer.css file was in the ...ReportServerStyles folder.
Added the following line between the
<Configuration>.......</Configuration> tags in the RSReportServer.config file.
<HTMLViewerStyleSheet>HtmlViewer</HTMLViewerStyleSheet>
Find
|
Next
Select a format XML file with report data CSV (comma delimited) TIFF file Acrobat (PDF) file Web archive Excel
Export
I can't find anyone else having this issue...any ideas?
Hope someone can help...thanks for looking....
Leslie
View 3 Replies
View Related
May 25, 2015
below data,
Countery
parentid
CustomerSkId
sales
A
29097
29097
10
A
29465
29465
30
A
30492
30492
40
[code]....
Â
Output
Countery
parentCount
A
8
B
3
c
3
in my count function,my code look like,
 set buyerset as exists(dimcustomer.leval02.allmembers,custoertypeisRetailers,"Sales")
set saleset(buyerset)
set custdimensionfilter as {custdimensionmemb1,custdimensionmemb2,custdimensionmemb3,custdimensionmemb4}
set finalset as exists(salest,custdimensionfilter,"Sales")
Set ProdIP as dimproduct.dimproduct.prod1
set Othersset as (cyears,ProdIP)
(exists(([FINALSET],Othersset,dimension2.dimension2.item3),[DimCustomerBuyer].[ParentPostalCode].currentmember, "factsales")).count
it will take 12 to 15 min to execute.
View 3 Replies
View Related