Posts

Showing posts from January, 2014

Page break after N rows

i developing report render 150,000 records. can understand may big report requirement such , multiple heads working on excel tabs once exported. whenever have more 50,000 records (aprrox. rows excel spredsheet can handle comfortably), start breaking pages. when there 150,000 records there 3 pages in html reported , 3 tabs when exported excel. how can implement behaviour in ssrs template? thanks actually it's working doing following:    add parent group tablix with =ceiling((rownumber(nothing)) / 10000) expression. (10000 or whatever required no. of rows)   in page break properties of group , check box insert break between groups, leave bottom boxes un-checked .  optionally, may chose set hidden property true text boxes added because of new parent group. in tablix properties , check box "keep on 1 page". if report appears broken, try deleting sort expression associated newly added parent group.    

Estimated row count with BETWEEN and = and logical bit and

 create table t (id int not null identity primary key, status int not null); --fill table decent amount of data (mine has 1.5million rows). --the status column can 1s   select * from t where id between 30000 , 40000   the above sql produces , estimated row count of 1180   select * from t where id between 30000 , 40000     , status & 0x1f  = 1   this 1 produces , estimated row count of 33  select * from t where id between 30000 , 40000     , status & 0x1f  between 1 , 1   and 1 106.   does know why?  sql guessing?  numbers in second , third queries come from? -- -- dan   -- dan it depends on collected statistics of table.   usually selectivity of "=" less "between", suppose, if estimates 10% of rows selected equality condition, estimates around 30% not-equality based conditon.    so, first estimated 1180 rows condition of "id between 30000 , 40000" then when estimated "status &am

Data Upload not working when integrated with look-up component for a package created programmatically

i've created look-up component dynamically package. package created along look-up component data not being uploaded. when right click on ole db destination , click on edit option of package created programmatically. shows message "the component not in valid state. want component fix itself automatically? if click on no option /cancel then warning symbol on the  ole db destination component. on mouse on symbol, message "the component has inconsistent metdata" . i'm not able figure out problem. want fix issue programmatically. below code: i've created look-up component dynamically package. package created along look-up component data not being uploaded. when right click on ole db destination , click on edit option of package created programmatically. shows message "the component not in valid state. want component fix itself automatically? if click on no option /cancel then warning symbol on the  ole db destination component. on mouse on symbol, message &

Need guidance to prevent database corruption

have developed software using c# (.net 4.0) , sqlexpress 2008 edition. problem facing database corrupted frequently. need guidance why database corrupted , how can prevented corruption. there 3 scenarios of corruption: case 1:  database corrupted following error or similar:  error: 9003, severity: 20, state: 9.  the log scan number (180:371:2) passed log scan in database 'mydatabase' not valid. error may indicate data corruption or log file (.ldf) not match data file (.mdf). if error occurred during replication, re-create publication. otherwise, restore backup if problem results in failure during startup.  this type of corruption can repaired , data recovered. in case, similar corruption occurred. case 2:  one of system database master or tempdb corrupted error similar above error.  in case sql service stopped. need replace files of system databases. sometime sql service started , not. have re-install sqlexpress server. problem occured. case 3:  database cor

Uploading to Report Manager via Upload File option does not update the file

hello, i've run across seems bug in report manager, it's glaring , couldn't find mention of anywhere. i consistently see following behaviour ssrs 2008 r2: steps: 1. open report manager. 2. click upload file on tool bar 3. select rdl file, upload "x". 4. assign data sources , render report verify has particular logic error. 5. click upload file again 6. upload modifed rdl file (this 1 has logic error in #4 fixed), upload "x" "overwrite existing" checked. 7. render report find logic error still there.   if delete report before uploading, upload works expected. strangest of all, if download 'incorrect' report server via manage=>download, see contains correct code, though not render properly. if bug, work around, of course, delete existing reports before deployment. didn't seem happen in 2005, can explain what's happening? thanks! hi vercinegetorix, in case, recommend first uninstall ssrs 200

How to get the build number in code?

in vs2010, when creat new build, how build number or change set number source code , time create build in code user can see build number every time when access silverlight application? in project use assembly version number build number display in box. can set version of assembly in project right click propeties assembly information button , there set version. http://www.85turns.com/2009/06/11/versioning-your-silverlight-application/   Silverlight  >  Visual Studio & Silverlight Development Tools

