Testing with Profiler Custom Events and Database Snapshots ...
www.sqlteam.com/.../testing-with-profiler-custom-events-and-database- snapshots22 Jun 2009 ... We've all had them. One of those stored procedures that is huge and contains
complex business logic which may or may not be executed.Testing with Profiler Custom Events and Database Snapshots ...
www.sswug.org/articles/viewarticle.aspx?id=45179Microsoft SQL Server database help and articles, SharePoint, .Net, Business
Intelligence, newsletter, list servers, forums, scripts, faqs, videos, and daily news.SQLServerCentral: Articles tagged Profiler
www.sqlservercentral.com/articles/Profiler/Items 1 - 20 of 34 ... Testing with Profiler Custom Events and Database Snapshots. We've all had
them. One of those stored procedures that is huge and contains ...Performance and Memory Java Profiler - YourKit Java Profiler
www.yourkit.com/features/ - CachedJava profiler. ... "Quick Info" view: Ability to automatically capture snapshots on
event: Ability to compare memory snapshots: Automated comprehensive memory
...Working with Models ? Phalcon 1.2.2 documentation
docs.phalconphp.com/en/latest/reference/models.html - CachedDeleting Records; Validation Failed Events; Behaviors ... Pointing to a different
schema; Setting multiple databases; Logging Low-Level SQL Statements;
Profiling SQL ... If you need to work with databases at a lower level check out the
Phalcon\Db ... This method aids in setting up the model with a custom behavior
i.e. a ...DBCC CHECKDB error. Internal Database Snapshot cannot be created ...
social.msdn.microsoft.com/.../action?...checkdb...database-snapshot... - Cached22 Aug 2013 ... [SQLSTATE 42000] (Error 5030) Check statement aborted. The database could
not be checked as a database snapshot could not be ... DBCC CHECKDB('
CUSTOM DB') WITH TABLOCK- SUCCESS .... create or database start events for
SQL Trace or Extended Events. .... Tom H-man's threads View Profile.Free SQL Server Tools Software and Utilities - SQL Server Utilities
www.sqlserverutilities.com/SQL-Server-Utilities-Free-SQL-Server-Tools- Software-and-Utilities-for-the-DBA-and-Developer.htm - Cached - SimilarRML Utilities for SQL Server (x86) and (x64) - tools to help database
administrators manage the ... SQLTrace, Profiler & Extended Events ...
procedures creation, new query templates, running custom scripts from Object
explorer's context menu) for ... Create Database Snapshot - simple GUI for
creating a database snapshot.MSTest Unit tests (VS 2012) vs. SQL Server, intermittent Primary Key ...
stackoverflow.com/.../mstest-unit-tests-vs-2012-vs-sql-server-intermittent- primary-key-collisions - CachedWhen I "Run All" using VS 2012 Test Explorer, 22 tests fail. ... Create a Sql
Profiler trace For events, select RPC Starting/completed, sql Batch Starting/
completed, Sql ... at a loss, then you may want to investigate using database
snapshots as part of your unit tests. ... Custom messages for unit tests in MSTest.Basit A. Farooq - United Kingdom | LinkedIn
uk.linkedin.com/in/basitfarooq - CachedLeeds, United Kingdom - Lead/Senior Database Administrator at Parabis GroupView Basit A. Farooq's (United Kingdom) professional profile on LinkedIn. ... log
shipping based warm spare, custom inter-datacentre replication, 100 GB Custom
... DBCC, SQL Profiler, DTA, Auditing, Event Notifications, Extended Events,
Service Broker, SSIS, Visio, Database Mirroring, LogShipping, Database
Snapshots.Content Negotiation - Grails
grails.org/doc/2.3.x/guide/single.html2.9Testing an Application ... 4.7.6Snapshots and Other Changing Dependencies
... 6.5.1Events and Auto Timestamping ... 6.5.2.4Custom Database Identity .....
running with a custom Grails environment called "production", a Spring profile of
...Automate and Improve Your Database Maintenance Using Ola ...
https://www.simple-talk.com/.../database.../automate-and-improve-your- database-maintenance-using-ola-hallengrens-free-script/ - CachedSo does this mean that if you can't create your own custom scripts that your only
..... this stored procedure is designed to check the integrity of your databases. ...
Use locks instead of an internal database snapshot. ..... Author profile: Brad
McGehee ... Brad is a frequent speaker at User Groups and industry events (
including ...Monitoring and Tuning the Database - 11g Release 2 (11.2)
docs.oracle.com/cd/E25054_01/server.1111/.../montune.htm - CachedOther alerts correspond to database events such as Snapshot Too Old or ...... A
green check mark in the SQL Profile column indicates a recommendation that ...Database Management - Oracle Documentation
docs.oracle.com/cd/E11857_01/em.../database_management.htm - CachedIt displays a profile of the amount of time sessions are either working or waiting to
work ... particular wait event that accounted for the highest percentages of
sampled session activity. .... By default, the database takes snapshots at 60-
minute intervals. ..... This user may add additional custom database objects or
extensions to ...ej-technologies - Java Profiler, Java Installer Builder, Java Tools
In JProfiler, you can save a snapshot of all current profiling data to disk. ...
Executors from the java.util.concurrent package; AWT events; SWT events;
Thread starts ... JProfiler offers a custom probe wizard that allows you to define
your custom probes directly in .... JProfiler supports specific probes for the
following databases:.Nodetime Docs: Documentation
docs.nodetime.com/ - CachedDatabase Monitoring; CPU Profiling; Memory Profiling; Alerts; Team Features ...
Check out the screencast to see sample filtering in action. ... Using metric API call
, custom metrics can be sent to the Nodetime server and presented in the ... The
snapshots are then analyzed by Nodetime and presented in a form, which leads
to ...RegOnline Features ? Badges, Custom Events Websites, Email ...
www.regonline.ca/__features/ - CachedPlan, source and deliver events in less time with less costs. ... 1) Charts 2) Event
Statistics 3) The custom event URL ... Reports - Events Snapshot ... Build
directories in tabbed, contact card, and full profile formats. ... Searchable
Attendee Database ... The Event Organizer Tools app allows you to check in
attendees to your ...Techniques for improving online data cleanup in a WebSphere ... - IBM
As the database grows, the performance and maintainability of the site are
affected, ... You will learn techniques to implement, test, and tune cleanup scripts,
and to ... Implementing a custom program for the deletion is also possible and ......
Instead of running snapshots or event monitors against the whole database, you
can ...Minecraft Forum - News, Forums, Mods, and Texture Packs
We've got 390 mods in our database, which has almost grown 400% since back
in ... Additionally, if you're a mod author, check out what our hosting site can do
for you. .... To get snapshots, open your launcher and press the ?New Profile?
button. .... The event is expected to run for 72 hours, ending between Sunday (the
8th) ...[SQL Server] Testing with Profiler Custom Events and Database ...
sqlsample.blogspot.com/.../sql-server-testing-with-profiler-custom_20.html - Cached20 Aug 2013 ... Testing with Profiler Custom Events and Database Snapshots ... www.sswug.org/
articles/viewarticle.aspx?id=45179. (Mike Femenella) We've ...Activiti 5.13 User Guide
www.activiti.org/userguide/Custom extensions; Events. Event Definitions; Timer Event ...... autoReconnect=
true, Tested using mysql-connector-java database driver. oracle, 11.2.0.1.0 ...
Tuesday, September 17, 2013
[SQL Server] Testing with Profiler Custom Events and Database Snapshots
[SQL Server] Efficiently Reuse Gaps in an Identity Column
Efficiently Reuse Gaps in an Identity Column - SQLTeam.com
www.sqlteam.com/article/efficiently-reuse-gaps-in-an-identity-column - Similar9 Feb 2010 ... This article will demonstrate an efficient way to reuse gaps in an identity column.
Please note that this is something you normally shouldn't be ...How to efficiently reuse gaps in identity column - SQLTeam.com
weblogs.sqlteam.com/.../How-to-efficiently-reuse-gaps-in-identity-column. aspx - Cached10 Mar 2009 ... How to efficiently reuse gaps in identity column. Today I am going to talk about
how to efficiently reuse identity values in a column, even if this is ...SQL Server Forums - Article: Efficiently Reuse Gaps in an Identity ...
www.sqlteam.com/forums/topic.asp?TOPIC_ID=139584 - CachedPosted - 02/09/2010 : 08:50:18 Show Profile · Visit AskSQLTeam's Homepage ·
Reply with Quote. This article will demonstrate an efficient way to reuse gaps in ...What To Do When Your Identity Column Maxes Out - Blogs
blogs.lessthandot.com/.../what-to-do-when-your-identity-column-max - Cached6 Mar 2009 ... http://weblogs.sqlteam.com/peterl/archive/2009/03/10/How-to-efficiently-reuse-
gaps-in-identity-column.aspx. 03/10/09 @ 12:39. Comment from: ...Efficiently Reuse Gaps in an Identity Column - SQLTeam ... - Google+
https://plus.google.com/117791377540125472005/.../ShxUNrVsjwv - Cached23 Jan 2013 ... Efficiently Reuse Gaps in an Identity Column - SQLTeam.com #sqlserver #sql
http://ow.ly/h3D6f.IDENTITY (Property) - MSDN - Microsoft
social.msdn.microsoft.com/Forums/sqlserver/.../action?...identity... - Cached17 Nov 2010 ... Efficiently Reuse Gaps in an Identity Column. http://www.sqlteam.com/article/
efficiently-reuse-gaps-in-an-identity-column. bug again what you ...How do I fill in identity gaps? - Ask SqlServerCentral
ask.sqlservercentral.com/.../2844/how-do-i-fill-in-identity-gaps.html - CachedYou can also read this blog post http://weblogs.sqlteam.com/peterl/archive/2009/
03/10/How-to-efficiently-reuse-gaps-in-identity-column.aspx.Auto Identity Column in SQL Server : The Official Microsoft ASP ...
forums.asp.net/t/1793070.aspx/1?Auto+Identity+Column+in... - Cachedhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=98389. http://www.sqlteam.
com/article/efficiently-reuse-gaps-in-an-identity-column. Reply ...id column gets biger then integer ?! : The Official Microsoft ASP ...
forums.asp.net/t/prev/1629478 - Cachedfor the gaps : http://weblogs.sqlteam.com/peterl/archive/2009/03/10/How-to-
efficiently-reuse-gaps-in-identity-column.aspx. (but be aware of ...The HOBT: The IDENTITY Property: A Much-Maligned Construct in ...
thehobt.blogspot.com/2009/.../identity-property-much-maligned.html - Cached28 Jan 2009 ... Identity columns do not serialize inserts ? custom written ... Again, I understand
that there are some applications for which gaps simply ... Or perhaps sequencing
functions aren't quite as efficient in other RDBMS's. ... At the same time some
developers demanded that we carefully re-use deleted IDs in tables ...How do I... Reseed a SQL Server identity column? - TechRepublic
www.techrepublic.com/blog/datacenter/...i...identity-column/406 - Cached21 Jul 2011 ... Microsoft SQL Server’s identity column generates sequential values for
new records using ... If they're not, reset the identity value to avoid errors or gaps
in the sequence of values. .... Personally, I wouldn't reuse deleted identity values.
.... 15 Minute Guide: Optimizing Oracle DBA Efficiency (German).[SQL Server] Efficiently Reuse Gaps in an Identity Column
sqlsample.blogspot.com/.../sql-server-efficiently-reuse-gaps-in_20.html - Cached20 Aug 2013 ... I do not want to re-use the already used Identity value. I just want to ... gaps in the
sequence etc. so would it be less efficient for me to calculate ...Creating a table to store sequence numbers - Beyond Relational
beyondrelational.com/.../sqlserver-quiz-general-2010-dinesh-asanka- populating-a-table-with-default-values.aspx - Cached20 Oct 2010 ... Peter explained this in http://www.sqlteam.com/article/efficiently-reuse-gaps-in-an
-identity-column. Method 2: Maintaining an another table with ...SQL Server find first gap between ID key fields - Stack Overflow
stackoverflow.com/.../sql-server-find-first-gap-between-id-key-fields - CachedThat's why gap reusing would be wonderful for me. sql sql-server ... And I guess it
is much more efficient than mine, isn't it? ? GoRoS Sep 16 '11 ... SQL Server
identity column skipping ids on insert - no errors detected in logs.MS SQL Server :: Filling The Gap Identity Columns - BigResource
www.bigresource.com/MS_SQL-Filling-the-gap-Identity-columns-JtvHr8Jg. html - CachedI do not want to re-use the already used Identity value. I just want to ... gaps in the
sequence etc. so would it be less efficient for me to calculate the field than ...- [PDF]
Efficient Rough Set Theory Merging - CS&P 2013
csp2013.mimuw.edu.pl/proceedings/PDF/paper-14.pdf - Cachedhas its primary aim of bridging these gaps between specific disciplines. As we
provided ... crete examples of such formal knowledge reuse on the area of rough
set theory. ... selected discipline, eventually one have to use the apparatus from
another field ... an equational characterization (collection of identities) of the
theory. Using generators to create unique row IDs - Firebird
Mapper Configuration ? SQLAlchemy 0.9 Documentation
docs.sqlalchemy.org/en/latest/orm/mapper_config.html - Cachedfrom sqlalchemy import Table, MetaData, Column, ForeignKey, Integer, String ......
The identity of an AddressUser object will be in terms of these two values, and is
... less efficient than that which would be produced by direct query construction.
.... with a Session, it is possible to re-use the data from a previous transaction).- [PDF]
ALAE: Accelerating Local Alignment with Affine Gap Exactly - VLDB ...
vldb.org/pvldb/vol5/p1507_xiaochunyang_vldb2012.pdf - Cachedan accurate and efficient algorithm for evaluating local-alignment ... to prune
meaningless calculations and an algorithm for reusing ..... for the 5-th column
must be 3, but the calculated MX (1, 5) = 1. .... Since there is an identity mapping
be-. FBI ? IT Strategic Plan, 2010-2015
Our customers, the agents and analysts in the field and headquarters, expect us
to ... NGW will equip FBI users with new and efficient ways to communicate and
.... Additional strategic gaps identified the need for additional digital forensics ...
and for FBI's biometrics to evolve the legacy identity systems to a multi-modal ...
[SQL Server 2008 issues] Merge with more then one insert statement
[SQL Server 2008 issues] Merge with more then one insert statement |
- Merge with more then one insert statement
- Lookup tables - when too ude them
- Temporary table created in parent SP persists in child SP
- Second Highest
- Executing Scribe packages with stored procedure in SQL
- error in mirroring
- IO stalls --very high in PROD
- Lots of awaiting command with status sleeping in SQL Server 2008R2
- how to find staled statistics?
- can i apply SP3 on Microsoft SQL Server 2008 (RTM)?
- Query with One Column Changing by Month
- Need help in building a SQL query?
- How connect Excel 2007 to Analysis Services 2008
- Why is my logon trigger blocking logons?
- SQL Query (Powerpivot) – for Excel Headers
- Any point in EVER shrinking trans log?
- Problem with Cursor in trigger
- Early Month end processing, How do you handle the dates?
- SQL-Server 2008/R2 and 2012 parallel
- Run Dos Command in SSIS
- DELETE Duplicates
- SQL releasing memory while there is free memory to use.
- Need SQL query to check Lockings as per below columns
- Copy database from 2012 to 2008r2
| Merge with more then one insert statement Posted: 16 Sep 2013 01:43 AM PDT Table1 :id, NameTable2:id, name1,name2,name3,name4,name5MERGE Table1 t1USING table2 t2ON t1.id = t2.idWHEN NOT MATCHED THEN INSERT(name)values(t2.name1)values(t2.name2)values(t2.name3)values(t2.name4)values(t2.name5)as like this i have 16 names in my table(t2.name1 ..... t2.name16)is it possible to do? can we write multiple insert statement in merge clause? if not would like to know the best way to to that.Note : id in table1 is identity column |
| Lookup tables - when too ude them Posted: 16 Sep 2013 01:36 AM PDT Hi All,I need to create an attribute table for say a product. Each of the attributes for a product can have have different fixed 'look-up' types.My question is do I create a look-up table for each type or enter the look-up value straight into the table. The types are fixed and will rarely ever change.I will probably have about 2000 - 3000 rows in the the tablee.gProduct = T-shirtattribute 1 - colour : red/blue/pink/green/black/whiteattribute 2 - size : XS/S/M/L/XLattribute 3 - cut : slim/standard/taylorSo do have this all stored in the product_attributes table:Product ID - 1Colour - redsize- Mcut - standardOr use look up tables with idsProduct ID - 1Colour - 1 - foreign key to product_colour tablesize- 3 - foreign key to product_size tablecut - 2 - foreign key to product_cut tableI want to do look up tables as i feel that it is best practice, but for querying the data it would be simpler to have the data straight in the table.Also there wont be million rows (max 10,000) in the Table so searching the data should still remain relatively quick.Many thanksD |
| Temporary table created in parent SP persists in child SP Posted: 16 Sep 2013 05:42 PM PDT Many of you may know this but I found below observation today and though of posting it:I have creted One procedure test1 and created temp table in it. Executed another procedure test2 and fetch temp table created inparent procedure test 1. it ran fine.**********************************************************************************************create procedure dbo.test2asbegin select * from #temptabletestendcreate procedure dbo.test1asbegin create table #temptabletest ( col1 int ) insert into #temptabletest values(1) insert into #temptabletest values(2) insert into #temptabletest values(3) exec dbo.test2 endExec dbo.test1 |
| Posted: 15 Sep 2013 10:27 PM PDT Could anyone know how to write the query fro fetching the second highest salary without using top, rowcount and rank keywords? |
| Executing Scribe packages with stored procedure in SQL Posted: 15 Aug 2012 05:45 AM PDT Hi,Is there anybody that has any experience launching a scribe package (dts) with in a stored procedure on a SQL 2008 R2). I have recently done an upgrade of our existing setup from a SQL 2005. The issue I'm facing is that I cannot launch my Scribe packages. It has been done with the help of xp_cmdshell and there after with sp_excutesql. The challenge is also that there are also linked servers involved. My SQL server and Scribe is linked.I will be very grateful for A N Y help or hint out there!Cheers :-) |
| Posted: 16 Sep 2013 04:23 PM PDT am getting the following error, when i start executing mirroring after the endpoints configuredTITLE: Database PropertiesAn error occurred while starting mirroring.ADDITIONAL INFORMATION:Alter failed for Database 'AdventureWorks2008R2'. (Microsoft.SqlServer.Smo)[left][/left]"An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)The server network address "TCP://panendarrao-PC:5023" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)"BUTTONS:OK |
| Posted: 16 Sep 2013 03:54 PM PDT Hi, I'm using the below query to find out the IO stalls on my SharePoint databases and the values are very very high tempdb and all other content databases also.[quote]SELECT DB_NAME(database_id) AS [Database Name] , file_id , io_stall_read_ms , num_of_reads , CAST(io_stall_read_ms / ( 1.0 + num_of_reads ) AS NUMERIC(10, 1)) AS [avg_read_stall_ms] , io_stall_write_ms , num_of_writes ,CAST(io_stall_write_ms / ( 1.0 + num_of_writes ) AS NUMERIC(10, 1)) AS [avg_write_stall_ms] , io_stall_read_ms + io_stall_write_ms AS [io_stalls] , num_of_reads + num_of_writes AS [total_io] , CAST(( io_stall_read_ms + io_stall_write_ms ) / ( 1.0 + num_of_reads + num_of_writes) AS NUMERIC(10,1)) AS [avg_io_stall_ms]FROM sys.dm_io_virtual_file_stats(NULL, NULL)ORDER BY avg_io_stall_ms DESC ;[/quote][u]Results:[/u]Database Name file_id io_stall_read_ms num_of_reads avg_read_stall_ms io_stall_write_ms num_of_writes avg_write_stall_ms io_stalls total_io avg_io_stall_mstempdb 1 7379637 5193579 1.4 13426056418 7808809 1719.3 13433436055 13002388 [b]1033.2[/b]tempdb 3 7704708 5191584 1.5 13428092553 7818850 1717.4 13435797261 13010434 [b]1032.7[/b]WSS_Logging 1 3688926053 7913329 466.2 11414374 898077 12.7 3700340427 8811406 [b]419.9[/b][u]Questions:[/u]1. Is this DMV giving cumulative values for io_stall_read_ms and io_stall_write_ms from last sql service restart?2. We are taking content database full backups daily, which will take 8 hours to complete. Is full backup creates any IO on tempDB and content databases?3. Running DBCC CHECKDB on weekly, taking 8 hours to complete. Is DBCC CHECKDB is causing this high IO stalls?4. Tempdb is data files and log files are on separate drives. We have 2 mdf files on same drive with equal size since we have 2 cpus and ldf file is on separate drive. Tempdb is pre sized to 50 GB. Indexes are healthy. But still we are seeing high IO wait times?[i]Can you please give step by step details on how to run SQLIO tool to see the SAN IO stats?[b][/b][/i] |
| Lots of awaiting command with status sleeping in SQL Server 2008R2 Posted: 16 Sep 2013 03:43 PM PDT Hi All,In my SQL Server 2008R2; if i run SP_WHO2 i see lots of SPID(Awaiting Command) with sleeping status. I checked and found these are consuming lots of CPU time and in program name column details are - OSQL-32, Micorsoft SQL Server Mangement Studio, Microstoft SQL Server Management Studio-Query Analyzer and some users applicaiton name. And CPU usage is shooting between 40-50% for SQLServer.exe all time since there is no active transaction too. How to troubleshoot this?Thanks in advance. |
| how to find staled statistics? Posted: 16 Sep 2013 03:42 PM PDT I'm using the below query to find when was my statistics last updated. [b]But I wanted to know how stale my statistics are [/b]? Is there any script to get that information?'USE [?];IF DB_NAME() NOT IN(''master'',''msdb'',''tempdb'',''model'')begin SELECT ''CHECKING STATS FOR '' + DB_NAME() AS ''DATABASE NAME''SELECT OBJECT_NAME(A.OBJECT_ID) AS ''TABLE NAME'', A.NAME AS ''INDEX NAME'', STATS_DATE(A.OBJECT_ID,A.INDEX_ID) AS ''STATS LAST UPDATED''FROM SYS.INDEXES AJOIN SYS.OBJECTS BON B.OBJECT_ID = A.OBJECT_IDWHERE B.IS_MS_SHIPPED = 0ORDER BY OBJECT_NAME(A.OBJECT_ID),A.INDEX_IDend' |
| can i apply SP3 on Microsoft SQL Server 2008 (RTM)? Posted: 16 Sep 2013 03:25 PM PDT SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')10.0.1600.22 RTM Standard Edition (64-bit)select @@versionMicrosoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM) |
| Query with One Column Changing by Month Posted: 16 Sep 2013 04:27 AM PDT Hello all, I "inherited" the following code as part of a query for a report:[code="sql"]-- Januaryif @MonthUnits = 1 begininsert into #tmpJDEnbrunits select '000' + ltrim(MCMCU), GBAN01/100, mcdl02 from [JDEPSQL1\JDEProd].JDE_PRODUCTION.PRODDTA.F0902, [JDEPSQL1\JDEProd].JDE_PRODUCTION.PRODDTA.F0006 where GBMCU = MCMCU and GBFY = @fy and GBLT = 'AU' andGBOBJ = '9900' and GBSUB = '006' andMCSTYL in ('R') AND MCMCU<' 999' AND MCRP22<>'X'end-- Februaryif @MonthUnits = 2 begininsert into #tmpJDEnbrunits select '000' + ltrim(MCMCU), GBAN02/100, mcdl02 from [JDEPSQL1\JDEProd].JDE_PRODUCTION.PRODDTA.F0902, [JDEPSQL1\JDEProd].JDE_PRODUCTION.PRODDTA.F0006 where GBMCU = MCMCU and GBFY = @fy and GBLT = 'AU' andGBOBJ = '9900' and GBSUB = '006' andMCSTYL in ('R') AND MCMCU<' 999' AND MCRP22<>'X'end[/code]And so on through December.As you can see, the only thing changing for each month is the two digits at the end of the "GBAN" field (GBAN01 for January, GBAN02 for February, etc.) based on the value of @MonthUnits (again, 1 for Jan, 2 for Feb and so on). I think there has to be a more efficient way of coding this, can anyone help?Thanks in advance. |
| Need help in building a SQL query? Posted: 16 Sep 2013 06:42 AM PDT Hi Experts,I have table called "Entries" having general information of Employees as...TableName: Entries[code="sql"]Select * from Entries where mskey = 1234[/code]MSKEY, ATTRNAME, AVALUE1234, NUMBER, 31234, FNAME, DAVID1234, MNAME, M1234, LNAME, HUDSON[code="sql"]Select * from Entries where mskey = 2345[/code]MSKEY, ATTRNAME, AVALUE2345, NUMBER, 52345, FNAME, MARK2345, LNAME, WOOD2345, EMAIL, mwood@email.comNOTE: MSKEY is the Primary Key for the table Entries. NUMBER is also primary key.I need to write a SQL query and the output should look like...NUMBER, FNAME, MNAME, LNAME, EMAIL1234, DAVID, M, HUDSON, NULL (Blank)2345, MARK, NULL (Blank), WOOD, mwood@email.comI did a SQL query as...[code="sql"]select a.avalue as [NUMBER], b.avalue as [FNAME], c.avalue as [MNAME], d.avalue as [LNAME], e.avalue as [EMAIL]from Entries.a, Entries.b, Entries.c, Entries.d, Entries.ewhere a.mskey = b.mskey and b.mskey = c.mskey and c.mskey = d.mskey and d.mskey = e.mskey and a.attrname = 'NUMBER' and b.attrname = 'FNAME' and c.attrname = 'MNAME' and d.attrname = 'LNAME' and e.attrname = 'EMAIL' and a.mskey in(select mskey from Entries where avalue in ('1234','2345'))[/code]Please help me to write a SQL query using the table "Entries". Thanks in advance.Regards,Arun |
| How connect Excel 2007 to Analysis Services 2008 Posted: 14 Jun 2009 01:57 AM PDT Hi AllI am trying to use Excel 2007 to connect to my 2008 Analysis Server (64 bit SQL 2008 on Small Business Server 2008).From Excel, I go:Data --> From Other Sources --> From Analysis ServicesThen I get an error message: Unable to connect to data source. Reason: Unable to locate database server.Should this functionality work out of the box? Or do I need to install an add-in or something?Any help would be most appreciated.thanksKevin |
| Why is my logon trigger blocking logons? Posted: 11 Sep 2013 08:14 AM PDT I've created the following trigger to track logons:[code="other"]Use masterGoCreate database AuditDBGoUSE [AuditDb]GO CREATE TABLE [dbo].[ServerLogonHistory]( [SystemUser] [varchar](512) NULL, [DBUser] [varchar](512) NULL, [APP_NAME] [varchar](512) NULL, [SPID] [int] NULL, [LogonTime] [datetime] NULL, [HOST_NAME] [varchar](512) NULL) ON [PRIMARY] GO Grant insert, update, select on ServerLogonHistory to publicGo CREATE TRIGGER [Tr_ServerLogon]ON ALL SERVER FOR LOGONASBEGINif( (ORIGINAL_LOGIN() <> 'sa')and APP_NAME() not like 'SQLAgent%'and APP_NAME() not like '%IntelliSense')INSERT INTO AuditDb.dbo.ServerLogonHistorySELECT SYSTEM_USER,USER,APP_NAME(),@@SPID,GETDATE(),HOST_NAME()END GO[/code]When I run this all is good, table is in place, etc. but I tested it by logging in as another user and I'm unable to logon. I then granted permission to the table explicitly to that user and am still unable to logon. When I check the user it is a member of public. When I check the table under permissions-effective tab I get the following for public: "[i]cannot execute as the database principal because the principal "public" does not exist, this type of principal cannot be impersonated, or you do not have permission[/i]"For the other user it says: "[i]the server principal "domain\username" is not able to access the database "AuditDb" under the current security context[/i]"I'm missing something here - but am stumped as to what it is. Can anyone point out the obvious to me? :-)Oracle is my usual forte, and implementing a logon trigger is a little simpler process. |
| SQL Query (Powerpivot) – for Excel Headers Posted: 16 Sep 2013 08:30 AM PDT Hi,Today I'm using a connection to an excel file using PowerPivot and I'm using a sql query to return just the number of rows with info of that excel file , it is working perfectly however I need to do the same for multiple files and opening a connection is not really straight forward because it will add an extra tab in the data model , so my only option is to use a sql query to join the results of all the files .I've used union before, to consolidate excel files with the same number of columns and same headers so I know that what I'm trying to do is possible , here is a couple of things that I've tried .With an open connection to the excel file , this query is working[code="sql"]SELECT 'AMID_MAPG' AS WORKBOOK , COUNT(*) AS TOTAL_ROWSFROM [AMIDMapping$][/code]I'm getting the error "The SQL statement is not valid. There are no columns detected in the statement." with the next query :[code="sql"]SELECT 'AMID_MAPG' AS WORKBOOK , COUNT(*) AS TOTAL_ROWSFROM [AMIDMapping$]UNION ALLSELECT 'CTO SKU Template' AS WORKBOOK , COUNT(*) AS TOTAL_ROWSFROM 'C:\Users\josh\Desktop\Projects\IT\CTO SKU Table.xlsx'.[CTO SKU Template$][/code]Any help would be much appreciated |
| Any point in EVER shrinking trans log? Posted: 15 Sep 2013 10:47 PM PDT I have databases that generally do not accumulate much in the transaction log. There is an automated script that runs a backup stored procedure every 15 minutes, doing backup of the trans log one the quarter, half and three quarter hour and differential on the full hour during the workday, and a full every night at 11pm, all geared to execute ony if the database has undergone a change during the preceding appropriate interval.The activity is fairly light, so not much ever accumulates in the trans log. However, I occasionally do things like mass imports and such that make the trans log swell quite a lot. This does not happen much - a few times per year, but it's generally a pretty (relatively) massive undertaking. The most active database is a bit over 100 MB, its trans log is currently 560 MB, as a result of several large actions and some missed backup cycles.Is there EVER any point in shrinking the trans log, even when the growth is a result of such random and infrequent activity? Does an unnecessarily large log slow anything down, or are there any other benefits from releasing the unused space? Disk space is absolutely NOT an issue - I'm at barely 3% usage and no real expectation of that radically increasing anytime soon. |
| Problem with Cursor in trigger Posted: 16 Sep 2013 03:29 AM PDT Hi all,I have the following trigger after AvailPhysical field is updated.Although I have written that table field ITEMID must start from 'HD-' or 'MM-' or 'FT-' and ITEMGROUPID must be 'parts' it works for every ITEMID and every ITEMGROUPID and not only for them that have the above criteria.I have tried to add one more condition for ITEMID before cursor starts but again with no results.AFTER INSERT,UPDATE ASIF UPDATE(AVAILPHYSICAL)BEGIN DECLARE @ITEMID NVARCHAR(21) DECLARE @AVAILPHYSICAL NUMERIC(15,2)DECLARE @INVENTLOCATIONID NVARCHAR(15)DECLARE @ITEMGROUPID NVARCHAR(15)DECLARE @INVENTDIMID NVARCHAR(15)DECLARE outerCursor1 CURSOR FOR SELECT S.itemid, SUM(AVAILPHYSICAL),INVENTLOCATIONIDFROM INSERTED Sjoin inventtable IT ON IT.ITEMID=S.ITEMID AND IT.DATAAREAID='SRVC' and it.ITEMGROUPID='parts' JOIN INVENTDIM d on S.INVENTDIMID=d.INVENTDIMID and d.DATAAREAID=S.DATAAREAID WHERE d.DATAAREAID='001' AND d.INVENTLOCATIONID IN ('SPW100','SPN260') AND LEFT(S.ITEMID,3) IN ('HD-','MM-','FT-') GROUP BY S.ITEMID,d.INVENTLOCATIONID--,IT.ITEMGROUPID OPEN outerCursor1 FETCH NEXT FROM outerCursor1 INTO @ITEMID, @AVAILPHYSICAL,@INVENTLOCATIONID WHILE @@FETCH_STATUS = 0 BEGIN IF NOT EXISTS (SELECT ITEMID,INVENTLOCATIONID FROM ESHOPINVENTSUM WHERE ITEMID = @ITEMID AND INVENTLOCATIONID=@INVENTLOCATIONID ) BEGIN Insert into dbo.TEMPINVENTSUM (ITEMID,AVAILPHYSICAL,INVENTLOCATIONID ) Select @ITEMID,@AVAILPHYSICAL,@INVENTLOCATIONID END ELSE BEGIN UPDATE TEMPINVENTSUM SET ESHOPINVENTSUM.ITEMID =@ITEMID ,ESHOPINVENTSUM.INVENTLOCATIONID= @INVENTLOCATIONID ,ESHOPINVENTSUM.AVAILPHYSICAL = @AVAILPHYSICAL WHERE ESHOPINVENTSUM.ITEMID =@ITEMID AND ESHOPINVENTSUM.INVENTLOCATIONID= @INVENTLOCATIONID END FETCH NEXT FROM outerCursor1 INTO @ITEMID, @AVAILPHYSICAL,@INVENTLOCATIONID END CLOSE outerCursor1 DEALLOCATE outerCursor1ENDPlease help.Thanks |
| Early Month end processing, How do you handle the dates? Posted: 12 Sep 2013 03:35 AM PDT We have always waited until the first of each month to start our month end processing. We would use code like the following to determine the prior months last day.[code="sql"]declare @runDate datetime;declare @evalDt datetime;set @runDate = convert(char(10),getdate(),101);set @evalDt = convert(char(10),(dateadd(dd, - datepart(dd,@runDate) , @runDate)),101);[/code]We have been asked by management for awhile now that they want us to start processing sooner. Like when the first falls on a Monday or Sunday to be able to start on Saturday. So we have thought about how to make this work with all of the processes that have the above calculation, something similar would be done to find the first day of the prior month. So we looked at the dates through the years and determined that the earliest date we could potentially need to start would be the 26th, we always have Thanksgiving and the day after off. So we started adding the following code to our processes.[code="sql"]set @rundate = (case when datepart(dd, GETDATE()) >= 26 then dateadd(dd, 10, GETDATE()) else GETDATE() end);[/code]Now management is throwing us a new curve. For this coming November they want to cut off our month at 11/22/2013. And they want anything processed after that date to fall into December results. As you can see the logic we were adding isn't going to work for this situation.So my thoughts went to setting up a table that we could update that would contain the start date for that month and an end date. So in the this situation I would have a start date for the month of November as 11/01/2013, the end date would be 11/22/2013, these all would go under the month end date of 11/30/2013. Then for December the start date for the month would be 11/23/2013 and the end date would be 12/31/2013, month end date for these would be 12/31/2013.I'm curious to know if or how others handle their dates? Do you think I'm on the right track with using a table? Any issues you've run into?Thanks, |
| SQL-Server 2008/R2 and 2012 parallel Posted: 15 Sep 2013 10:31 PM PDT Hello,I have installed SQL Server 2008/R2-64Bit (Developer Edition) on Win7.Can I install SQL Server 2012 64Bit (Developer Edition) parallel on the same system?RegardsNicole ;-) |
| Posted: 16 Sep 2013 01:31 AM PDT Hi,I need to run DOS commands in SSIS 2008 to copy from one server to another server.Currently using batch files to process it.RegardsShaun |
| Posted: 16 Sep 2013 01:40 AM PDT Hello,I did a check in my table and I found these duplicates:Key Month Usage45 Sept 46445 Sept 47128 Sept 76228 Sept 76641 Sept 56141 Sept 56847 Sept 86247 Sept 872How to delete the duplicate rows with less usage?For example for 45 Sept 46445 Sept 471I need to delete the first 45 Sept 464Thanks. |
| SQL releasing memory while there is free memory to use. Posted: 16 Sep 2013 12:31 AM PDT All,We had a situation on one of our production servers today. The max memory is set to 110 GB. At a certain point the SQL Process started to release memory and got all the way down to 50 GB. At this point it started to have performance problems for the application hooked up to it. IT also threw an error like this in the log: AppDomain 6 (mssqlsystemresource.dbo[runtime].5) is marked for unload due to memory pressure.During this period of time, about an hour the CPU level went very high. IT stayed high as the memory consumption gradually grew again. I eventually cleared the procedure cache and the CPU came down.During this period of time there was not memory pressure from any other applicaiton -- the free memory was increasing as the amount of memory sql was using decreased. I have checked windows event logs and sql errorlogs and find nothing.Has anyone seen this before? Any ideas on why this happened?ThanksJohn Tracy |
| Need SQL query to check Lockings as per below columns Posted: 15 Sep 2013 10:33 PM PDT Query to check Lock occurance--Need a SQl query which can show the details colums as belowColumns Names - dd:hh:mm:ss:msssession_idsql_textlogin_namewait_infocpuetcPlease let us know how to provide the complete query text which causes locks & which takes long time to execute?? |
| Copy database from 2012 to 2008r2 Posted: 15 Sep 2013 09:30 PM PDT Hi All,I have "Quiz database" in sql server 2012, Now i want copy same database in another 2008 server(SQL server 2008)I used copy database option but while execution it is throwing error. Note: I have not implemented any 2012 features in "QUIZ" database. earlier it take backup from 2008 and restored in 2012 server. Now it is not working back-word restoration.Is there any third-party tool to do this operation.Regards,RR |
| You are subscribed to email updates from SQLServerCentral / SQL Server 2008 - General / SQL Server 2008 To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |
[SQL Server] Using REPLACE in an UPDATE statement
Using REPLACE in an UPDATE statement - SQLTeam.com
www.sqlteam.com/article/using-replace-in-an-update-statement - Similar31 Mar 2010 ... This article covers using the REPLACE function to selectively replace text inside
a string in SQL Server. The REPLACE function is easy to use ...sql - Oracle UPDATE statement using the `REPLACE` function ...
stackoverflow.com/.../oracle-update-statement-using-the-replace-function - CachedI am trying to remember how form a proper REPLACE statement in ... UPDATE
TABLENAME SET COLUMN1 = ' ', SET COLUMN2 = ' ' WHERE ...error while using replace in an update statement in sql server 2008 ...
stackoverflow.com/.../error-while-using-replace-in-an-update-statement-in- sql-server-2008 - CachedWhat error are you getting ... Major Error 0x80040E14, Minor Error 25501 >
update table US14-HSS-SQUARE_AISC14-HSS-SQUARE set ...sql server 2005 - How to update a part of the string using replace ...
stackoverflow.com/.../how-to-update-a-part-of-the-string-using-replace- function-in-tsql - CachedHi I have a column of nvarchar(1000) type. I need to get rid of encode ... This will
replace in the entire column. REPLACE(MyColumn, '&', '&').Using REPLACE in a UPDATE statement - Dev Shed
using a sql statement to do a string replace - Velocity Reviews
update using replace function - Dbasupport.com
www.dbasupport.com/.../showthread.php?26372-update-using-replace... - CachedData was entered using dashes. eg 617-123-4567 I want to get rid of the dashes
... dashes but how can I use this function in an update statement.SQL statement for replace/update a stringvalue in an Oracle table ...
ask.sqlservercentral.com/.../sql-statement-for-replaceupdate-a-stringvalue-in-a .html - Cached0. Please use replace in Oracle, can be done in one update statement. ... we can
help you better if you are using SQL Server. Any chance of ...How to use REPLACE() within NTEXT columns in SQL Server ...
Replacing part of field data of table with another string using SQL
Query to use update statement with Replace function in SQL Server ...
www.aspdotnet-suresh.com/.../query-to-use-update-statement-with.html - Cached12 Jun 2012 ... In previous posts I explained Replace function example and Substring function
example in SQL Server and many more articles relating to SQL ...How to Find and Replace Text in MySQL Database using SQL ? My ...
www.mydigitallife.info/how-to-find-and-replace-text-in-mysql-database- using-sql/ - Cached23 Apr 2007 ... How to Find and Replace Text in MySQL Database using SQL ... update
client_table set company_name = replace(company_name, 'Old ...replace considerations for SQL
pic.dhe.ibm.com/infocenter/rbdhelp/.../regl_data_sql_replace.html - CachedUse a get statement (with the forUpdate option) to retrieve the row. ...
sqlStatement: An embedded SQL UPDATE statement to replace the implicit SQL
UPDATE ...SQL UPDATE Statement - W3Schools
Running a SQL query to replace certain characters in a table ...
www.webmasterworld.com/databases_sql_mysql/3216875.htm - Similarrunning a sql query to replace certain characters in a table. ... have a database
that contains many characters and symbols we no longer want (or that we need
to replace with something else). ... UPDATE Product_DescriptionsOraFAQ Forum: SQL & PL/SQL ? update using replace function
www.orafaq.com/forum/t/170809/0/ - CachedI have a table called email that contains a field called email. I have a few records
in the table that contain example@hotmial.com and want to ...Changing part of a string in SQL Server using REPLACE | Victoria ...
victoriayudin.com/.../changing-part-of-a-string-in-sql-server-using-replace/ - Cached11 Mar 2013 ... Using REPLACE in SQL Server, you can quickly update the account names to
reflect the correct department name. If you want to preview what ...Using REPLACE in an UPDATE statement - Ashish's Blog
www.ashishblog.com/blog/using-replace-in-an-update-statement/30 Nov 2011 ... doing a search and replace in SQL is not radically difficult. You basically do an
update using the replace() function.Examples of using XQuery to update XML Data in SQL Server
www.mssqltips.com/sqlservertip/.../examples-of-using-xquery-to-update-xml- data-in-sql-server/ - Cached2 Aug 2012 ... Examples of using XQuery to update XML Data in SQL Server .... The syntax
format for replace value of is as follows: replace value of ...MySQL :: MySQL 5.0 Reference Manual :: 13.2.10 UPDATE Syntax
[SQL Server] Handling SQL Server Errors
TRY...CATCH (Transact-SQL) - TechNet - Microsoft
technet.microsoft.com/en-us/library/ms175976.aspx - CachedImplements error handling for Transact-SQL that is similar to the exception ...
Errors that have a severity of 20 or higher that stop the SQL Server Database ...Error Handling in T-SQL: From Casual to Religious - TechNet
technet.microsoft.com/en-us/library/aa175920(v=sql.80).aspx - CachedVB and C/C++ programmers are so spoiled by the error-handling tools in ... That's
because SQL Server sets the value of @@Error variable after each statement.Error Handling in SQL Server ? a Background
www.sommarskog.se/error-handling-I.html - CachedError Handling in SQL 2000 ? a Background. An SQL text by Erland Sommarskog
, SQL Server MVP. Last revision 2009-11-29.Handling SQL Server Errors in Nested Procedures - CODE Magazine
Using TRY?CATCH to Handle SQL Server Errors - About Databases
SQL SERVER ? 2005 ? Explanation of TRY?CATCH and ERROR ...
Error Handling in SQL Server Stored Procedures - Stack Overflow
stackoverflow.com/.../error-handling-in-sql-server-stored-procedures - CachedI have a fairly complex SP (logic wise) with nested IF BEGIN END ... In order to be
able to do a rollback , you need to do a begin transaction at the ...Error handling in sql server Part 56 - YouTube
www.youtube.com/watch?v=VLDirfx_OQg6 Oct 2012 - 18 min - Uploaded by kudvenkat
In this video we will lean about handling errors in sql server 2005, 2008 and 20012. Error ...SQL Server Transactions and Error Handling - CodeProject
www.codeproject.com/.../SQL-Server-Transactions-and-Error-Handling - Cached1 Jul 2003 ... SQL Server Transactions and Error Handling; Author: Saumendra Poddar;
Updated: 2 Jul 2003; Section: Database; Chapter: Database; ...Handling SQL Server Errors - SQLTeam.com
www.sqlteam.com/article/handling-sql-server-errors - Similar5 Apr 2010 ... This article covers the basics of TRY CATCH error handling in T-SQL introduced
in SQL Server 2005. It includes the usage of common ...SQL Server Error Handling Tips
www.mssqltips.com/sql-server-tip-category/79/error-handling/ - CachedError Handling Tips. Raiserror. Using the NOWAIT option with the SQL Server
RAISERROR statement. Throw. SQL Server 2012 Throw Statement Introduction.SQL Server 2008 error handling best practice - Anthony Bloesch's ...
SQL Server 2012: Transact-SQL Error Handling - Online Training ...
pluralsight.com/training/.../sqlserver-transact-sql-error-handling - Cached21 Aug 2013 ... Robust Transact-SQL coding practices dictate proactive planning for anticipated
and unanticipated errors that might occur during code module ...New Course: SQL Server 2012: Transact-SQL Error Handling | the ...
blog.pluralsight.com/.../new-course-sql-server-2012-transact-sql-error- handling/ - Cached21 Aug 2013 ... Joe Sack of SQLskills has just published a new course: SQL Server 2012:
Transact-SQL Error Handling Robust Transact-SQL coding practices ...Handling Errors in SQL Server 2012 - Simple Talk
https://www.simple-talk.com/sql/.../handling-errors-in-sql-server-2012/ - Cached3 Jan 2013 ... The error handling of SQL Server has always been somewhat mysterious. Now at
last, the THROW statement has been included in SQL Server ...SQL Server Error Handling - BlackWasp
www.blackwasp.co.uk/SQLErrorHandling.aspx - Cached3 Oct 2010 ... Microsoft SQL Server 2005 introduced new error handling capabilities for scripts
and stored procedures. This article describes the use of the try ...Exception Handling in SQL Server Stored Procedure with TRY ...
www.aspdotnet-suresh.com/.../exception-handling-in-sql-server-stored.html - Cached8 Mar 2013 ... Handle Exceptions in SQL Server | Exception Handling in SQL Server for Stored
Procedure | Error handling in SQL Server.New Course: ?SQL Server 2012: Transact-SQL Error Handling? - Joe ...
www.sqlskills.com/.../new-course-sql-server-2012-transact-sql-error-handling / - Cached21 Aug 2013 ... Today Pluralsight published my new course, ?SQL Server 2012: Transaction-SQL
Error Handling?. As the title suggests, this course steps ...SQL Server Exception Handling by TRY?CATCH - Dot Net Tricks
www.dotnet-tricks.com/.../sqlserver/O3P3120412-SQL-Server-Exception- Handling-by-TRY?CATCH.html - Cached25 Sep 2012 ... Like C#, SQL Server also has an exception model to handle exceptions and
errors that occurs in T-SQL statements. To handle exception in Sql ...Tip (SQL Server): Error Handling in a Stored Procedure
www.novicksoftware.com/.../tips-erorr-handling-in-a-stored-procedure.htm - CachedTip (SQL Server): how to handle errors in a stored procedure.
Search This Blog
Danh sách blog
1. Thông Tin Địa Điểm Trường Học Thuộc TpHCM
2. Tìm địa điểm ** Chính xác** Bản đồ,số ĐT,website
3. ATM Agribank, bản đồ, địa chỉ, đường đi
4. ATM Vietcombank, bản đồ, hướng dẫn đường đi đến Địa điểm
5. ATM Sacombank, bản đồ, hướng dẫn đường đi đến Địa điểm
6. ❤ ❤ Dịch vụ chọn lọc cho bạn ❤ ❤
7. Sửa lỗi
8. Đầm bầu
9. Top nice templates for you
10. Top answers for your issues - collect information from Google Search
11. Top Clips Vui Nhộn
12. AngularJS Tutorials
13. Lời bài hát
