Posts

Showing posts from April, 2011

HideMemberIf...

hi guys, i have named query in as2005: select        'uk' country, 'bucks' state, 'amersham' city, 'chris webb' customer union all select        'italy' country, 'bi' state, 'biella' city, 'alberto ferrari' customer union all select        'vatican' country, '' state, '' city, 'the pope' customer   the dimension looks this: all             - italy                            - bi                                    - biella                                                - alberto ferrari             - uk                         - bucks                                    - amersham                                                - chris webb             - vatican                         -                                     -                                                 - pope   i don't see "blank" members, set hidem

How to turn "property doesnt exist on type" into error

hello, how can turn warning  the property  'property" not exist on type"type" in xml namespace"... into error? know can switch in specific warnings treat errors im not able find proper code!  thanks, jan   hi jan, how can turn warning  the property  'property" not exist on type"type" in xml namespace"... you can try use try.... catch catch exception, , can try use messagebox.show throw exception error message. Silverlight  >  Visual Studio & Silverlight Development Tools

Canvas overlapping problem

when add many shapes(lines , polygon) on canvas , clear children , added new shapes of shapes(children) overlap canvas.  have idea why happen? thanks hi, sorry not understand problem clearly. tell me whether understanding right. the following steps perform. 1. add polygons , lines canvas. 2. clear canvas calling canvas.children.clear() method. 3. add new line , polygons. 4. new lines , polygons overlap sometimes. if above case, change canvas.left property of polygon , line not ovelap each other. regards, sakthi Silverlight  >  Programming Silverlight with .NET – General

HADR and high processor utilization

i'm trying determine if high amount of processor utilization (about 50% across 16 processors) high because of hadr replication (5 availability groups).  how can pull out counter extended events or otherwise? take @ query: my favorite query investigating sql server performance among other things tell cpu utilization currently-running queries, , can see how cpu time accounts for. also can suspend  data movement , observe result. david david http://blogs.msdn.com/b/dbrowne/ SQL Server  >  SQL Server Database Engine

Need to perform Action based on what Select returns

Image
i new ssis background in programming asp.net , basic select, insert, update sql skills. i have execute sql task in ssis package select 2 tables. ie: select name, address, id tablea, tableb where tablea.id = tableb.id , tablea.city = tableb.city  if there match based on select criteria have 1-infinite rows returned. if there no match select return no rows. need know how check if select returns rows , if need perform 2 actions. using returned rows insert table export row(s) excel database. since intent "do something" each row - insert/update them table and/or export them, not use execute sql task this.  use data flow task instead. pushing data object type variable, extracting later use cumbersome.  use ole db source run statement.  you'll rowset out.  can use row count component count rows control whether send email or other notification in subsequent task.  send rows ole db destination insert or ole db command update.  use multicast duplicate flow send rows e

Failover Issue with Multiple Databases

hello everyone,   a week ago had issue database mirroring. have setup high safety mode witness server 5 databases running on sql default instance in windows 2008r2 64-bit , sql2008sp1. making changes physical server on these databases running , unfortunately had made ip changes took server offline (note: server not shutdown/restarted). front end-application uses 5 databases when transactions performed. setup looks this: server (principal), server b(mirror), server c (witness) as had configured witness server, did initiate fail-over. failed-over 2 databases while remaining 3 databases still in primary server.  when checked on mirror server able see 2 databases principals , remaining databases in mirror, synchronizing state. tried ping principal witness , did not go through, principal cut-off. application down 15 min, during time followed these steps bring mirror db's back. 1. alter database 'db-names' set partner off    restore database 'db-names'

stored procedure output to flat file

hi,   i tried find information this, surprisingly can't seem find anything. seems common scenario.   i need send output of stored procedure flat file. first, created execute sql task calls stored procedure. selected "full result set."   my first question is, how capture individual column values? example, under "result set", should create object variable, or should use individual column variables? i've tried both ways, can't seem next item, below...   now, how map variables flat file? if use data flow task, flat file has "no available inputs". if add ole db source before flat file destination, there's no place capture result set.   clearly, missing here.   thanks   -create data flow task -put stored procedure oledb source , connect flat file destination.     SQL Server  > 

Programmatically Deleting an Instance

