I am trying to perform a performance audit on a SQL Server where I am positive my most likely bottle neck is the disks. I assume the primary metrics I should be interested in are %Disk Activity and Disk Queue Length, right?
What are the actually guidelines for these metrics? Also, Are there other perf mons I should be running against the disks?
I'm an Oracle DBA that has inherited some SQL Server 2000 databases. Can you audit a particular user in Sql Server 2000. We need to know exactly what a particular user is doing, (i.e. creating/dropping objects, and what data he is accessing)
writing a T_SQL query for the following scenario..I have a SQL DB Audit file that gets populated with data as the activity on DB goes on.I have multiple monthly tables setup that the import should go into these monthly tables based on the event_time value in the SQL DB Audit file.all the data Like event_time '2015-08-25 15:59:39.033' should go to SQL table Audit_tbl_Aug2015 Query for reading SQLDB Audit file
SELECT * FROM sys.fn_get_audit_file ('C:ackupAudit*',default,default) order by event_time desc GO --DML for Audit table CREATE TABLE [dbo].[Audit_tbl_Aug2015]( [id] [bigint] IDENTITY(1,1) NOT NULL, [event_time] [datetime2](7) NOT NULL, [sequence_number] [int] NULL, [action_id] [varchar](4) NULL, [succeeded] [bit] NOT NULL, [permission_bitmask] [bigint] NOT NULL, [is_column_permission] [bit] NOT NULL, [session_id] [smallint] NOT NULL, [server_principal_id] [int] NULL, [database_principal_id] [int]
Fellas!!This is a very complicated one and it took me a few days to figure outexactly what's going on, but here's the final story:I have a production environment running on .NET with a SQL Server(2000, SP3). The SQL Server is on a dedicated Proliant computer with2GB RAM (the actual SQLServer.exe process has dynamic memoryassignment and can reach up to 1.6GB RAM). Nothing else is running onthat specific computer.Once the SQLServer is started, it hits 300MB RAM (the minimum that wasset in the configuration of the server - remember, it is dynamicallyaquired).Then there is a .NET program that requests just about all the data theSQL Server contains (apart from a single table that contains roughly1.6 million rows and another table that contains about 10000 rowswhich are all of type IMAGE).Once all the data is retrieved, the RAM is at about 400MB. From thereon, every update I make to the data on the server causes the RAM to goup by a bit (that updates are done in a Transaction which of course iscommitted at the end). It seems that BLOB updates are the majorproblem in all of this. For some reason, uploading a blob of size 9MBcauses the RAM to go up by roughly 20MB and after commit it gose down10MB (total gain of roughly 10MB RAM). Eventually the SQLServerprocess hits its upper limit (1.6GB) and at this point it startsslowing down.Some performance checks showed me the SQLServer has a lot of diskactivity, it seems it is reading and writing pages of data from/to theHD all the time (which causes the queries to be much much muchslower).We have a development environment running the exact same code (it isthe exact same in everything, except for the amount of data stored inthe DB). This does not happen there at all.I have a few questions:1. Why is the RAM going up after BLOB updates?2. Why is the RAM going up at all?3. How can I tell the DB which tables should remain in the RAM at alltime (never swapped back to the HD?) - DBCC PINTABLE does not seem todo the job.It does not seem to have anything to do with the .NET code.Thank you very much,M Yamo.
hello,all I am new to Sql 2000,I installed sql 2000 database in C disk,but Now I found my C disk space is smaller than before,So I want to move my databse(include data and structure) from C Disk to D Disk(its space is very large) . is it possible to do it ? if its can be done ,do I need to change my asp.net program source code (exp: chaneg my crystal report connectstring ) ? thanks in advanced!
Hello. I have a little issue of trying to find the most efficient way do doing something. Consider a table mat age qty aaa 5 100 aaa 7 300 aaa 12 400 aaa 3 700
What I want to get out is Mat 0-4 5-9 10-14 15-19 aaa 700 400 400 0
I know I could do it with 4 views all joined but I hope I can use a CASE somehow ?
Can any one point out a whitepaper/article or something which describes in detail the metrics in SSIS related to CPU usuage, Memory usage, page faults etc depending on the volume of load. We are planning to use SSIS for ETL purposes and DB size is around 3 TB. Plan is to have ssis packages continously run E-T-L...so wanted to understand how SSIS would behave.
I have made a server security audit and specify from database audit specification to audit "select" on a certain user and on a certain table. I logged in by this user and made the select statement..when i run this query
"select * from sys.fn_get_audit_file('d:Auditaudit1*',null,null)"
It return a value at which time the query has done
after 15 minutes i repeated the same action, i run the audit query and the same result is showed off on the panel.is it suppose to return a list of values by how many times this user has made the select statement on that table ? for example at 5:00 pm then 6:00 pm and so on
I've got an order generation query that will _sometimes_ run long. By that I mean every few days a query used to estimate the required stock quantities for an order will time-out because it has taken an extended time to run. This only occurs at one particular site. This site shares a common schema with others who do not experience this issue, although site is a particularly busy one.
This query (a stored proc call) needs to aggregate sales data from ~200k rows and usually takes 10-15 seconds. On the days when it 'runs long' it will hit the 5 minute time-out period and be failed by the application.
The problem I have with this process is that if I have the application dump out the query it's using to generate the order (this query will vary as the stored proc is passed the name of a temp table to use for this order) so I can run it in Query Analyzer to get an execution plan and maybe some clue as to why it takes so long; the issue will vanish. After I've tried to investigate in this way an order generated from either Query Analyzer or the application will work in the normal time. When the query is running long any processes which attempts to write to the sales data tables will get blocked until the order generation has finished.
The application is accessing the database via ADO 2.6. The database itself is running on SQL Server 2000 sp3 under Win2k.
I believe that the SQL Profiler is the tool best suited to investigate this but I'm hoping for some advice on which of the myriad of watchable metrics I should be checking here.
Any profiler advice or estimates as to what the issue may be here would be great!
I need help...here is the problem.Last weekend, the servers in our datacenter where moved around. After thismove, and maybe coincidental, 1 server is performing very poor. Afterrunning a trace with SQL Profiler, I saw the problem which was laterconfirmed with another tool for SQL server performance monitoring. It seemsthat all connections to the SQL server (between 200 - 400) are doing a login/ logout for each command that they process. For example, the user'sconnection will login, perform a SELECT, and then logout. This is not a..NET application. The client software was not changed, it is still thesame. The vendor has said that it is not supposed to do that, it issupposed to use 1 connection that log's on in the morning and logs off atthe end of the day or whenever the user exits. 1 user may have severalconnections to the database.At times, the server is processing over 250 login / logouts (avgeraged for30 second period). Has anyone seen this problem? I have the server inAUDIT FAILUREs only. The server has become very unresponsive, things thattook 3 seconds now take over 15 seconds.Any ideas???
What i want to do is .. to find the best way to insert the high speed data( that comes at every 10 ms) to the sql server express database table .
I have two options to store the data in the table . One is to insert all the data in one row , the other is to divide it into many rows in the same table . In approach A i will get like 10 records per second and in approach B i may get i may get 30 - 50 records per second based on the amount of data that is comming . i.e i am creating a new row in the table for every extra column added in Approach A and duplication the other columns.
I wanted to find the better way to insert the data based on the performace metrics like CPU usage and memory usage.
If I return the Average, Minimum, and Maximum values for the counter Physical Disk: Avg. Disk Queue Length, and those values are 10, 0, 87 respectively, which value do I use to compute the Avg. Disk Queue Length for a 4 disk array(RAID 10): Average, Minimum, or Maximum? The disk(lun) is on a SAN.
-- Initialize Control Mechanism DECLARE@Drive TINYINT, @SQL VARCHAR(100)
SET@Drive = 97
-- Setup Staging Area DECLARE@Drives TABLE ( Drive CHAR(1), Info VARCHAR(80) )
WHILE @Drive <= 122 BEGIN SET@SQL = 'EXEC XP_CMDSHELL ''fsutil volume diskfree ' + CHAR(@Drive) + ':'''
INSERT@Drives ( Info ) EXEC(@SQL)
UPDATE@Drives SETDrive = CHAR(@Drive) WHEREDrive IS NULL
SET@Drive = @Drive + 1 END
-- Show the expected output SELECTDrive, SUM(CASE WHEN Info LIKE 'Total # of bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS TotalBytes, SUM(CASE WHEN Info LIKE 'Total # of free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS FreeBytes, SUM(CASE WHEN Info LIKE 'Total # of avail free bytes : %' THEN CAST(REPLACE(SUBSTRING(Info, 32, 48), CHAR(13), '') AS BIGINT) ELSE CAST(0 AS BIGINT) END) AS AvailFreeBytes FROM( SELECTDrive, Info FROM@Drives WHEREInfo LIKE 'Total # of %' ) AS d GROUP BYDrive ORDER BYDrive
I am trying to setup a test cluster and am having an issue. When I try to create the resource of a physical disk it takes both the drive e: and drive q: and doesn't seperate them into two physical disks as resources. This means when I try to associate the quorum disk it links the to physcial disk resource of drive e and q. Then when I try to install SQL2k5 I get the warning about installing SQL on the quorum disk. Am I missing something? Is there a way to seperate e and q onto two physical disk resources so I can specifically associate the quorum to q and the sql to e or should I be setting the quorum disk to a majority node set? Thanks in advance.
I have a three tier system using SQL server 2000, we are currently experiencing IO bottle necks on our SCSI Raid 10 array, which holds the Data and the logs in separate partitions.
So my options as I understand it are:
Get Enterprise edition
or
Get another physical raid 10 array and separate the logs and data i.e. data on one array and logs on the other array.
I would like to try the latter but I am totally unsure how much difference this will make or whether it will make any difference at all.
Does anyone know how much performance increase I will get from using two arrays as opposed to one?
Any other advice on this scenario would be greatly appreciated.
The programmers encountered a problem as following:
Different programmers use the same account(Admin) to login to the same database to create table from different workstation. The tables were created through the same steps which is highlighted the Table folder -->New table then go through the wizard. The table were created successfully but the ownership were different. One with Admin as owner, the other has dbo as owner. Even Admin is the owner of the database but this created a problem for them that they need to specify differently for the tables depend on who created them.
what is the cause of this, sevice pack 3 is installed on the machine.
hi, i have got 10 dts packages i want to create a job and put them all into that job. I could not execute the dts create in tsql. Can any one say as how to execute that in the job.
Babu.G here, Working as MS-SQL DBA IN MNC..I HAVE A DOUBT SO PLEASE CLARIFY THAT..WHERE SHOULD I DECLARE GLOBAL VARIABLES..FOR EXAMPLE @@ROWCOUNT AND MANY.. LIKE THAT I NEED TO DO..
IN CASE IF I AM DECLARING ONE @@GLOBAL VARIABLE IN PROC AND STORING SOME VALUES IN THAT IF CALLED THAT VARIABLE INTO SOMEOTHER PROC ..IT IS GIVING ERROR..
im currently using sql server 2000... is there a datatype or a way so that you dont have to limit the length that a user can enter into a textbox (for example) that will be saved in a column in a table in sql server?
There was someone who got into the system and modified the database properties to DBO use only..what we want to do is to track such changes with when they did.
As like what happened earlier..some told me about turning the audit level to all will help but it does not give the information about who has did and what did they do...
Is there a way in which we can find out what happened and who did this what command they have executed...
Hello I have the following query set up and I am getting the errors of: Any help on this would be appreciated.
Thanks Stuck !
Server: Msg 107, Level 16, State 3, Line 2 The column prefix 'TEAM3B_PULL_TOTAL_TST' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 2 The column prefix 'BUS_REQ_DESCRIPTION_TST' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 10 The column prefix 'TEAM3B_PULL_TOTAL_TST' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 10 The column prefix 'BUS_REQ_DESCRIPTION_TST' does not match with a table name or alias name used in the query.
Select REQUEST,BUSINESS_REQ_ID,TEST_CASE_SOURCE as SOURCE from TEAM3B_PULL_TOTAL_TST if TEAM3B_PULL_TOTAL_TST.REQUEST<>BUS_REQ_DESCRIPTION_TST.REQUEST begin Insert into TEST_REPORT.dbo.BUS_REQ_DESCRIPTION_TST(request,bu siness_req_id,source) select request,business_req_id,test_case_source as source from TEAM3B_PULL_TOTAL_TST end Else begin if TEAM3B_PULL_TOTAL_TST.REQUEST=BUS_REQ_DESCRIPTION_ TST.REQUEST begin Insert into TEST_REPORT.dbo.RDD_UPDATE_TST(request,business_re q_id,test_case_id,test_case_descr) select request,business_req_id,test_case_id,test_case_des cr from TEST_REPORT.dbo.TEAM3B_PULL_TOTAL_TST order by TEAM3B_PULL_TOTAL_TST.REQUEST,TEAM3B_PULL_TOTAL_TS T.BUSINESS_REQ_ID,TEAM3B_PULL_TOTAL_TST.TEST_CASE_ ID end end
if (select REQUEST from TEST_REPORT.dbo.TEAM3B_PULL_TOTAL_TST) Not In(select REQUEST from TEST_REPORT.dbo.REQUEST_BUS_REQ_TST) begin Insert into TEST_REPORT.dbo.REQUEST_BUS_REQ_TST (b.request,b.business_req_id,b.bus_test,b.test_cas e_id,b.test_case_source,b.test_case_descr) select a.request,a.business_req_id,a.bus_test,a.test_case _id,a.test_case_source,a.test_case as test_case_description from TEST_REPORT.dbo.TEAM3B_PULL_TOTAL_TST AS A INNER JOIN TEST_REPORT.dbo.REQUEST_BUS_REQ_TST AS B ON A.REQUEST = B.REQUEST Order by REQUEST,BUSINESS_REQ_ID,TEST_CASE_ID end
I am getting the error messages of:
Ambiguous column name 'REQUEST'. Ambiguous column name 'BUSINESS_REQ_ID'. Ambiguous column name 'TEST_CASE_ID'.
I am given to install ODBC drivers in two servers and main thing is they are clustered . SO do i have to install in both servers or CLuster will configure that. Urgent help please . Thanks
hi, I am recently upgraded to sql 7.0, my clients are having 6.5 and 7.0 versions means we are still having some 65 servers. When they try to connect to new 70 server it is saying ''login failed''. I think it is trying to connect to old sql 65 version, what i have to do to connect to sql70 for clients.. They are having both 7.0 and 6.5 servers. Can anyone pls assist me regarding this.
Dear friends, After installing visual interdev, on a webserver (nt4.0 ent server), whenever I was trying to configure the DSN on the ODBC settings, It gives " The ODBC resource DLL (C:WINNTSYSTEM32odbcint.dll)is a different vaersion than the ODBC setup dll(c:winntsystem32odbccp32.dll) you need to reinstall the ODBC components to ensure proper operation." error msg.
I thought of removing all the ODBC drivers and reinstlling the odbc drivers came with NT SERVER. I don't know how to do it. If anyone knows how to do it, can you please post it. Thanks a lot.
Hi all, I have some problem : I use sql server 2000,I have about 20000 records ! I delete all data unfortunately ! So , i need to restore all . Are there way to do this ? I don't setup automatic backup ! My data is very important !
I tried SQL mirroring in beta 1 , then it was gone, until SP1.
Now I can not setup mirror, it is fine if it is just hard to setup, but it seems it is full of bug! The mirroring has to be stable, since I am trying to mirror product db, what a diaster if something goes wrong.
I am trying two servers, both has 9.0.3042. First I tried to setup on my home machine, I VPN to my network, After I config security, I see two connection strings:
and it doesn't show that error anymore, I am not sure why the connection should be like the latter format, but in anyway, how come SMO can not make it right?
then I get another error, SQL server doesn't exist or can not access, I search on the Internet, it seems that error could mean anything, include that the mirror db is not in restore mode.
But I did set the mirror db in restore mode and both sql5 and sql8 are under same domain, pysically close.
Our SSIS package suddenly stopped loading. We have 64 bit server on which we run SSIS packages. We had problem "script task failed to load" so we started to use the 32-bit version of dtexec to run the packages. Package used to run fine.
Today we upgraded our server to Sp1 and 2153 hot fix (x64) and now the package have stopped to load.
we confirmed that the issue is not as inthe KB below: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B918038
We are still using the 32-bit version of DTExec(as in SQLx86). With 64 bit we get the error "script faield to load". we are going to fix the script failed to load error but, we need help to get going right now.
help would be greatly appreciated
Message:- Executed as user: PHX\_IDSS-OPS. ... Package Utility Version 9.00.1399.06 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 1:13:48 AM Error: 2006-07-28 01:14:50.11 Code: 0xC0010018 Source: Description: Error loading value "<DTS:LogProvider xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:Property DTS:Name="ConfigString">AdCenterExtractionLog</DTS:Property><DTS:Property DTS:Name="DelayValidation">0</DTS:Property><DTS:Property DTS:Name="ObjectName">SSIS log provider for Text f" from node "DTS:LogProvider". End Error Could not load package "D:adcenterDWApplicationBINACDWExtraction.dtsx" because of error 0xC0010014. Description: The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. Source: . The step failed.
Dear Friends, I have a IIS 4.0 server ( configured as virtual multi servers), and a sql server containing multiple databases. each virtual server should access a unique database on the sqlserver. How can we configure this setup on both servers? Note:the owner of each multi server (dbo)will own a unique database. they are bound to only with theirs database only. Please help me on this issue? Thank you all and Happy holidays!!!!!
Dear Friends, I have a IIS 4.0 server ( configured as virtual multi servers), and a sql server containing multiple databases. each virtual server should access a unique database on the sqlserver. How can we configure this setup on both servers? Note:the owner of each multi server (dbo)will own a unique database. they are bound to only with theirs database only. Please help me on this issue? Thank you all and Happy holidays!!!!!