Thursday, April 11, 2013

[SQL Server 2008 issues] SQL Server Error Log stops logging activities of the server

[SQL Server 2008 issues] SQL Server Error Log stops logging activities of the server


SQL Server Error Log stops logging activities of the server

Posted: 10 Apr 2013 06:24 PM PDT

Hi Guys.Is it normal that SQL Server Error Log stops logging server activities like backup operations, errors? Though server activities are functioning well like scheduled backups. Is there a way to find out what might cause this to stop logging? We have a monitoring tool that's basically getting most of its data in the error log.Thank you.

How to Put results of FISQL in file

Posted: 10 Apr 2013 04:31 PM PDT

Hi ,I need help :I have two machines: one with my sql server and the other with a CENTOS.In CentOS I installed fisql.I would like to know how to put the result of several request to a file?With the -o option of fisql, I have two problems:1) I can only record the results of a query in a file2) I have prompts that appears (1 >> 2 >> ...)Someone know a solution ?

SSRS Paramaters

Posted: 10 Apr 2013 06:57 AM PDT

Hi everyone I have a report in SSRS which contains the paramater @Region. The paramater allows for multiple selections and is set automatically to show all of the regions. Within one of the text boxes within the report I have the following expression: ="Report showing sales at: " & Fields!Region.Value My problem is that there are too many regions so too much text in the text box of thr report when it initially renders. I'd like the expression to say "Sales for all Regions" when the report is initially rendered but the actual specific regions if and when they have been selected. Thanks in advance. BO

Multiple tables in a Report

Posted: 10 Apr 2013 11:40 AM PDT

Hey guys,I have a challenge in displaying the database server health statistics with a minimum refresh rate (about 5-30 seconds). There are about 6 datasets for which I will be using 6 different tables(which have linear gauges) for dispaly. 4 of these 6 datasets take quite a bit of time to query(about 2mins). Is there another efficient way of doing this as the report is becoming slower and slower as I keep adding more tables into it.Would dashboarding be faster? I have never done dashboarding before and I am just assuming that a dashboard drives the datasets as different reports hence faster rendering time.I would appreciate you guys taking time to answer my questions.Thank you.

SQL Server and RAM utilisation

Posted: 10 Apr 2013 11:12 AM PDT

Hi All, I am loading a table of data(1TB) from one server to other, I am loading it through SSIS using execution utility. Initially when i started the process i noticed that the load take 60 Secs to load 100K records, gradually the time keep on increases to load same 100K records. Now it is taking 560 Secs(and still increasing....) to load 100K records. Can you Please let me know how can i make it to run fast. without stop and start the process or restart the windows server. Can i run DBCC DROPCLEANBUFFERS command is it is advisable ? Thanks in advance!

Logging on with a DSN using a different schema.

Posted: 10 Apr 2013 11:28 AM PDT

Here are the facts.Tools:MS SQL 2012 Express MS SQL 2005 Native Driver (because not all of our computers are up to date obviously)MS Access 2010.This is an Access db with a default form that calls an ODBC recordsource.My [u]File[/u] DSN works OK when I connect to tables using the default dbo schema. It bring the MS SQL Server dialog box.If I try to connect to tables in a different schema (with all public privileges denied), it will raise an error message but my problem is that it will NOT prompt the normal log in dialog box. After the error message, there is nothing.If I use my Windows profile as identification with sa privilege, again it will just go through (no error) but no log in dialog box whatsoever.How do make sure that the dialog box is always present?

Convert IP address to Binary (32)

Posted: 10 Apr 2013 03:56 AM PDT

Hello,I am trying to convert an IP address from regular format (24.55.187.203) to binary 32-bit format (00011000001101111011101111001011).Can someone please help me with SQL script? I have over 35 million ip addresses that I need to convert?Thanks

SQL 2008 - Resource Governor - CLBackup.exe

Posted: 10 Apr 2013 06:54 AM PDT

Hello,We are having issues with a backup system (CLBackup.exe) taking too much CPU when it does a disk backup. It is being used by our hosting company to perform a daily backup of specified files and directories. The time of the backup run and the amount of files backed up have all been modified but still seeing too much CPU pressue when it runs.It averages about 35% CPU but can take as much as +50% CPU which is putting too much pressue on the Database server.Can the Resource Governor be used to throttle the CPU usage of this exe? Thanks,Daniel

Sql Jobs steps

Posted: 10 Apr 2013 08:50 AM PDT