i'm trying basic ns app , running.  while can through samples fine, seems there no samples programmatically manage instances/applications, etc.  i've googled around , not found either.  looks me uses idf/adf files.  sdk has sparse documentation on it, i've started there , tried things working. i have code create instance/application programmatically, when want drop whole thing , create again, upon calling instance.create() exception (actually innerexception says) saying: notification services failed read nsversioninfo table. i’m following example in sdk (doing disable/unregisterlocal/drop).  interestingly when disable/unregister/drop in sql management studio works fine.  it's interesting note when ignore exception comes once more, after instance , associated databases seem created. here’s short version of code ( getfreshinstance() is entry method):         private void configureinstance(nmo.instance instance)         {             prototypeapplication = new n

How to import Notes data in SQL 2005

i know there notessql driver, installed it, working great in access (2003 or 2007) , sql 2000, couldn't find odbc driver in data source in sql 2005. data source? data provider should choose when import or create linked server in sql 2005? thanks there odbc bridge in ado.net sources ssis can use (or datareader source in sql server 2005 ssis). may have try. thanks. liu - msft SQL Server  >  SQL Server Integration Services

SQL Server 2008 Configuration Manager, SQL Server Services won't display

i installed sql server 2008 enterprise on windows server 2003 enterprise and when start sql server configuration manager not displaying information for "sql server services" node in navigation panel (left side).  instead displaying "the remote procedure call failed. 0x800706be]" the other nodes "sql server network configuration", , "sql native client 10.0 configuration" appear displaying correctly. the first time started configuration manager gave message wmi not able find service.  searching through support forums found post suggested running mofcomp.  ran , recieved following results: d:\program files\microsoft sql server\100\shared>mofcomp "d:\program files\microsoft sql server\100\shared\sqlmgmproviderxpsp2up.mof" microsoft (r) 32-bit mof compiler version 5.2.3790.3959 copyright (c) microsoft corp. 1997-2001. rights reserved. parsing mof file: d:\program files\microsoft sql server\100\shared\sqlmgmproviderxpsp2up.mof mof file ha

Lengthen line on pie chart/ expand percentages

Image
i have pie chart , need 1 of 2 things. either able move percentages not scrunched or lengthen line percentage not right next each other. chart big , trying fit on 1 page. can expand chart , help, know legend off page. ideas? dba hi dbamt, you right-click label on pie chart, , press f4 button open propety window, see customattributes, locate in pielabelstyle, select outside. have enough space label display. if misunderstand you, please feel free let me know. thanks, challen fu challen fu [msft] msdn community support | feedback us get or request code sample microsoft please remember mark replies answers if , unmark them if provide no help. SQL Server  >  SQL Server Reporting Services, Power View

TFS2010 : Splitting default collection in many different collections, issues with tbl_SecurityTokenDelta

hello, i in testing process of splitting tfs2010 200gb default collection smaller collections. the default collection top tables following : tbl_attachmentcontent : 72gb tbl_content : 71gb tbl_securitytokendelta : 36gb after doing first splitting process (removing unwanted projects & running test attachment cleaner), end following top tables : tbl_securitytokendelta : 36gb tbl_content : 18gb tbl_attachmentcontent : 1.8gb the size of tbl_securitytokendelta has not changed though have deleted 75% of source control items.  is there procedure clean table or rebuild content relevant data? if not, every splitted collections bloated 36 gb of useless data.  thanks help.  hi, thanks post. did try query tbl_securitytokendelta see how many records in table? i have tried search how shrink tbl_securitytokendelta table without luck. seems don't have document or procedure clean table. and according description of tfs_configuration database: configuratio

XQuery - Chinese characters

can tell me why statement fails? set arithabort on update xxxxxx set myxml . modify ( 'insert <開關></開關> after (/instance/說明/關)[1]' ) where id = 1 the error is: xquery [xxxxxx.myxml.modify()]: syntax error near 'insert', expected identifier. thanks! since deal unicode characters, prefix expression n'. here example: declare @x xml select @x = n'<instance><說明><關></關></說明></instance>' set @x.modify(n'insert <開關></開關> last (/instance/說明/關)[1]') select @x /* <instance><說明><關><開關 /></關></說明></instance> */ beyond relational SQL Server  >  SQL Server XML

Risk of data loss with Service Master Key using FORCE REGENERATE

hello all. company has live production server on sql server 2012 moved cloud environment without backing service master key. now, we've had few issues come (after researching online) solution force regenerate smk. i'm new ssms , read there risk of data loss when doing that. i've ran queries found here  and databases keys/certificates ones created ssms (master, msdb). stand confirm not lose live production data if force regenerate smk? there should take account this? understand smk important, appreciate info guys have offer. thanks! are able provide more detail of issues suggests regenerating smk?  if smk has caused issues i'm not sure have found everywhere smk being used. if can 100% sure of everywhere relies on smk can make better judgement on whether safe. having  a full backup before doing important aspect give safe restore point.    martin cairney sql server mvp SQL Server

Spacing between rows in Grid

hi, how can add spacing between rows in simple grid, want leave pixel or 5 empty between each of rows. there abbtribute can use ?     what can place borders or other object inside column/row , give width/height or specify margin. or use objects inside grid specify width/height or margin you specify custom row/columns spacing everything inside grid part of row , or column in sense there no concept of spacing between column 1 , 2 except space inside columns. Silverlight  >  Silverlight Controls and Silverlight Toolkit

create database permission denied in database master

i have installed sql server express 2008 pre-requisite application , able login windows authentication. when launch main application shortcut, fails launch prompting error message stating "create database permission denied in dtabase master" in above snapshot. note: permission denied create database in system contex. same works fine "run administrator". know there different links issue. tried possible options no luck. please provide me exact solution.    can assign  sysadmin  role user, if not want make user  sysadmin  you can assign user a  dbcreator  role give role enough permission create database on server. exec master .. sp_addsrvrolemember @ loginame = n 'dinesh' , @ rolename = n 'dbcreator' go please click mark answer if post helped. SQL Server  > 

protocols for silverlight to connect to RIA Services

i think there various protocols silverlight connect ria services (odata/soap etc), factors decide use? , one is used in internal enterprise applications? thanks. thanks helping, but i have read that wcf ria services can expose odata end points, , silverlight includes wcf data services client library enables access data service exposes odata feed, mean wcf ria odata end point can accessed wcf data services client, not ria service client, works proprietary binary protocol? the odata implementation in wcf ria services isn't complete, why in toolkit library , not in ria services proper. haven't heard of attempting use data services client in silverlight connect domainservice using odata have no idea if work or not. not surprising since rather silly thing do. suppose if want try out of academic interest fine, wouldn't more that. if works @ getting worst parts of data services (the client , odata itself) , worst parts of ria services (no anonymous type suppo

TFS Build Server cannot get publish profile to work: “Can't find the valid AspnetCompilerPath”

Image
have solution bunch of web projects , want build server automatically create packages each project. able to (nearly) working. builds fine und packages created on each build. when not specify publishprofile in msbuild arguments. insert default values , not precompile web sites , such. (arguments /p:deployonbuild=true /p:isautobuild=true /p:visualstudioversion=12.0) want use publish profiles (.pubxml) created in visual studio. each project has "test.pubxml". when specify publishprofile parameter, build fail following error message (arguments /p:deployonbuild=true;publishprofile=test /p:isautobuild=true /p:visualstudioversion=12.0): c:\program files (x86)\msbuild\microsoft\visualstudio\v12.0\web\transform\microsoft.web.publishing.aspnetcompilemerge.targets (411): can't find valid aspnetcompilerpath yes, file microsoft.web.publishing.aspnetcompilemerge.targets exist in folder. can deploy projects visual studio on developer machine fine. using following: wind

SSRS Date parameter - current month from SSAS cube

Image
i have ssas cube date dimension called posting period , have report parameter using date dimension show current month. so far have worked out following expression which working(fiscal year calendar going may may) for the year component - can't figure out how work on quarter date part (and month) so as can see quarter , month hardcoded in below expression: ="[postingperiod].[posting period].[year].&[" + cstr(year(today())-1) + "].&[q4].&[10]” any appriciated. tx hi hcmj, in scenario, use expression ="[postingperiod].[posting period].[year].&[" + cstr(year(today())-1) + "].&[q4].&[10]” set default value of parameter , use in mdx query, right? if in case, can use expression below ="[postingperiod].[posting period].[year].&[2013].&[q" & datepart(dateinterval.quarter,today()) & "].&[10]” set value on quarter date part. , returns: if have misunderstood, please point o

Writing double arrays to tables

Image
hi,   i writing data database through c# using sqlbulkcopyreader. have double arrays written table column comma separated text. inefficient because size of text larger , increase io time considerabely.   i need speed reads , write as possible. size of double array constant. can do. looking @ binary data type couldnt find article shows how go writing arrays table.   help appreciated. thanks.   first of don't think storing int arrays in database varchar or varbinary idea, better create new table one-to-many relationship storing data. solution intended efficiently pass arrays client sql server. storage space : it's not quite fair compare storage space arrays numbers have 1 digit did in sample ( generatearray method, retval[ i] = random.next(10) . if use random int value (just replace retval[ i] = random.next(10); with retval[ i] = random.next(int.maxvalue); we'll see 3 times more storage space required comma-separated list, expected. storage space results : n

witexport.exe syntax

i'm trying export work item type can modify in tfs.  i'm using witexport.exe tool syntax below.  both indicate specified "... work item type not exist." witexport.exe /f c:\assignedto.xml /t myserver /n "system.assignedto" \p "my project" witexport.exe /f c:\assignedto.xml /t myserver /n "assigned to" \p "my project" suggestions?  there list of work item types can export?  or samples on acceptable switch values? thanks in advance. mark problem solved.  assigned subset of task.xml.  syntax below worked fine. witexport.exe /f c:\task.xml /t myserver /n "task" \p "my project" mark   Archived Forums V  >  Team Foundation Server - General

Moving SQL Event to their own event log.

i have been searching ability move sql event logs windows application log new custom event log.  reason behind support servers have on 200 database transaction logs backups every fifteen minutes.  makes lot of events in application log nice able redirect them different location.  have found add new custom event log in registry redirecting sql new event log different story.  maybe can give me hint on how make change. suggestion: so during install of sql server windows add sqlserver event log house sql events.  nice if microsoft products follow because when comes time problem shoot issue 1 able see windows event logs of products have been installed on server (at least microsoft ones).  in case wintel team has limited size of event logs during first problem event many alerts have been flushed out of log because of size limitations.  causes change size of log , wait event happen again.  believe having separation in different productions own support personal solve issues faster

TFS WorkItem History query for dashboards OR TFS WorkItem History for SSRS

hi , is there way can write queries workitem history tfs dashboards or can same done ssrs. i prefer out-of-box solution can have dashboard history changes done on particular workitem. 2) second question: assuming tfs integrated sharepoint; a query "all tasks" saved queries across projects tasks in tfs,  can have filter option on webpart in sharepoint filter project wise "all tasks". or there other way can add filtering results webpart ? regards, harry1477 blog : http://harry1477.blogspot.com twitter : http://twitter.com/harry1477 hi harry.1477 , thank posting here. what history of work items want add query? add history filed query, , use fields like: changed by, change date, closed date in query. add query dashboard. , try create custom report based on work item history tables ([tfs_warehouse].[dbo].[factworkitemhistory]) , tables associated other tables: dimarea, dimiteration, dim person…. create report these tables. for more i

