Posts

Import/export packages giving TDS Stream Error

hi all, we fetching data in our cloud server internal server through packages developed through import/export  wizard scheduled through agent. all these schedulers running fine, yesterday few schedulers failed due tds error. could please check below error , suggest me work around executed user: nt service\sqlserveragent. microsoft (r) sql server execute package utility  version 11.0.5058.0 64-bit  copyright (c) microsoft corporation. rights reserved.    started:  5:30:00 am  error: 2015-05-19 05:46:40.74     code: 0xc0202009     source: data flow task 1 source - xxxxxxxxxxxxxxx [33]     description: ssis error code dts_e_oledberror.  ole db error has occurred. error code: 0x80004005.  ole db record available.  source: "microsoft sql server native client 11.0"  hresult: 0x80004005  description: "protocol error in tds stream"....

Release Management 2015 custom tools not installing past first stage

i rebuilt our workflows in new rm 2015 install. contain few custom powershell scripts created tools/actions , installed throughout 6 stage deployment (3 stages per environment, stage 1 machines, 2 odd numbered machines included in stage 1, stage 3 numbered machines included in stage 1). worked fine in rm 2013 seems custom tools installed remote machine (agent driven) on first stage. tools part of stage 1 installed on machine , tools part of stage 2 (same machine) not installed , deployments fail. what doing wrong? did change or what? the reason deploy way keep half of our machines in order customers access our system without interruption. i able track down cause of tools not deploying. since entire process went through included building new 2015 rm environment talking agents assigned previous rm server, , re-assigned... tools directory in user/account/appdata/local/rm/t/rm had existing folders/tools. agent not smart enough create new folders or whatever tools. once dele...

Using OUTPUT parameter in Entity Framework

hi all, i have stored procedure returns 3 output parameters later want to use parameters next subsequent inserts. stored procedure. 1 create procedure [dbo].[sptransactioninsert] 2 @transactiontype varchar (255) , 3 @transactiondate datetime , 4 -- .... (more fields) 5 @transactionid varchar (50) output , 6 @transactionno varchar (50) output , 7 @transactionserialno bigint output 8 9 as 10 begin 11 12 -- transaction id if parameter value 0 13 -- (i.e) first time generate transaction id , send 14 -- next time same transaction id used 15 if @transactionid = '0' 16 select @transactionid = [......] from transactiontable 17 else 18 set @transactionid = @transactionid 19 20 -- transaction no if parameter value 0 21 -- (i.e) first time generate transaction no , send 22 -- next time same transaction id used 23 if @transactionno = '0' 24 begin 25 ...

Export to First Row in Excel

hi all- quick question: how export data first row of excel spreadsheet?  have tried: 1) making named range in target spreadsheet.  not work data export row beneath named range. 2) using openrowset property (sheet1$a1:d).  think should work, problem cannot map fields field appears in destination on mapping page "f1". i not need/want field names in destination spreadsheet. thank you! bonediggler ok - it.  there no way stop creating fieldnames - there connect issue open on problem , not fixed in 2012 either. http://connect.microsoft.com/sqlserver/feedback/details/573247/ssis-export-to-excel-creates-column-names-even-first-rows-has-column-names-is-unchecked see here couple work arounds: http://social.technet.microsoft.com/forums/en-us/sqlintegrationservices/thread/2aa5769f-f4f6-43a1-9481-afdd98346dc6 chuck SQL Server ...

Shared Database SaaS - DataAccess Layer