"Assigned to" field in the work item editor

although have added team members in server groups don't appear in „assigned to“ combo of „add new work item“ dialog. what should team members listed in combo? thanks, ognjen users appear in "assigned to" combo box when team foundation decides have become 'relevant' - reason being in organizations 100s or 1000s of employees don't want combo box contain 1000s of names of folks never have bug assigned them; make harder find name that you're looking for. however, don't think we've got our logic determining 'relevant' correct yet in beta 2. we've had feedback on , it's we'll tweaking before release. for time being, users appear in combo box if (a) namespace administrators or (b) have ever connected team foundation server. can still type name assigned field, if doesn't appear in drop down list. Archived Forums V

how to find words between two words in a string

hi how find words  between 2 words in string in sql eg 1 word "users" , second word " name1 " in given string how find "test" in given string i tried this declare @str varchar(max) set @str='dear  afolabi dare fatai  1 of our users test name1 looking cyber description : dsfs.' select substring (@str,5,9)   thanks in advance try this declare @str varchar(max) set @str='dear  afolabi dare fatai  1 of our users test name1 looking cyber description : dsfs.' select ltrim(rtrim(substring(@str , charindex('users',@str) +len('users'),charindex('name1',@str) - (charindex('users',@str) +len('users')) ) ))   http://uk.linkedin.com/in/ramjaddu SQL Server  >  Getting started with SQL Server

SSRS 2008 R2 - Forms Authentication - unable to re-start service after following instructions

Image
hi, i'm attempting implement forms auth in ssrs 2008 r2, intention of logging web service , sharing forms authentication cookie enable users of service load reports.  i've implemented instructions in the  how to: configure custom or forms authentication in reporting services  article, , things seem go fine until step 15, when try , restart service. service stops (as expect) not restart, giving following error message: windows not start sql server reporting services (instancename) service on local computer.  error 1067 - process terminated unexpectedly i hoping else might have seen , resolved issue before, dont seem able find information on solution through google searches or others in organisation. many thanks, hi lonedeveloper, sorry delay. from description, report server cannot restarted error message "error 1607 - process terminated unexpectedly." based on error message, suggest try following steps: open sql server configuration manage

How to not make Tables, Column and Data Available in Excel

Image
goal: not displaying dimension table , data in excel problem: enable deny access user roles in ssas denying access data column next thing not know how dimension table , column not available in excel. information: *the datasource ssas *i have made 3 user have access 2 tables only. hi sakura, according description, want manager role can see dimension table , data column. , employee role can't view table, column , data, right? don't have direct option complete hide dimensions or attributes roles. can use workarounds below. using cube perspectives , hide cube dimension attribute set perspectives role. perspectives use workaround discussed in similar thread below. dimension attribute security hide or unhide attribute based on condition hope helps. regards, charlie liao technet community support SQL Server  > 

Silverlight and Expression Blend

hi all, i have created silverlight project , following first video tutorial create smiley face: but when tried open .sln file in expression blend gives me following error: canvas not supported in windows presentation foundation (wpf) project rectangle not supported in windows presentation foundation (wpf) project ellipse not supported in windows presentation foundation (wpf) project ( + many more) there few differences between project , video tutorial think might cause this: first, in silverlight new project templates have: silverlight applcation silverlight class library unlike video tutorial has:   silverlight javascript application search online templates... secondly, notice default code in xaml different: i page.xaml following code: <usercontrol x:class="hellosilverlight.page"     xmlns=" http://schemas.microsoft.com/client/2007 "     xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml "     width

Resource Governor is set to MAX_CPU = 50% but still the CPU hits 100%

hi all, we have set rg on 1 of our production server particular user 'abc' max_cpu_percent=50%, cpu still touched 100% today due same user 'abc'. parallel query , have set cost threshold of parallelism , max dop on db server. i using sql server 2014 sp 1 on windows server 2012. aa asif , how sure cpu % shown in task manager because of same user ? can show me how confirmed ? cheers, shashank please mark reply answer if solved issue or vote helpful if helped other forum members can benefit my technet wiki articles mvp SQL Server  >  SQL Server Database Engine

TFS HtmlFieldControl height is too large in VS 2012