Set value and get value...

i can set grid.row value textbox(txtquestion) by: txtquestion.setvalue( grid .rowproperty, 1); but how can row value of txtquestion textbox(txtrowvalue)? tryed on button click, but wont work: txtrowvalue.text = txtquestion.getvalue( grid .rowproperty); help ? hi combo, grid.rowproperty of type int, can't cast string. instead call tostring-method on it:   txtrowvalue.text = txtquestion.getvalue(grid.rowproperty).tostring();   Silverlight  >  Programming Silverlight with .NET – General

Shouldn't Management Studio Express open SQL Express 2008 databases?

hello.  i'm confused , hope can shed light on issues i'm running into.  please know i've searched everywhere answers , i'm not one. i downloaded sql server 2008 r2 express tools http://www.microsoft.com/download/en/details.aspx?id=12847 thinking can edit/maintain sql express 2008 database.  can't.  allows me connect compact database.  compact database ends in sdf , express ends in mdf.  compact database new express?  there allow me edit express database?  management studio?  once inside vs2010, can open mdf (express db) after delete sqlexpress folder in users\...\appdata\local\microsoft\microsoftsqlserverdata folder.  have time in order use database.  error " failed generate user instance of sql server. " why? posts i've read, has gone on years.  sorry complain sql server 2008, r2, compact, express, gets really, confusing of not familiar sql server.  thanks, dave yes, sql server 2008 r2 management studio express can connect ,