Hello I have a several SQL JObs I need to run in sequence. For some reason when I run a job which I already setup with all jobs I need is not running correctly.And SQL Server is not waiting for the job to be completed before continuing to the next job.How can I accomplish this?Any help is appreciated!! thanks

Problems with file permissions

Posted: 10 Apr 2013 08:55 AM PDT

This is for sql server express 2008 r2. I am installing an .mdf file on users machines using a simple .msi installer created in vs2010.I really need an overall philosophy check on where to install .mdf files. My shrink-wrap end user app that uses this database will attach the database file, or connect to it as needed - this is not the problem.I chose to install the .mdf file in the folder users\public\documents\somecompany\database, thinking that this is the safest and most permissive location on everyone's machine. Security is not a big issue, I just want the database to work correctly every time. The end users have no technical ability to fix anything whatsoever.I am finding that on some installs, that sql server is throwing the error 5 permission denied when trying to mount the database. Using windows explorer, I see that the troubled system has a completely different set of ACL permissions on the .mdf file from mine. Their system is vista-32bit, and my test setup is a vanilla standard vista-32bit in a virtual machine. I have no idea how their public documents permissions got this way.My first idea for a fix, is to change the file permissions during the msi install to allow "Everyone" full permission on the .mdf file - I know how to do this. I know this would work, but it smells funny. In explorer, I tried setting the permission for the SQLServerMSSQLUser..., but that alone didn't work for some reason. I need to know the exact permission for sql server 2008 that will work every time. Or better than that, need guidelines for foolproof installs of .mdf files.

DBCC on a detached MDF file

Posted: 10 Apr 2013 07:05 AM PDT

Hello,I am by no means above a SQL novice, but I am trying to figure out if there is a way to run DBCC commands (DBCC fileheader in particular) on an offline/detached MDF? Is this possible? If so, any help pointing me in the right direction? Thank you!

Extract from xml stored as a varchar in a database

Posted: 10 Apr 2013 07:50 AM PDT

Hello everyone, I need to extract information form xml stored in a database and store the extracted information to another database. The xml is stored as varchar. Is there any good way to extract the information from the database ?

simple count in sql?

Posted: 10 Apr 2013 07:01 AM PDT

I have a table structure as follows:guidA, market, isInMarket, guidB (lets just say all of these columns are strings)I would like to get a count grouped by market, where guidA == guidB and isInMarket == 1for example:row 1: 23458-293-392-29182, AR, 1, 23458-293-392-29182 <-- want this to add 1 to countrow 2: 19383-958-958-95832, AR, 1, 39201-394-999-84757 <-- this is not a matchoutput example:Market, MatchCountAR, 467This seems so simple, however, I'm having trouble with it.

Replication - Subscription marked inactive and must be reinitialized

Posted: 10 Apr 2013 02:28 AM PDT

I have transactional PUSH replication and recently got the following error:"The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will need to be dropped and recreated."I manaully ran job "Reinitialize subscriptions having data validation failures", but the problem still persists. When I created this replication, I set it without synchronization from snapshot because the database is rather large, it's about 200 GB. I restored backup and set it with initilization from backup. There were couple of arrors for violation of PK, I cleared them, and now there are no PK violations.Now, what options I have in order to fix above error? My version is: 2008 R2 Enterprice on both servers.Replication: transactional, push.Size of publication database: close to 200 GB.Thanks.

Remote / Local node page looups/sec both zero

Posted: 12 May 2012 09:13 PM PDT

When I try to monitor the sys.dm_os_performance counters "SQLServer:Buffer Node\Local node page lookups/sec" and "SQLServer:Buffer Node\Remote node page lookups/sec" they consistently show up as zero on all our servers. (2008 R2 SP1):object_name counter_name instance_name cntr_value cntr_typeSQLServer:Buffer Node Local node page lookups/sec 3 0 272696576SQLServer:Buffer Node Remote node page lookups/sec 3 0 272696576SQLServer:Buffer Node Local node page lookups/sec 2 0 272696576SQLServer:Buffer Node Remote node page lookups/sec 2 0 272696576SQLServer:Buffer Node Local node page lookups/sec 0 0 272696576SQLServer:Buffer Node Remote node page lookups/sec 0 0 272696576SQLServer:Buffer Node Local node page lookups/sec 1 0 272696576SQLServer:Buffer Node Remote node page lookups/sec 1 0 272696576Now, clearly, they shouldn't BOTH be zero! Is anyone else having the same issue? I can't find any documentation / blogs / cries for help out there from any other sufferers.