Image
in vs 2010, htmlfieldcontrol height proportional group next it. in vs 2012, there appears large minimum height can't control. i've tried adding height="200" tag, ignored. bug, or missing something? this xml group field resides in:             <group label="build update notes:">               <column percentwidth="100">                 <control fieldname="contacts.qa.buildupdatemessage" type="htmlfieldcontrol" labelposition="top" dock="fill" minimumsize="(0,100)" height="200" />               </column>             </group> below full (reduced) xml control in context: <q1:witd application="work item type editor" version="1.0" xmlns:q1=" http://schemas.microsoft.com/visualstudio/2008/workitemtracking/typedef ">   <workitemtype name="project">     <description>...</description>

SQL 2008 Upgrade

  hi,   has done database upgrade ss 2000 ss 2008. finding difficulty upgrade ss 2008. can let me know how upgrade database. find errors database services, fails continue.   thanks in advance   at point of "server configuration" screen, shows failed "sql server" , blocks continuing. shows lot of pre-requisites check done before upgrade. there easiest way upgrade.   i tried upgrade ss 2000 enterprise sp4 ss 2008 rtm SQL Server  >  SQL Server Setup & Upgrade

Build workflow guide + task customization

hi can point me quick , simple guide understand how tfs run builds using build engine , understand how to customize ? (simple tasks copy thinkgs etc) ?   thanks, cm consultant hi, sorry that.  here's intro team build 2008. http://msdn.microsoft.com/en-us/magazine/dvdarchive/dd458792.aspx team build 2008 based on msbuild.  when searching tasks such copy command use msbuild copy task query. msbuild copy task http://msdn.microsoft.com/en-us/library/3e54c37h.aspx this also includes example of recurive copy file command. if want see example of set of custom tasks , how install them, can take @ team deploy.  set of custom tasks created used deploy msis servers , clients. http://teamdeploy.codeplex.com i hope helps, mike blog - http://www.codesmartnothard.com Archived Forums V  > 

(Autentication) error while loading report from SQL Azure Reporting

hello, i try download report reporting server , save report image. i use following code (snippet): reportexecutionservice rs2 = new reportexecutionservice(); rs2.credentials = system.net.credentialcache.defaultcredentials; rs2.url = "https://xxxxx.reporting.windows.net/reportserver/reportexecution2005.asmx"; //rs2.url = "http://localhost/reportserver/reportexecution2005.asmx"; // works! // render arguments byte[] result = null; //string reportpath = "/test"; string reportpath = "/reports/kpitile"; string format = "image"; string historyid = null; string devinfo = @"<deviceinfo><toolbar>false</toolbar></deviceinfo>"; //reportingservice.datasourcecredentials[] credentials = null; string showhidetoggle = null; st

DataGrid cell highlight problem

i have 2 datagrid both datagrid have same number , name of column now problem when datagrid loded want hightlight cell have diffrent value in cell. in both grid data may same or diff. how achieve ? hi, you can add rowloading event each datagrid. inside event, can use e.row.getindex() current row index , in itemsource current value. use loop loop throught items in datagrid2 , check if there equals current one. if cannot find one, can use e.row.background = new solidcolorbrush(colors.yellow) highlight it.   hope helps Silverlight  >  Designing with Silverlight

How to migrate data from sql server 2005 to local Pocket PC?

hi, i have database on sql server 2005, , migrate data sql server 2005 local pocket pc. how can create database on local pocket pc , how migrate data sql server 2005 local pocket pc? operating system on pocket pc microsoft® windows mobile™ 2003 second edition. in advance. sql server mobile/everywhere right solution you.  repl , rda technologies let maintain replica of sql server database on device.  know more them please use product resources listed @ http://forums.microsoft.com/msdn/showpost.aspx?postid=295034&siteid=1 . thanks, laxmi narsimha rao oruganti, msft, sql ev, microsoft corporation   SQL Server  >  SQL Server Compact

Spatial Data in SQL Server 2005 ?

hi ~~   we know how sql server 2008 nicely handle spartial data. but need know how other systems db2, oracle , sql server 2005 handle such data ?   i mean, i've red ogc standard sql defines how spatial data should handeled.   my question is, can sql server 2005 work coordinates on flat surface geometry type in sql server 2008 ? or there any way use coordinates latitude longitude in sql server 2005 ?   spatial datatypes not available in sql 2005. can store data varbinary , have application handle or can right own types , functions in clr. there may 3rd party products have not used them.   clr types , functions implemented in sql server 2008 except not user defined. SQL Server  >  SQL Server Database Engine