Having a major connection issue after outage still

Image
after website outage in west morning im having issues making timely connections sql azure instance..  are there ways reboot sql server instance or kill connections , let reconnect needed?? hello, not support restart windows azure sql database server. if want kill connections specify database, can use dmv sys.dm_exec_connections view connection information , use kill terminates  user sessions in current database based on session id. another workaround changing edition or maximum size of database, or rename database alter database statement, during process, existing connections database closed. regards, fanny liu fanny liu technet community support Microsoft Azure  >  Azure SQL Database

A Shared Resource is Locked.....

platform sql 2008r2 we have application collaboration program transform part of etl within ssis package. program results summary reads, "transfer failed. shared resource locked: int_dts_contact. required resources in use 'administrator' command line transformation on computer xxxx. transformation started @ 5/12/15...." how can release lock on resource? saw th program running. ended process, , reran ssis project invokes it. same error comes same date of 2 days ago. SQL Server  >  SQL Server XML

DataBinding with Converter not updating when Context changes.

i have a usercontrol that displays vehicle information (i.e. year, make, model) from custom class inherits inotifypropertychanged ( vehicleinfo ).  usercontrol uses databinding display in 1 textblock through use of converter class:  < usercontrol.resources > < local:ymmconverter x:key= "yearmakemodelconverter" /> </ usercontrol.resources >  < textblock text= "{binding converter={staticresource yearmakemodelconverter}, mode=oneway}" /> i assign datacontext of textblock vehicleinfo class after initializecomponent().  when usercontrol loads, looks great.  function of usercontrol allows user change details of vehicle.  have button goes , changes year, make, , model properties of vehicleinfo .  using debugger, notice changes applied, textblock not.  is there better way combine properties single bound control?  understand change vehicleinfo expose new property combined these properties, however, seems big headache create cus