approach i we implementing saas shared database. having following schemas dbo.tbl_users client1.tbl_users client2.tbl_users dynamic connection string : datasource:local; userid=client1user password=client1pwd (we had created login user in database default schema client1. but though code , connecting dbo.tbl_users. instead of client1.tbl_users. approach ii we can add dynamically schema name based on client. in these case , need changes entire application. is possible approach i   hi, if object (including tables, view , ect.) without explicit schema name specified in query, object located searching default schema , dbo schema. in approach 1, if connect sql server using login client1 default schema client1, query should use client1.tbl_users in case. please make sure make connection using correct login, , default schema configured. fore more information, see how refer objects section in  http://msdn.microsoft.com/en-us/library/dd283095(v=sql.100...

How to add accdb into SQL 2008

Image
  how add accdb system database shown in sql 2008 r2? jason you have migrate access db sql server ! refer http://www.microsoft.com/sqlserver/en/us/product-info/migration-tool.aspx#access thanks manish please use mark answer if post solved problem , use vote helpful if post useful. SQL Server  >  Getting started with SQL Server

trigger certain event based on which marker reached

i have video wth markers embedded. each marker has unique name. i'm trying trigger events based on marker reached. so far have: void theplayer_markerreached(object sender, timelinemarkerroutedeventargs e)  {             htmlpage.window.alert("pow!!"); }   what i'm looking like: if (sender == marker1) {             htmlpage.window.alert("pow!!"); }  or if (marker == marker2) {             htmlpage.window.alert("bam!!"); } how done?   movie.markerreached += new void m_markerreached( object sender, timelinemarkerroutedeventargs e) { string mtype = e.marker.type.tostring(); // determine whether // marker 1 or 2 if (mtype == “name”) //suppose let marker1 name "name" { htmlpage.window.alert( "pow" )...

Programmatically running a SSDT Schema Comparison

hi, i want able run schema comparison using this: https://msdn.microsoft.com/en-us/library/microsoft.data.schema.tools.compare.schema(v=vs.100).aspx   however, don't know dll i'd have import use (or be).  i thought maybe be microsoft.data.schema.tools.dll have no idea find it. does know how can use the microsoft.data.schema.tools.compare.schema namespace? hello joerne, there no public api available in ssdt accomplish this. please go through below msdn thread more details https://social.msdn.microsoft.com/forums/sqlserver/en-us/2512f0b6-c367-4eeb-a74f-ee610d6da911/schema-compare-database-programatically-in-c if post answers question, please click mark answer. if post helpful please click mark helpful. SQL Server  >  SQL Server Data Tools ...

How to get the correct Sub-total and Grand Total for a Cell Calculation

Image
i trying correct sub-total , grand total calculation product of calculated measure represents current running quantity * standard cost of item valid if calculated per site. tried using calculated measure after lot of research decided go cell calculation works item/site calculation , should honor sub-selects etc opposed scope doesn't. need sub-total sum of totals per item , site , not re-calculation of formula. able degree total end being individual item/site calculations plus item totals added in double amount. tried using except remove member , several other strategies. here code: create cell calculation currentcube.[balanceamount] '([item].[item groups - items].members,[site].[sites].members,[measures].[balance amount])'     as         case             when [item].[item groups - items].currentmember [item].[item groups - items].[all]    ...

SQL Script Error

hi, have syntax error in this, please advise select #temp.*, select  distinct inv_id,             (                  select    '  ' + inv_id + ' (' + inv_type + ') '                  oth_inv_details a                  where    a.inv_id = b.inv_id                  xml path('')              )inv_type_description,              sum(inv_qty) over(partition inv_id) totalqty temp from  oth_inv_qty_loc b; select temp.*, ...

User per database

dear all, a part enterprize manager how can query number of user connected prticular database. regards sufian you can use sp_who, sp_who2 , select user_name ( uid ),* from sys.sysprocesses where dbid = db_id ( 'somedatabase' )   madhu   SQL Server  >  SQL Server Database Engine

Data Browser in Analysis Services 2000

  hi i'm new analysis services , intall application start learning it.  have manage create cube dimensions.  issue when ever trying view data within cube or dimensions giving me following error msg:   "unable browse cube sales. unspecified error"   any idea missing?  while creating cube, manage view data in creating fact table step, tells me have connection database.  using access database source database analysis service example "foodmart 2000".   many thanks k hi, did manage deploy , process cubes?   radim SQL Server  >  SQL Server Analysis Services

How to stop cacheing

hi i want temproraly stop cacheing when test stp procedure, there "set nocount" also need determine execution time of stored procedure, managment studio thinks 0!!, think there stoping performance measurment there , default. thanks help set nocount has nothing caching. asking set statistics on , set set statistics time . if yes check this http://www.sql-server-performance.com/articles/per/statistics_io_time_p1.aspx madhu mcitp, mcts, mcdba,mcp-- blog : http://experiencing-sql-server-2008.blogspot.com/ SQL Server  >  SQL Server Database Engine

Is it a bad practice to put user tables into Master database?

hi, experts here, i wondering if bad practice put user tables master database? pros, cons? any suggestions or discusstions please? thanks. i looking forward hearing you. best regards, yours sincerely,     yes, bad practise.   go through idea. master database   master database records existence of other databases , location of database files , records initialization information sql server. therefore, sql server cannot start if master database unavailable.   so happened master sure whole server in trouble.  better keep safe normal user.   regards SQL Server  >  SQL Server Database Engine

Using IIS ApplicationPoolIdentity as SQL Server login

hi we have scenario following: iis 7.5 server in dmz separated internal domain. each application on iis runs under separate application pool. ms sql 2008 r2 server member of internal domain questions: is possible use applicationpoolidentity of iis server (e.g. "iis apppool\myappapppool") login sql server using windows authentication considering iis server not part of same domain , network sql server? if not, there way can use windows authentication logins iis server set upin manner (standalone, not part of domain)   p.s. this approach works fine on iis server member of same domain sql server.... hi zam6ak,   is possible use applicationpoolidentity of iis server (e.g. "iis apppool\myappapppool") login sql server using windows authentication considering iis server not part of same domain , network sql server? the login in sql server can created windows account. recommend ask in iis forum see account related applicationpooliden...

SQL Collation Error

i new sql server experienced oracle dba.  have sql server 2000 database connect remotely sql 2005 database.  collation of msdb on sql server 2000 sql_latin1_general_cp1_ci_as , database im trying create view (call scottdb) in sql_latin1_general_cp1_cs_as.  there has not been problems in past doing sort of joins in the scottdb database.  created 2 new tables in scottdb (no problem), few associated indexes , new view joins both new tables existing table in database.  i receiving dreaded error:   cannot resolve collation conflict equal operation there nothing view, couple of easy little inner joins.  deleted tables , view, went machine directly in case 2005 management studio issue , received same error.  issue driving me wall.  can please talk me through best way fix it.  much appreciated scott   hi, you have collation statement before equal operation "casting" 1 coallation other. collation conflict prevent engine joining or comapring 2 values each other, example exp...

In which sequence are queries and sub-queries executed by the SQL Engine

in sequence queries , sub-queries executed sql engine? which correct ? a. primary query -> sub query -> sub sub query , on b. sub sub query -> sub query -> prime query c. whole query interpreted @ 1 time d. there no fixed sequence of interpretation, query parser takes decision on fly hi accessguru, the query sequence depends on type of query use. post, confused b option, take nested sub query example. nested sub query can nested inside other sub queries, select statement nested within select statement , return intermediate results. sql executes innermost sub query first, , next level. results of sub query query conditions of primary query. in case, query sequence sub query-> primary query, option b right answer. more information nested query, please refer article: http://www.w3resource.com/sql/subqueries/nested-subqueries.php#sthash.o0wi3mau.dpuf . if correlated sub query, sub query uses values outer query. sub query evaluated once each row proce...

SDK won't load DLLs

 all, i have downloaded , installed visual studio 2005 sdk 4.0, using tfs 2005. i creating new application, , can set reference microsoft.teamfoundation.workitem.  shows in list of available references, , bin directory contains multiple dlls , xml files. here's gets interesting.  intellisense doesn't recognize objects, if force creating object get: could not load file or assembly 'microsoft.teamfoundation.workitemtracking.controls, version=8.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)   here's what's on machine: microsoft visual studio 2005 version 8.0.50727.867  (vsvista.050727-8600) microsoft .net framework version 2.0.50727 sp2 installed edition: professional microsoft visual basic 2005   77626-009-0000007-41187 microsoft visual basic 2005 microsoft visual...

Executing SQLCommand from within UDT code

hello i need obtain current @@language within clr code of user defined type. when try execute sqlcommand "select @@language" on connection current context ("context connection=true") error "system.invalidoperationexception: data access not allowed in context.  either context function or method not marked dataaccesskind.read or systemdataaccesskind.read, callback obtain data fillrow method of table valued function, or udt validation method." is there way current sql connection langugae inside clr code of udt? robert hi robert, as error message indicated, please set dataaccesskind.read enable read-only data access user-defined functions. please see: [microsoft.sqlserver.server.sqlfunction(dataaccess = dataaccesskind.read)] public static sqlstring getlanguage() { using (sqlconnection connection = new sqlconnection( "context connection=true" )) { connection .open(); sqlcommand cmd = new sqlcommand( "sel...

All tables,views,ect. dropped over night (northeurope, Azure Productive, Standard S2)

this morning when arrived in office (6am. gmt) tables, views, ect. 1 of our databases gone without user interaction or scripts running. restore data yesterday in azure management portal, intresting if else had similar problems night. there geral azure sql problem? our server located in northeurope , db azure productive standards2. thank , best regards, michael michael , spoke morning , wanted circle on thread provide context others have hit similar issue. there bug in ssms such when 1 uses object explorer , right-clicks open query windows particular database, , particular database experiencing unavailability @ time, ssms default connection master database.  thus if 1 executes query in window, query fail , appear tables/schema absent because query executed against master database. this bug understand , fixing.  we releasing sql server management studio (ssms) on monthly cadence , newest bits can found here [ link ]. thank again michael raising issue on forums...