URGENT

hi all, 1. when m trying shrink tempdb , execute query shows following error use tempdb go dbcc shrinkfile(templog,0) backup log tempdb truncate_only dbcc shrinkfile(templog,0) msg 155, level 15, state 1, line 2 'truncate_only' not recognized backup option. pls rep thanks in advance. munnuru k hello, microsoft removed capability(backup log truncate_only) sql server 2008. i guess should using version 2008 or later, have remove statement backup log tempdb truncate_only the official workaround in sql server 2008 , newer switch database’s recovery model simple .  empties out transaction log, thereby letting dba run dbcc shrinkfile afterwards, switch recovery model full. since temp db in case, in simple recovery model only.. thanks SQL Server  >  SQL Ser

How to copy SQLmonitor Settings(registered publishers) from one machine to another

in sqlmonitor can create groups , register publishers be  "monitored". i have *a lot* of them. copy these settings 1 machine another, there way ? -noel   hi, noel, can find *.xml on way: ...documents , settings\profiler...\application data \microsoft\microsoft sql server\90\tools\sql monitor\rmsetting.xml     SQL Server  >  SQL Server Replication

Will Windows 10 Metro add standard os organization functionality for the creation/use of folders?

windows 8 metro missing standard os organization functionality found in android/ios/windows 8 desktop for creation/use of folders. basic functionality browsing - touch included. objects - first class citizens: identity, public interfaces , authority own behaviour , state you can post feature requests @ http://wpdev.uservoice.com . you need explain feature request , scenarios targets clearly. in way looking differ can storagefolder? Archived Forums T-U  >  Tools for Windows Store apps (archived)

Is Alter partition Fucntion SPLIT I/O intensive?

hi, i wondering if alter partition fucntion fn_xxx split is i/o intensive? or changes meta-data , not i/o intensive. thanks no. there's no physical data movement involved, metadata modified re-arrange first page of each partition can view via sys.parititions , (undocumented) sys.system_internals_allocation_units   SQL Server  >  SQL Server Database Engine

Simple steps to Stop and Restart the Replication

hi,         we replicating database 1 server server using transactional replication. due problem every monday morning have detach , attach database replicating other server. while detaching throws error database in replication. for unchecking database publisher , recreating publisher , subscription process, there simple way or steps stop , restart replication. please let know if there possible solution. regards, fazlu hi fazlu,   this issue seems nothing sql server. seems there issue in application. suggest find out why application unresponsive sometimes.   meanwhile provide work around: make database offline solve issue. in order make database offline, please execute following script: use master go alter database <database name> set offline rollback immediate note: operation roll uncompleted operation back.   for more information statement, refer link: http://msdn.microsoft.com/en-us/library/bb522682.aspx   if unclear, please let me

Caching Issue

i having problem caching of 1 of reports. don't want caching take place within execution properties of report have set "do not cache temporary copies of report". when run it renders cached version ( can tell sure global variable "executiontime" use in report). have 2 instances of reporting services (test , prod) , both running exact same .rdl file yet in test have no caching issues. gives? cheers c caching naturally occur within user's session , same results returned until query parameter value changed.  user can clear session cache report clicking refresh button on report toolbar. paul turley, mvp [hitachi consulting] sqlserverbiblog.com SQL Server  >  SQL Server Reporting Services, Power View