Transactional Replication- Read-only subscription The process could not connect to subscriber

details environment transactional replication sql server 2005 1) sql server agent running in domain account  has sysadmin , dbo in      "publisher , distribution , subscriber" database. 2) publisher , distribution on same machine 3) distributorsecuritymode   set run in windows authentication. 4) logreader agent set run in windows authentication. 5) domain account configured in " publisher access list " if subscribersecuritymode " sql authendication" replication working . but when set subscribersecuritymode "windows authenication" fails stating "'the process not connect subscriber .". are missing something? suggestion helpful , appreciated.  job ==> repl_distributor fails does account sql server agent running under have rights access subscriber? sounds unable logon there. ensure in @ least public group in master database, , dbo role in subscriber database. looking book on sql server replication? http://www.nwsu.com/097

Error from ADO connection string to SQL Server 2008

have ado connection string works fine sql server 2000/2005 not work sql server 2008 provider=sqloledb. has provider changed in sql server 2008? strconnect = "server=" & strserver _                                     & ";user id=" & struserid _                                     & ";pwd=" & strpassword _                                     & ";database=" & strdatabase _                                     & ";provider=sqloledb" thanks, hello laral, you know ado can connect sql server 2 kinds of oledb provider. 1 sqloledb , other msdasql. have different connection string. connection string is  msdasql. if want connect sqlserver sqloledb, please try connection string below syntax. oconn.open "provider= sqloledb ;" & _            "data source=myservername;" & _            "initial catalog=mydatabasename;" & _            " user id =myusername;" &a

Pivot table: saving it after creation: insert into or select into

i wrote code pivot data out of table required format.  query works dont see how save resultset as temp table. i tried "insert into..." or "select * (pivot subquery here) temp",... no success. any comments appreciated?   here sample of 1 way this, following creates temp table named #test , loads result of pivot query use adventureworks go select vendorid, [164] as emp1, [198] as emp2, [223] as emp3, [231] as emp4, [233] as emp5 into #test from ( select purchaseorderid, employeeid, vendorid from purchasing.purchaseorderheader) as p pivot ( count (purchaseorderid) for employeeid in ( [164], [198], [223], [231], [233] ) ) as pvt; tom SQL Server  >  Transact-SQL