How to join these two queries?

Posted: 10 Apr 2013 03:31 AM PDT

Hello Everyone.I have 2 separate queries that I would like to join together, but have been unable to.I would like to run a single query that would return3 columns 'Name0', 'Agenttime' and 'LastBootUpTime0'Does anyone know how I can accomplish this?Thanks!------------------------------------------------------------------select Name0,Agenttimefromv_AgentDiscoveries AGD,dbo.v_GS_COMPUTER_SYSTEM CSWhere CS.ResourceID = AGD.ResourceIDand AGD.AgentName = 'Heartbeat Discovery'order by Name0 -------------------------------------------------------------------- SELECT distinct sys.Name0, os.LastBootUpTime0 FROM v_R_System sys join v_GS_OPERATING_SYSTEM os on sys.ResourceID=os.ResourceID join v_FullCollectionMembership fcm on fcm.ResourceID=os.ResourceID

How to find common tables between two databases?

Posted: 09 Apr 2013 07:13 PM PDT

Hello All,Can someone tell me how can we find common tables between 2 databases? Any scripts or querry plzz.thanks in advance...

access denied message while executing xp_cmdshell

Posted: 09 Apr 2013 11:35 PM PDT

Hi,I am trying to execute below simple copy statement using xp_cmdshellEXECUTE xp_cmdshell 'copy C:\test\*.txt C:\"Program Files\"'it gives an error as 'Access is denied'even I get same error while creating sub directory or creating text files in program files directory.but if same command is run by providing any other directory name like-EXECUTE xp_cmdshell 'copy C:\test\*.txt C:\"New folder\"' it executes.Can any one explain why is it so, and how it can be achieved.

Restoring database

Posted: 09 Apr 2013 11:59 PM PDT

Hello,I am trying to automate my code by restoring once a week database from one server to another, this is my plan:1.Create back up,2.copy back up from one server to another3.restore backup to the server.How can I do it,can any one recomend it any expereince with it?Thank you

In linked server, which server will process data?

Posted: 10 Apr 2013 12:57 AM PDT

In ServerA, I created a linked server to ServerB. In ServerA, there is a query like below. select * from [ServerB].order.dbo.allorder where city='london'Question:Which server will process data? 1) processing in B and then pass the result to A2) pass all data in A from B, process in A

Add user to sql server with the required permission

Posted: 09 Apr 2013 10:24 PM PDT

In my sql server express 2008 r2 i have about 15 login account. Now i want some about 5 users have full permission while some other 5 users with limited access to some database, and other users only read permission. In future i may add other users also. So i was thinking of doing it in simple way than giving permission for every user as it requires giving permission to each database every time a new user is created. So can i create a set of rules or group and then add a new user to that group or rules? (So new user who gets added that group gets the permission automatically from that group). Do i have any kind of facility in sql server which will make this happen?

Developers track changes

Posted: 10 Apr 2013 12:06 AM PDT

Hello,I am trying to find out how can I track changes in my database, how deleted table or updated table etc, how can I track this?Thank you

Error Message SqlDateTime

Posted: 09 Apr 2013 10:25 PM PDT

Please, When I run a Select on my table i receive this message: "Une erreur s'est produite lors de l'exécution du lot. Message d'erreur : Dépassement SqlDateTime. Doit être compris entre 1/1/1753 12:00:00 AM et 31/12/9999 11:59:59 PM." and It's not possible to read data in my table. WHat can i do to fix this problem without loosing data in my table?NB: I am using sql server 2008 and the command is "Select * from mytable"Thanks in advance

Finding DROPPED Trigger

Posted: 09 Apr 2013 10:23 PM PDT

Hi Team,I've 100 of triggers in my database, today i found that some triggers are dropped from my database.How to find the dropped trigger names.Please help me...

TempDB activity after inserts

Posted: 09 Apr 2013 11:12 PM PDT

I am running into issue doing a insert into fact table. Essentially i can see that insert is done and i can query table by using nolock. But job keeps on running (insert done with in 40 min and job ran for 3 hours) and i can see tempdb read and write activities in resource monitor. There is no disk disk activity on datafiles or logfiles of database i am trying to insert. Is sql server trying to process foreign keys to table? since its fact table i have lot of dimension keys but i am not sure. Also there is no other process running on server at that time. Any help is appreciated

No comments:

Post a Comment

Search This Blog