Parameter substitution in an Execute Sql Task

  hello,   i'm having problem parameter subsitution in "execute sql task".  i'm suspecting problem related fact that the "execute sql task" uses cross apply, , perhaps have sort of syntax problem.  i suspect because other "execute sql task" components have don't have problem, , "execute sql task" components use cross apply have problem.  i'm hoping syntax mistake me, , not ssis limitation. any appreciated. here's basic situation: i have c# program passes guid ssis package, shown in simplified form here: guid _importjobid = guid.newguid(); package dtspkg    = app.loadpackage( packagepath, null ); variables pkgargs = dtspkg.variables; // note: have convert string since ssis doesn't list guid supported type when defining package-level variables. pkgargs[ "importjobidentity" ].value = _importjobid.tostring(); dtsexecresult result = dtspkg.execute(); if (dtsexecresult.failure == res

Localized error meassages (Chapter 22) - Client can not find resource!

 good morning i have  integrated step step chapter 22 "how dispaly localized error messages" in silverlight application. have problem, when client throws validation exception dont the errormessage exception "the object instance not found" (in red comment panel). i set propertiy "build action" of resource file on server side "embedded resource" , link file in client side. i have set namespace of resource file on server side structure folder link (client side) located. can here wrong?  is there didn't attend? whats experience in localization of error messages?   thank u 22         how display localized error messages this section explores how error messages can localized storing them in resource files , sharing them across tiers. 22.1        sample setup the example code in document uses .net ria services walkthrough project base project , builds on top of it. start working on example, open walkthrough projec

How to eager load in WCF Ria Services/Linq2SQLDomainModel

i have databound grid @ view (xaml) , itemsource points reportscollection. reports entity has 3 primitives , complex types. these 3 shown expected @ datagrid. additionally reports entity has property of type store. when loading reports via getreports domain method, figure out primitives returned , not whole graph of depth. so, wanted load store property too, made alteration @ domain service:   public iqueryable<report> getreports() { return this .objectcontext.reports.include( "store" ); }   from see @ immediate window, store loaded expected, when returned client still pruned. how can fixed? thank you!  do have [include] tag on store property in report_metadata class? Silverlight  >  WCF RIA Services with Silverlight

Getting Kerberos working in SQL Server 2008

  so i've done far -install windows server 2008 enterprise -add ad directory service role -add domain admin named ssdeadmin -install sql server 2008 using ssde service account -disable connection protocols sql server 2008 except tcp ip -ensure ssdeadmin has serviceprinciplename use adsi, does, , mssqlsvc/domain -enable ssdeadmin des, aes 128 , aes 256 kerberos -enable ssdeadmin delegation services   i @ event viewer security tab, , see kerberos entries "a kerberos ticket requested", when connect sql server 2008 , execute the  " select auth_scheme sys.dm_exec_connections session_id=@@spid " query , , see ntlm entries.   any ideas missing? thanks! todd wilder this exact same problem experiencing. have gotten solution problem of yet? SQL Server  > 

SQL Server doesn't recognize local F G drive problem

i have windows internal database (installed sharepoint wss 3.0) , sql server management studio express installed on w2k3 std server. server has local hard disk drive c, e, f & g. sql server management studio express recognize c , e drive, example in set default database location or in attach database file dialog window c & e drive are available. knows why , how fix problem? thanks i figured out problem. g & f drive doesn't have enough permission. after i gave users read/execute permission, drives available. SQL Server  >  SQL Server Express

How to bind a datagrid to a List property of the model

after searching still can't make work :( my datasource model machinestatusmodel looks this: public class drivedata {         [key]         public char drive { get; set; }         public long freespacemb { get; set; }         public string drivemachinename { get; set; } } public class machinestatusmodel {     [key]     public string machinename { get; set; }     [include]     [association("machinestatusmodel_drivedata", "machinename", "drivemachinename")]     public list<drivedata> drivedatalist { get; set; } ... } so machinestatusmodel holds list of drivedata now use machinestatusdomainservice , using debugger can see data gets transferred fine , values in drivedatalist there on silverlight clientside. but can't figure out how bind datagrid list :( tried example: <sdk:datagrid autogeneratecolumns="false" itemssource="{binding elementname=machinestatusmodeldomaindatasource, path

Extended Events and Consumer/Subscriber Delays

i'm having trouble understanding when , why extended events taking long delivered. max_dispatch_latency 3 seconds can wait indefinitely longer receive extended events. seems events long-running transactions/connections on given database withheld until transaction commits or rolls back. is there specific requirement open transaction completed before xevents sent out?  or unintentionally introducing requirement special predicates on selected events? what i'm observing when dig deeper sql profiler gets see events matter of minutes before xe session gets see them.  happens xe events having active transactions/connections still underway.  if transactions short-lived difference in delay between sql profiler , xe sessions negligible (ie. less max_dispatch_latency). here example of xe session definition: create event session [abc] on server add event sqlserver . login (     action ( sqlserver . client_app_name , sqlserver . cl