Problems with Interface implementation.

hi all,    have started silver light. learning silverlight 2 http://silverlight.net/learn/tutorials.aspx.  in second tutorial facing problem with  interface implementation. tutorial in vb , trying  in c#. here code   public class book : inotifypropertychanged  {      private string booktitle;      private string bookauthor;              // implement required event interface      public event propertychangedeventhandler inotifypropertychanged.propertychanged; // error :  explicit interface implementation of event must use event accessor syntax             public string title {          { return booktitle; }          set {              booktitle = value;              notifypropertychanged("title");          }      }      public string author {          { return bookauthor; }          set {              bookauthor = value;              notifypropertychanged("author");          }      }           // factor

Labels not appearing on Vertical Axis of SSRS chart

Image
hello, curious if has observed , has work around problem.  have chart graphs project dates on month. the data set looks this: project, month, projectmilestone1, projectmilestone2 p1,7/6/2011,,9/21/2010 p1,8/6/2011,,9/22/2010 p1,9/6/2011,,9/30/2010 where in data set, there no values defined projectmilestone1 column.  in line chart, have vertical axis range , intervals set auto.  in number properties, have set custom format dd mmm yyyy being used. when generate chart, data labels vertical axis display 'dd mmm yyyy' not range displaying values 9/21/2010 through 9/30/2010. for example, if use data set have values projectmilestone1 column, like project, month, projectmilestone1, projectmilestone2 p1,7/6/2011,9/21/2010,, p1,8/6/2011,9/22/2010,, p1,9/6/2011,9/30/2010,, i vertical axis labels appear such: can comment on how work around issue such data labels appear scenarios?  appears how related first column charted not being populated values. any c

Custom object with collection in XAML

i'd able implement type of code in xaml:  <ns:myobject x:key="myob">    <ns:myobject.myitems>       <ns:myitem itemname="test" />       <ns:myitem itemname="test2" />    <ns:myobject.myitems> </ns:myobject> my class declarations follows: public class myitem {  public string itemname { get; set; }  public myitem(){} } public class myobject {  public list<myitem> myitems { get; set; }  ... } but when run this, error:  "ag_e_parser_bad_property_value".  if remove myitem declarations, this: <ns:myobject x:key="myob">    <ns:myobject.myitems>     <ns:myobject.myitems> </ns:myobject> then app loads fine no error. what's best way i'm trying do? thanks. john a common problem when writing custom collection classes xaml usage not initializing empty collection part of class logic class holds collection propert

rectangles

hi, i created report in ssrs 2008. example : rectangle1 rectangle2                rectangle3 consider above example placed rectangle3 below rectangle1. but rectangle3 displaying after end of rectangle2 (here mean displaying after completion of displaying rectangle2). but need display right below rectangle1 independent of height of rectangle2. i dont know why is occupying space. this happening when taking print of the report. please in fixing this. thanks in advance. hi sudeep puvvadj, when place rectangle 1 , rectangle 2 @ first line, , rectangle 3 @ second line below rectangle, the reporting services display rectangle 3 after contents @ first line. why there space between rectangle 1 , rectangle 3 according height of rectangle 2. as workaround, suggest nest ractangle 3 rectangle 1 draging rectangle 3 rectangle 1. thanks, lola please remember mark replies answers if help. SQL Server

merge replication emails

we have many customers using merge replication on either sql 2005 or sql 2008. setup publisher if replication stops (the publication gets error - red x in replication monitor) can receive email can connect , @ it. i haven't found documentation describing how that. point me in right direction? darin this prove exceptionally noisy. i query msrepl_errors , send out recent errors me. here have done. use [msdb] go /****** object: job [replication errors] script date: 07/28/2009 10:06:31 ******/ begin transaction declare @returncode int select @returncode = 0 /****** object: jobcategory [[uncategorized (local)]]] script date: 07/28/2009 10:06:31 ******/ if not exists ( select name from msdb.dbo.syscategories where name =n '[uncategorized (local)]' and category_class=1) begin exec @returncode = msdb.dbo.sp_add_category @class=n 'job' , @type=n 'local' , @name=n '[uncategorized (local)]' if ( @@error <> 0 or