I've been handed a SQL Server that is used as an MIS source. There are 4 databases that carry out the task of importing data from various sources, then manipulting that data, and offering the data for reporting purposes.
The vendor has also created several other databases (of which there are also 4), but no-one in my company seems to know the purpose of these dbs.
In the logs, there are approximately 8/9 messages per second - not every second, but numberous seconds per minute - stating....
Starting up database 'db_name'.
... each time, all 4 of the mysterious dbs appear.
I've checked the spid that is running this job this morning, and it seems to be NT AUTHORITYSYSTEM connected to one of the original 4 report databases.
Does this have any affect on the performance of the server, or the specific db attached to the user?
About a month ago, a couple of our databases started up in read-only mode for some reason. I am the new DBA on the job, and the error logs from a month ago are not present.
I was wondering if anyone has had a problem where a SQLServer 7.0 database did this to them? We restart our DBs each day using scripts, so it is odd that this happens only intermittently (no one has seen a pattern at this point).
Hi.A question I have is with regard to the use of views with SQL2000. IfI have a view called "A_view" and used in the following manner;----------------SELECT ...FROM A_ViewWHERE ....UNIONSELECT ....FROM A_ViewWHERE .....-----------------is the view computed twice? Ideally if the view is computationallyexpensive I would rather it was only computed once.Also this would be preferred for data consistency.Is there a way to ensure the view is only computes once?Regards JC.......
Hey all. right now I've been spinning my wheels for almost 2 days on a problem with c# 1.1/sqlserv 2005...
I have a dataset that's filled with data that I'm trying to write to a database, I've ensured that the dataset is fine.
I do a transaction to write the code to the table, an insert command, and an update command.
then commit the transaction
Everything seems to work fine, but when I go look at the table, it doesn't actually write any rows!
The weird thing is deletion of the rows works fine on the same table.
I look at the sqlserver tracer and watch it do the deletion on the table, skip right over the insert statements (ie: no insert statements show up whatsoever in the tracer) then commit the transaction.
If anyone has ever heard of something like this happening i would really appreciate some advice. I'm trying to be as specific as I can about the problem, and I've been spinning my wheels for almost 2 days without avail.
I've tried making other tables and writing to them, getting the same results. I think it's somehow not referencing everything correctly but again, everything seems like it's fine.
When our rep distribution services time-out (several times a day) some dba's just restart the service while others restart the rep job which starts the service. Are there any differences between these two methods? Does restarting the service inherit any changes made to the job's attributes?
I have a table with 3 columns , let say (PatientID int, AppointmentDate date, PatientName varchar(30))
My source data looks in below way..
PatientID AppointmentDate PatientName 1 01/01/2012 Tom 2 01/10/2012 Sam 3 02/15/2012 John
I need output in below way..
PatientID AppointmentDate PatientName 1 01/01/2012 Tom (actual patient record) null 01/10/2012 Tom null 02/15/2012 Tom null 01/01/2012 Sam 2 01/10/2012 Sam (actual patient record) null 02/15/2012 Sam null 01/01/2012 John null 01/10/2012 John 3 02/15/2012 John (actual patient record)
I need t-sql to get above output. Basically the appointment dates are repeatedly assigned to each patient but only difference is patientid will be not null for actual patient record.
Create table sample (PatientID int null, AppointmentDate date null, PatientName varchar(30) null)
Here is my query which lists all orders for products supplied by Supplier-3. A typical Query on the Northwind database i wrote is like this..
Select * FROM [Order Details] WHERE ProductID in (Select ProductID From Products where SupplierID = 3)
The subquery in Red was used in multiple places in one of my Stored Procedures..
So what i thought was - use a temp table to store the resultset from this subquery, and then use the temp table instead of querying the Products table everywhere..
My Query looked something like this..
Declare @ProductIDs TABLE (ProductID int)
INSERT INTO @ProductIDs Select ProductID From Products where SupplierID = 3
Select * FROM [Order Details] WHERE ProductID in (Select ProductID FROM @ProductIDs)
Well, I expected an increase in performance with the latter approach, but seems my Stored Procedure is taking more time with the second solution..
Would be glad to see ne explanation on this behavior..
I am using the SqlDependency to notify me of data changes in a table. However, as soon as I start it, the OnChange event fires over and over even though no data has changed.
Essentially All I want to do is be notified when records are inserted into a table. I am able to get another example to work using a Service Broker Queue and a sql query of WAITFOR ( RECEIVE CONVERT(int, message_body) AS msg FROM QueueMailReceiveQueue ) However I would prefer not to use a queue for once my messages have been read they are taken off the queue and I would rather control that manually.
Any help with getting SqlDependency to notify my app when records are added and not over and over when the data has changed would be great.
Failed install on several Win 2003 Ent Ed., 32bit servers both named and default instances, both upgrades and direct installed versions. Why would MS put out such a riddle?
Error Message is " A recently applied update, KB921892, failed to install.
Also, confoundingly, the error log for the hotfix indicates ""9.00.3042.00 while the update version is: 9.00.2047.00."
But the version display on the properties of one of the servers is: "Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) "
Any help or comments are deeply appreciated, as the seems to be impacting DB Maintenance Plans, etc...
I have implemented an SSAS stored procedure for dynamic security and I call this stored procedure to obtain the allowed set filter. To my supprise, the stored procedure is being called repeatedly many times (more than 10) upon establishing the user session. Why is this happening?
We have SQL 2000 (SP2) , Our SQL server agent showing green light as started from EM , It is succussfully restarting from NT Services too . But When I open the properties of the jobs from EM its gives error message SQL DMO error " SQl Agent is starting , try later " . And in EM Next run Date & Time not available .
MDDB database is accessable & in Log file its recovered fully
I'm having many many issues installing sql server management tools. i had visual studio 2005 installed first, but uninstalled and sql related things before trying to install sql server management tools again - i also deleted the program files/microsoft sql server/ folder so there are no references.
Firstly the system configuration check gives me a warning that the system doesn't meet the recommended hardware requirements - this is wrong... i've got 2.33Ghz dual core + 1gb of ram...
I select just management tools + client connectivity to install and click next -> the setup support files/native client/owc11 etc all install fine but workstation components etc fail and the setup log appears to either be empty and not available and MSXML6 fails... after clicking finish the installer appears to crash - : "Microsoft SQL Server 2005 Setup has encountered a problem and needs to close. We are sorry for the inconvenience"... I have tried all sorts of variations on this install and have had no problems in the past - please help!
The setup log from the MSXML6 failure - === Verbose logging started: 18/03/2008 12:34:09 Build type: SHIP UNICODE 3.01.4000.4039 Calling process: C:Program FilesMicrosoft SQL Server90Setup Bootstrapsetup.exe === MSI (c) (5C:78) [12:34:09:067]: Resetting cached policy values MSI (c) (5C:78) [12:34:09:067]: Machine policy value 'Debug' is 0 MSI (c) (5C:78) [12:34:09:067]: ******* RunEngine: ******* Product: {AEB9948B-4FF2-47C9-990E-47014492A0FE} ******* Action: ******* CommandLine: ********** MSI (c) (5C:78) [12:34:09:067]: Client-side and UI is none or basic: Running entire install on the server. MSI (c) (5C:78) [12:34:09:067]: Grabbed execution mutex. MSI (c) (5C:78) [12:34:09:067]: Cloaking enabled. MSI (c) (5C:78) [12:34:09:067]: Attempting to enable all disabled priveleges before calling Install on Server MSI (c) (5C:78) [12:34:09:067]: Incrementing counter to disable shutdown. Counter after increment: 0 MSI (s) (28:E4) [12:34:09:113]: Grabbed execution mutex. MSI (s) (28:74) [12:34:09:113]: Resetting cached policy values MSI (s) (28:74) [12:34:09:113]: Machine policy value 'Debug' is 0 MSI (s) (28:74) [12:34:09:113]: ******* RunEngine: ******* Product: {AEB9948B-4FF2-47C9-990E-47014492A0FE} ******* Action: ******* CommandLine: ********** MSI (s) (28:74) [12:34:09:113]: Machine policy value 'DisableUserInstalls' is 0 MSI (s) (28:74) [12:34:09:113]: MainEngineThread is returning 1605 MSI (c) (5C:78) [12:34:09:113]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1 MSI (c) (5C:78) [12:34:09:113]: MainEngineThread is returning 1605 === Verbose logging stopped: 18/03/2008 12:34:09 ===
The log summary:
Microsoft SQL Server 2005 9.00.1399.06 ============================== OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600) Time : Tue Mar 18 12:05:06 2008
EOC429 : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online. Machine : EOC429 Product : Microsoft SQL Server Setup Support Files (English) Product Version : 9.00.1399.06 Install : Successful Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0001_EOC429_SQLSupport_1.log -------------------------------------------------------------------------------- Machine : EOC429 Product : Microsoft SQL Server Native Client Product Version : 9.00.1399.06 Install : Successful Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0001_EOC429_SQLNCLI_1.log -------------------------------------------------------------------------------- Machine : EOC429 Product : Microsoft Office 2003 Web Components Product Version : 11.0.6558.0 Install : Successful Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0001_EOC429_OWC11_1.log -------------------------------------------------------------------------------- Machine : EOC429 Product : Microsoft SQL Server 2005 Backward compatibility Product Version : 8.05.1054 Install : Successful Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0001_EOC429_BackwardsCompat_1.log --------------------------------------------------------------------------------
SQL Server Setup failed. For more information, review the Setup log file in %ProgramFiles%Microsoft SQL Server90Setup BootstrapLOGSummary.txt.
Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query.
I've read frequently how stored procedures we create shouldn't be named withsp_ since SQL Server will first check the master db before the current dbwhen trying to find the sp to execute. I always nodded and thought how Iwas glad I hadn't done that. For some reason it never clicked that UDFbehavior could be the same.I have several UDFs that start fn_... When I reference a UDF as dbo.fn_...does SQL Server check the master db for these and only upon not finding themcheck the current db? If so, is there a performance hit for this?TIA,John
I'm quite new to this forum. I've a fair experience in Databases and Programming. Now that I want to take a stride into Data Mining and Warehousing. Experts please suggest me where I can start from and any learning path ?
I am just starting out on SSIS, and have the following business challenge that I would like to solve utilizing SSIS. There are two SQL Server data stores, one would be the source, and other would be the destination. I need to grab some data from store 1, and insert that data into store 2. Here are my questions:
1) Before i move the data to store 2, i have to check some criterias by callin some sps, and then the end result would need to be inserted into the destination database. Can anyone tell me how would i setup the control flow, to accomodate that in SSIS?
2) Can someone email me a sample package that does something similar?
I just need a starting point so i can build the design of my package. Basically i need to call three sps during the process to move data. First one will compile a list of all the records to process. Second one, will pick those up, make some calls to set some other parameters, and then finally insert it into some staging tables. Third one should simply pick up the data from staging tables, to a replica of those tables in the actual destination db. I would really appreciate if I can get some response to this post soon. Also, I would appreciate if you can point me in the right direction in terms of how to design this using SSIS. Basically i need a starting point control flow design(rough) to understand what control flow items would be used in this case. Thanks.
The SQLAgent service was modified to login as a domain account. SQLAgent would not start. I made sure that the account was in the Admin group on the server, I setup the account as a System Administrator in SQL. I made sure that the network protocols in Client Network Utiliity and Server Network Utility where the same as other servers using the domain account. The message I'm getting is...
SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start).
I modified the properties for SQLAgent back to login as local account and I still get the same problem.
When my system re-boots SQLServerAgent will no longer start. The following message is sent to the NT Event Log:
(Event ID 103) "SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start)."
Following this message are two messages from MSSQLServer that read:
(Event ID 19020) "RPC Net-Library listening on: ncalrpc:USBGRSYSTST1[WMSG0000009A.00000001]."
So is this a timing issues? Is MSSQLServer taking too long to completely start before SQLServerAgent is started? If so, is there a way (without hacking through the registry) to make the SQLServerAgent service dependant on the MSSQLServer service?
This startup issue did not exist until an application was installed on the machine that also has several services that auto-start. I noticed that many of these new services are starting at the same time the MSSQLServer service is starting.
For three months I have be starting the SQL Agent using the following bat file
EXEC XP_CMDSHELL 'NET START SQLSERVERAGENT'.
Starting this week the agent is not starting. This is the error message
10/26/00 6:25:36 PM - ! [000] Password verification of the 'SQLAgentCmdExec' proxy account failed (reason: A required privilege is not held by the client)
I've installed sql server 7.0 on winnt. Later i've changed my system name. Due to this SQL SERVER is not running and i'm getting the following error. "Your SQL Server installation is either corrupt or has been tampered with (unkown package id). Please rerun setup.". I've changed my system name back to the original one and sql server is running again.
Is there any way to change my system name and sql server running??
I am using MS SQL 6.5 SP5, NT4.0. running Tivoli Service Desk. Two of the four agents on the Applications server were not running so I recycled the server and now NONE of the agents are coming up. Generally the agents show up on the application server control panel but they have not started. The status of the server is 'initializing' and the Watchdog has started but only the 'dispatcher'started. I have hard booted the aps server and recycled the aps and db servers both. I know that there is a way to suspend the agents but that has not been done and the 'resume' button is not available to use. I tried restarting the dispatcher but it didn't do anything. I have also gone into 'config' on the control panel and it shows that '4' agents are set to start up.
We run a Web version also so I have my help desk analysts using it but they cannot refer back to tickets that they have just opened, etc.
ANY SUGGESTIONS - I have been waiting on Tivoli to call me back for almost an hour and a half.
My SQL server is not sarting, Its giving me an error 2140 - An internal Windows NT error occured. I checked the Microsoft site found an article ran all the options to check if it works but invain.
I am stuck, its a production DB i have to get it up and running in the next hour
SQL 2000 was run in Windows NT4 under non-system account. If this account belongs Administrator's group then SQL Server starts successfully otherwise the error message "NETLIB SuperSocket info: Failed to get Exclusive port use(MSAFD Tcpip [TCP/IP]) : Error 10013. " is displayed. Could you please help me to solve the problem.
The SQLAgent service was modified to login as a domain account. SQLAgent would not start. I made sure that the account was in the Admin group on the server, I setup the account as a System Administrator in SQL. I made sure that the network protocols in Client Network Utiliity and Server Network Utility where the same as other servers using the domain account. The message I'm getting is...
SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start).
I modified the properties for SQLAgent back to login as local account and I still get the same problem.
wanted to start the sql server agent and i got this error : An Error 1069 - (The service did not start due to logon faliure ) occured wile performing this service operation on SQLServerAgent servcice.
I feel extremly happy today and let me share with this wonderful forum why.
SQL is awesome and I'm really learning that theres alot of resources out there and coding is not that hard once you understand what your doing. Just took awhile for things to sink in. I still have a long ways to go but I'm really enjoying using sql. I practically live in our SQL Server 2000 at work and I'm learning more and more about it everyday.
Thank YOu so much guys I really appreciate all the help you've given me Now I'm gonna study for the sql cert
hello - i have this problem: i am able to use bulk insert script like "bulk insert demodb..table1 from 'c:filename.ext' with (formatfile = 'c:cp.fmt')" to import a binary file into sql server. table1 has 4 columns, noted column is number 2, type image, here's my format file: 8.0 1 1 SQLIMAGE 0 100184 "" 2 logo "" i import only the binary file. however when trying to do the same using bcp with the same format file, it just says "starting copy..." and goes to sleep ! any idea what i should do? i created a temp table with just an IMAGE column and then the bcp method works, but i rather need it with my current setup - table with 4 columns
I am unable to get SQL Agent service to run under the same domain name that my SQL Server service is running under. It will start and continue to run when Server and Agent are both ran under the Local Account. But once the services are switched over to the domain account, the Server starts, but the Agent fails. The domain user has administrative rights on the server, along with admin rights to the SQL instance.
Here is the event log.
Event Type: Error Event Source: SQLSERVERAGENT Event Category: Service Control Event ID: 103 Date: 3/28/2007 User: N/A Computer: SQL2 Description: SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to the SQL Server as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).
Any help would be greatly appreciated or links to threads with answers.
I can't get a script to run that's supposed to generate a QueryParameters dialogue to take inputs and then run the query - forexample, the following.. . .and fl.flow_name = [[TRUE][FLOW NAME][@?]].. . .generates SQL Query Analyzer exceptions about "Incorrect syntax near'FLOW NAME'.Suggestions?