SQL Server 2008 :: Tell Number Of Times People Use SSMS To Change Client Data?
Mar 21, 2015
I'm trying to quantify the number of times folks use SQL Server Management Studio to change client data in one of our production databases. Does SQL Server keep this statistic? How do I get to this data?
View 6 Replies
ADVERTISEMENT
Jul 28, 2015
is there a way to see the data of a table variable in the SSMS debugger? For example, if I set a breakpoint in SSMS and look at a populated table variable named @MyTable in the Locals tab at the bottom of the IDE, a value of "(table)" is displayed. There does not appear to be a way to expand or drill into this variable in the debugger to see the data. Do you know if there's a way to do this through the debugger or do you use an alternate approach when using the SSMS debugger?
View 1 Replies
View Related
Feb 18, 2015
I have a set of rows in a table like for example
Client ID Client Name Date Score
1 Smith 12/31/2014 25
1 Smith 10/15/2014 45
2 John 08/11/2014 55
2 John 06/18/2014 15
3 Rose 04/15/2014 12
4 Mike 07/23/2014 28
5 Mary 01/5/2014 56
6 Lisa 08/1/2014 54
6 Lisa 05/10/2014 34
Now I want to use Row Number function or any way where I can get the result as below
Client ID Client Name Date Score RowNo
1 Smith 12/31/2014 25 1
1 Smith 10/15/2014 45 2
2 John 08/11/2014 55 1
2 John 06/18/2014 15 2
3 Rose 04/15/2014 12 1
4 Mike 07/23/2014 28 1
5 Mary 01/5/2014 56 1
6 Lisa 08/1/2014 54 1
6 Lisa 05/10/2014 34 2
View 3 Replies
View Related
Mar 16, 2015
one of my database data file is 100 GB and the log file is 500 GB.DB is in full recovery model and the transaction logs happen once in 6 hours.Even then, the Database log file isn't reducing in size.
View 9 Replies
View Related
Jul 28, 2015
Some logic for calculating the count for changed values.
E.g. :--
ID VAL
1 10
1 20
1 20
1 20
1 10
1 10
1 10
1 20
1 10
Here in the above table my value changed from 10 to 20 and so.., so Val column value changed 4 times, so I need the result like :
id count
1 4
View 7 Replies
View Related
Jan 13, 2013
Or can it record before and after column changes based on the LSN only?
An extract from a file based legacy accounting system is performed every night. The system does not have a primary key because transactions are managed through program code. (the more things change...). The extract is copied to text in Unix and FTP'd to Windows, where the file is loaded into SQL Server by kill & fill. Because of the expense of modifying the source system, there is enormous inertia/resistance to injecting a primary key at the source, so kill & fill it stays.
In reading about Change Data Capture, it seemed to me that column level insert update and delete are stored in tables that remember the before and after content of each column tracked. In my reading I have seen many references to the LSN to decide when and what to record as changed, but I have not seen any refereference to the necessity of a primary key for Change Data Capture to work. This is in contrast to replication, where the requirement for the existence of a primary key is made plain.
Is it possible to use Change Data Capture against a table without a primary key? How to use it to change the extract from kill and fill to incremental.
View 9 Replies
View Related
Sep 10, 2015
I have a single table that consist of 4 columns. Entity, ParamName, ParamsValue and ParamiValue. This table stores normalized Late Fee related parameters for apartments. The Entity field contains a code that identifies the apartment complex. The ParamName in a textual field that contains the name of the parameter that the other 2 fields define the value for; ParamsValue and ParamiValue. If the Late Fee parameter (as named in ParamName is something numerical then the value for that parameter can be found in ParamiValue else its in ParamsValue.
I don't know if 'Pivot' is the correct term to use for describing what I am trying to do because I've looked at the Pivot examples and I don't see how that will work for this. Using the Table and data as provided below, how would I construct a query so that I get 1 row per Entity in which the columns are the ParamsValue or ParamiValue for the ParamName listed in the column header (for the query)?
Below is the DDL to create the table and populate it.
USE [DBA_UTIL]
CREATE TABLE [dbo].[PARAMEXAMPLE](
[Entity] [varchar](16) NULL,
[Code]....
View 4 Replies
View Related
May 7, 2015
If you write a query that outputs XML, you'll have a long string in the Results window/tab that is also a link. Clicking on this link opens a new tab in SSMS with the formatted XML string easier to read.
My issue is that clicking on the link opens the "formatted XML string" tab ON THE SAME tab as my code and no way to go back to my code after that ... I need to reload the query from disk, if saved, to erase the "formatted XML" window.
View 0 Replies
View Related
Sep 15, 2015
I have to set up log shipping from Prod server "A" to 2 different DR servers ("B" and "C")...What do i have to do differently (or additional) using the GUI (ie not using Tsql Scripts) to accomplish this, in addition to the steps that are done to log ship to just one DR server?
View 0 Replies
View Related
Apr 22, 2008
Hello,
On a windows 2003 server R2 x64, i had the Framework.net 3.5, Sql Server 2005 express (instance s423553 on NT SERVICENetwork) and Visual Web Developper 2008.
I installed Sql Server Express 2008 Express (install .SQLexpress with the local account sqlserv10). The first time (with the account NTSERVICENetwork), it failed. I uninstalled it and Sql Server Management Studio 2005. The second time, the install end properly. But, can't find SSMS. On a MsSql2008 microsoft page, i've found a link for SSMS 2005. So i installed it.
But, on this server, Sql Server Management Studio Express 2005 does not work with Sql Server 2008. I tried to use the 2008 Instance with Visual Web Developper 2008 but it didn't work (only compatible with sql server 2000, 2005....).
Could you help me please ?
Thank you.
View 1 Replies
View Related
Jun 19, 2015
For security reasons customer wants to put a SQL database on an encrypted thumb drive (IronKey). Here's the rub though. He wants to be able to work with the data on a workstation. Then, if he takes his laptop out of the office he wants to be able to simply plug that thumb drive into the laptop and fire up SQL on the laptop and use that same database. Procedurally this would work in that the database can be created so that the location is the same from both machine viewpoints, however will the two different SQL instances allow moving the database back and forth like this?
View 9 Replies
View Related
Mar 6, 2015
I am having a problem transforming a data set to the structure I need. I have data in the following format.
Id Visit1 Visit2 Visit3 Visit4
1 2Mar2010 27Mar2010 24Apr2010 8Jul2010
2 2Apr2010 3May2010 4Jun2010 11Jul2010
I need to transform it into a table which gives a count of the number of subjects at each visit at the end of each month.
For example, in March there will be 1 subject at visit 2. In April, there will be a total of 2 subjects, 1 at visit 1 and 1 at visit 3. In May there will be 2 subjects, 1 at visit 3 and 1 at visit 2, etc.
Here is the table I was hoping to produce.
Date.....Subjects.......Visit1.....Visit2.....Visit3.....Visit4
March....1.............................1
April......2...................1.........................1
May.......2.............................1..............1
Jun.......2............................................2
Jul.......2...........................................................2
View 1 Replies
View Related
Dec 14, 2014
I got this ERD and I have 2 questions about it:
What is the minimum number of times that R2 can appear in the connection? and what is the maximum?
A=5
B=5
C1=1
C2=2
View 1 Replies
View Related
Jun 3, 2015
When I execute the following command, I get the output truncated to 79 characters, including three dots (as an ellipsis, I suppose).
EXEC master..xp_cmdshell 'powershell.exe "Get-ChildItem D:Databazepaleontologieprilohyverejneg -filter g417*.* -recurse | select Fullname | out-string -width 255"'When I execute the core command directly in Powershell, whether the text or ISE version, it works correctly, with or without the out-string -width command.
Get-ChildItem D:Databazepaleontologieprilohyverejneg -filter g417*.* -recurse | select Fullname | out-string -width 255What does it take to get SSMS to not truncate my output strings?
View 6 Replies
View Related
Jan 30, 2015
I am building a query. I have a table with 4 columns and need to try and put the times together. There are some inconsistencies with this, and i'm hoping to exclude them.. Here is a sample table:
Function | Employee | DateTime
--------------------------------------------
1 | 1 | 1/30/2015 1:47 PM
2 | 1 | 1/30/2015 1:49 PM
2 | 1 | 1/30/2015 1:50 PM
3 | 2 | 1/30/2015 1:37 PM
3 | 2 | 1/30/2015 1:39 PM
3 | 1 | 1/30/2015 1:40 PM
4 | 1 | 1/30/2015 1:42 PM
4 | 1 | 1/30/2015 1:45 PM
Function 1 = Clock In Type 1
Function 2 = Clock Out Type 1
Function 3 = Clock In Type 2
Function 4 = Clock Out Type 2
Basically what I need to do is take the time from rows with Function 1 and match it with Function 2 so I can get a total time of the clock in. Function 3 rows need to match up with Function 4 rows so I can get another set of total times. There may be more clock in rows then clock out rows or more clock out rows then clock in rows, and there may be multiple clock ins & outs per day per employee. I'm basically trying to get totals for each Clock In/Out type.
View 8 Replies
View Related
Mar 20, 2015
If exists (select fieldID from #tmploginfo where status <> 0
group by fieldID
having count(*) > 0)
begin
backup log rdb to disk = N'C:
db1.trn'
End
I want to iterate this query using a loop as many as 5 times max.
View 3 Replies
View Related
Apr 1, 2015
I have a specific requirement. I need to insert the DML statements executed from Management Studio into a SQL table. We have SQL Server 2008 R2 and 2012 instances.
View 8 Replies
View Related
Sep 9, 2015
I would like to view the previous executed query error message in SSMS. Is there any way to view the query execution error messages history in SSMS?
View 2 Replies
View Related
Sep 30, 2015
SQL Server 2012 Replication. The command prompt instance of the replication is being run as the same user as the SSMS "version" using the runas option. With SSMS the error is that the client is missing a privilege. There is no error when it runs from the command prompt. All runs well.
We have reinstalled the replication feature.We have gone through several MSDN articles that indicate exactly what privileges (both within the DB and in Windows) that service account should have. None have worked Incidentally, when I create a new publication and indicate that the SQL Server Agent be used , the publication runs.
View 0 Replies
View Related
Oct 2, 2015
Because of a performance problem, somebody has given me a script which came from a SSRS report.
The code as supplied does not work when multivalued parameters are used.
Testing/tuning/building in SSMS is far superiour than in SSRS. So that's why I like to use SSRS for building the code/script/sql-statement.
Offcourse parameters have to be set correctly. (That is no problem).
Splitting of the multivalued parameter is not a problem either.
View 5 Replies
View Related
Apr 20, 2010
When I go to open a file in SSMS, the Open File dialog box appears. In the left side of that box, there is a panel containing shortcuts to various locations: Desktop, My Projects, and My Computer. I would like to add some shortcuts to folder that I use in this area, but I haven't been able to figure out how. how to do this?
View 9 Replies
View Related
Jan 31, 2008
Please help!!!!
Need to produce a query that show the cities and the number of people per city?
simple table
firstname
lastname
age
location
location shows the dif cities and the sql query will show cities will a count of people per city
how do you do this?
View 3 Replies
View Related
Apr 11, 2015
In my staging table I am having data like below
ABL¯ABL¯0¯0¯ABL¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ABQ¯480¯825¯DLS¯AMA¯ABQ¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ACD¯808¯1255¯DLS¯ELP¯TCS¯PHX¯ACD¯ ¯ ¯ ¯ ¯
ABL¯ADE¯1256¯471¯DLS¯AMA¯ABQ¯LSV¯ADE¯ ¯ ¯ ¯ ¯
ABL¯AFT¯1140¯1744¯DLS¯LAX¯FON¯AFT¯ ¯ ¯ ¯ ¯ ¯
ABL¯AHM¯1178¯1637¯DLS¯LAX¯AHM¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ALB¯1769¯1825¯DLS¯WIL¯ALB¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ALE¯1041¯1150¯DLS¯ALE¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
Now I want to find the Number of times a '¯'character appears in a string. I should get output 14
View 2 Replies
View Related
Mar 8, 2015
We have a view with many left joins. The original creators of this view might have been lazy or sloppy, I don't know. I have rewritten the query to proper inner joins where required and also nested left joins.
So rather then the following exemplary fragment
select <many items>
from A
left join B on B.id_A = A.id
left join C on C.id_B = B.idthis now looks like
select <many items>
from A
left join (B
join C on C.id_B = B.id
) on B.id_A = A.id
Compilation time of the original view was 18s, of the new rewritten view 4s. The performance of execution is also better (not counting the compile of course). The results of the query are identical. There are about 30 left joins in the original view.
I can imagine that the optimizer has difficulty with all these left joins. But 14s is quite a big difference. I haven't looked into detail in the execution plans yet. I noticed that in both cases the Reason for Early Termination of Statement Optimization was Time Out.
View 9 Replies
View Related
Jun 20, 2013
Problem Summary: Merge Statement takes several times longer to execute than equivalent Update, Insert and Delete as separate statements. Why?
I have a relatively large table (about 35,000,000 records, approximately 13 GB uncompressed and 4 GB with page compression - including indexes). A MERGE statement pretty consistently takes two or three minutes to perform an update, insert and delete. At one extreme, updating 82 (yes 82) records took 1 minute, 45 seconds. At the other extreme, updating 100,000 records took about five minutes.When I changed the MERGE to the equivalent separate UPDATE, INSERT & DELETE statements (embedded in an explicit transaction) the entire update took only 17 seconds. The query plans for the separate UPDATE, INSERT & DELETE statements look very similar to the query plan for the combined MERGE. However, all the row count estimates for the MERGE statement are way off.
Obviously, I am going to use the separate UPDATE, INSERT & DELETE statements. The actual query plans for the four statements ( combined MERGE and the separate UPDATE, INSERT & DELETE ) are attached. SQL Code to create the source and target tables and the actual queries themselves are below. I've also included the statistics created by my test run. Nothing else was running on the server when I ran the test.
Server Configuration:
SQL Server 2008 R2 SP1, Enterprise Edition
3 x Quad-Core Xeon Processor
Max Degree of Parallelism = 8
148 GB RAM
SQL Code:
Target Table:
USE TPS;
IF OBJECT_ID('dbo.ParticipantResponse') IS NOT NULL
DROP TABLE dbo.ParticipantResponse;
[code]....
View 9 Replies
View Related
Oct 28, 2015
I used the selfssl.exe tool to generate a certificate on my db server, successfully added to Personal Certificates in MMC, added R/W permissions for the service account to the cert, selected the new certificate in the protocols for mssql and restarted the service. So far so good, however when trying to connect from SSMS with encryption check box checked I get the following error:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server, Error: -2146893019)
The certificate chain was issued by an authority that is not trusted.
When I look in MMC, the only intended purpose for the certificate is "Server authentication" and I'm not able to add "Client authentication". Does selfssl.exe not support client authentication?
View 2 Replies
View Related
Aug 7, 2007
Hi there,
I want to change the default sql-server port number 1433 to a new one. Can i do that? If yes, how?
Also, i have noticed that there is no port number option in the sql server 2005 management studio login window. So, what if the server has changed its port number?
Any suggestions would be appreciated. thanks
View 4 Replies
View Related
Jul 23, 2005
Good morning !Anyone knows how can i change a SQL Server Serial number without uninstallit ?Thanks in advancedJLuis
View 1 Replies
View Related
Apr 24, 2014
I need to write a SQL to find number of hours between a begin time and end time. The fields are varchar. There are several date functions in sql, but I am not able to figure out how to get the hours between two times that is not in date format.
BEGIN_TIME END_TIME
0900----- 1500
1000----- 1700
1000----- 1230
0930----- 1030
View 3 Replies
View Related
Sep 15, 2006
Is there a way to get the number of occurances of a word within a specific row?
I want to query a dataset and have a column act as the number of occurances of a word within that row. I also need to use Full-Text searching... Is this possible?
View 6 Replies
View Related
Dec 13, 2007
I downloaded and performed a full install of SQL Server Express 2008 Nov CTP. It was installed on a fresh installation of Windows Vista Enterprise x64.
During setup, I checked the 'Client Tools' box which has the description:
"Includes management and development tools: SQL Server Management Studio, SQL Server Configuration Manager, SQL Server Profiler, and Database Engine Tuning Advisor"
The installation ran fine with no errors. After install I looked for the Management Studio but couldnt find it anywhere. No SQL Server Profiler or Database Tuning Advisor either. The only tool that appears to have installed is the SQL Server Configuration Manager.
If I check my Start Menu, the only 2008 items that exist are
Microsoft SQL Server 2008 >
Configuration Tools >
SQL Server Configuration Manager
SQL Server Error and Usage Reporting
SQL Server Installation Center
I checked the summary log and everythign PASSED:
Package results:
Passed
Execution statistics:
Exit code: 0x00000000
Exit message: Passed
Package start time: 12/13/2007 14:05:39
Package end time: 12/13/2007 14:09:06
Package install location: c:Program Files (x86)Microsoft SQL Server100Setup Bootstrap
Package initial action: Install
Media source location: Install
Media version: 10.0.1075.23
Machine properties:
Machine name: xxx
Machine processor count: 2
OS version: Windows Vista
OS service pack:
OS language: English (United States)
OS architecture: x64
Process architecture: 32 Bit
Properties provided in package.xml file:
LegalProductName: SQL Server Database Services 2008
Description: SQL Server Database Services 2008
Details: Install for SQL Server Database Services 2008
ProductName: SQL2008
Version: 10
SPLevel: 0
KBArticle: KB876234
KBArticleHyperlink: http://support.microsoft.com/?kbid=876234
Command line arguments provided:
ACTION: Install
INSTANCEIDSUFFIX:
Product features discovered:
Product: SQL2005
Product: SQL2008
Feature status after execution:
Database Engine Services: Passed
Replication: Passed
Client Tools: Passed
Windows Installer logs generated during execution:
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_Snac_Cpu64_1.log
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_Msxml6_Cpu64_1.log
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_Tools_Cpu32_1.log
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_SqlWriter_Cpu64_1.log
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_SqlBrowser_Cpu32_1.log
C:Program Files (x86)Microsoft SQL Server100Setup BootstrapLog20071213_1405T60-l3ac207_20071213_1405_Sql_Cpu32_1.log
What is the issue here?
View 18 Replies
View Related
Jul 10, 2013
What i want to do is count how many times the [Omnipay_Account] column is populated with a number per parentid.
In the [Omnipay_Account] column you can either have a null or a 15 digit number
Idea result layout would be three columns these columns would be
Every row, would need to be grouped via the parentid number
ParentId Omnipay MSIP
My query is
SELECT
[ParentID]
,[Omnipay_Account]
FROM [FDMS].[dbo].[Dim_Outlet]
View 3 Replies
View Related
Sep 14, 2007
I have a table with about 10 million rows, its been logging data incorrectly and I want to start again.
DELETE FROM tblLog
I just get a message about the server timing out, what can I do?
Thanks
View 5 Replies
View Related