Hello. We have a smaller system on one of our servers where a couple of users where beta-testing. This system used a SQLExpress 2005 database (databaseName_data.mdf).
But yesterday we saw that we couldn't use the system anymore, we got errors about the connection to the database. We open SQL Management Studio and connected to the SQL Server and we saw the name of the database in the list, but it was completly empty. Nothing. Not the "folder" for Tables, Programmability, Security... nothing.
We then browsed to the folder where the MDF file used to be, and there we only found the LDF file. The MDF file was gone.
We "know" that no one here have been shutting down the SQL Service and then deleted the DB, so we are trying to figure out what has happen.
It's not a major issue, because it's just a beta-test, but we don't want this to happen later on again...
Does anyone have a clue of what might be going on?
We are using three instances of SQL Express on this test machine btw... One for the public system (wich used this db), one for development and one for some random tests...
The public server and develop server used databases with the same name, but of course, different files on the hdd (and different instances of SQL Express).
//J
Edit: I might add that we hadn't backed this db up yet... Is there some way to use the LDF-file to restore some of the data?
In my couple of User database dbo user is missing. I am receiving following error when I click sa user in enterprise manager. Error 21776 The name dbo was not found in user collection.
Server: Msg 3132, Level 16, State 1, Line 1 The RAID set for database 'xxxxx' is missing member number 2
This happens when I try to run a restore?? is it because my server is not set up as RAID 5, I had took a dump from one server and try to apply it to another? Suggestion please.
I've discovered a problem with one of our databases where the name 'dbo' has a blank corresponding login name (it should be 'sa' as on all other databases).
I need to reset the owner dbo so that it once more links to sa. Does anyone know how to do this?
I've tried modifying the suid in sysusers for dbo from <null> to 1 (suid of sa), but I'm not able to edit the cell.
I have a serious problem with either SQL Server or SQL Reporting Services. I have 7 tables in a database that are relational. I have created serveral reports against this database. Last week when I pulled one of the reports, I was missing information on one of the cells. The reason why I know this is because my boss has us verify the report against the database. That took about an hour to complete. When we found that the report was not correct I repulled the report and the cell that was empty, was now populated. What gives? This is the same report I have pulled for the last month and had no problems until now. Is there a time issue involved between the last update to the database to the time I pull the report? Or maybe there is something wrong with the query?
SELECT Lease.[Lease #], MineralContacts.[Mineral Owner First Name], MineralContacts.[Mineral Owner Last Name], Tract.County, Tract.[Tract Number], Tract.[Tract Description], Tract.Section, Tract.Block, Tract.Survey, Tract.Abstract, Lease.[Lease Date], Tract.[Title Check Though], Tract.[2ndTitleReview], Tract.[2nd R/S Complete], Tract.[Title Agent], Tract.[Tract Gross Acres], SubTract.[Tract Net Acres], Draft.[Draft Status], Draft.[Draft Due Date], Draft.[Draft Amount], Draft.[Draft #], Draft.[ANB Invoice #], Draft.[Lse File Sent to CP], Draft.[Money Wired from CP to EA], Draft.[STA Approved Draft for pmt], Draft.[STA Recommend to Return Daft], Draft.[KE Advised ANB to Pay Draft], Draft.[KE Advised ANB to Return Draft], Draft.[Paid Draft Recd], SubTract.Comments, SubTract.Hide FROM Tract INNER JOIN SubTract ON Tract.TractID = SubTract.TractID INNER JOIN Mineral ON SubTract.SubTractID = Mineral.SubTractID INNER JOIN Lease ON Mineral.MineralID = Lease.MineralID INNER JOIN Draft ON Lease.LeaseID = Draft.LeaseID INNER JOIN MineralContacts ON Mineral.MineralID = MineralContacts.MineralID WHERE (Draft.[Draft Status] IS NOT NULL) AND (Draft.[Draft Due Date] IS NOT NULL)
I€™ve just installed SQL 2008 Express CTP. Everything seems to be fine except that the folder €śDatabase Diagrams€? is absent in the tree of SQL Server Management Studio. It is the same for newly created databases and databases upgraded from 2005 Express. Any ideas how to get the diagrams back?
I'm trying to create a performant script to copy records from a table in a source database, to an identical table in a destination database.
In SQL 2000, I used to create a little lookup which did a count using certain fields. If the record was missing, I executed an INSERT query, otherwise an UPDATE query. The result was that the table on the destination side was always up to date. Duplicate rows were out of the question.
This was, if I'm not mistaking, a Data Transformation, using a bit of custom VBA code to govern the transfer. For each source row, the custom code was executed. Depending on the result of the custom code, a different query was launched.
Now I'm trying to do the same using SSIS in SQL 2005. Is there a task which does this for me, or do I have to script again? In the latter case, which type of task would I use?
(I thought of the Script Task, but then I would need to set up quite a bit myself.)
I saw a previous request for help, but I did not see a solution (other than deleting and re-initializing the dump.
I'm copying a database from one server to another and I repetedly get this error when I try to restore from the .bak file I create on backup. The host machine for the database is a workstation (no RAID). The Destination does have RAID, but is funtioning properly (according to the SysOps and in testing file copies). I've tried copying the .bak file to several different drives several different times and I get the same error. I also tried to back-up a database on the Destination server and restore the .bak file to a newly created database and I get the same error.
Wierd issue of a missing master database - wierd because I would have thought this was a newbie topic but I've found nothing for it. I googled and had a 'decent' look through this forum and only found a bunch of topics on 'how to restore master database'.
I wouldn't have thought I need to restore the master database because my SSMS works fine and I can query the master database. I can also see it in the drop down list of available databases in the Query Designer toolbar. The problem is just that I can't see it in the list of databases. I can see all the other databases I've created, and I can see the master database in the DATA folder. But not in the SSMS.
I've been running SQL 2005 Enterprise SP1 for some time. After installing SP2, I miss the "Database Mirror Monitor"-Feature. Where is it? Did MS kill the feature?
Been practicing DR strategies with a test SQL instance by following the scenarios listed here: [URL] ....
> Took a backup of the Model database > Stopped SQL Server > Deleted model database data & log file > Started SQL Server and it obviously wouldn't start because TempDB needs a model database present. > Started SQL instance with trace flags 3608 & 3609 > Connected to SQL instance using command prompt. > Issued restore command but was met with this error:
Shared Memory Provider: The pipe has been ended. Communication link failure
And found this in the SQL log..
2015-08-12 16:21:32.83 spid51 Starting up database 'tempdb'. 2015-08-12 16:21:36.88 spid51 Error: 3456, Severity: 21, State: 1. 2015-08-12 16:21:36.88 spid51 Could not redo log record (59:136:21), for transaction ID (0:0), on page (1:20), allocation unit 458752, database 'tempdb' (database ID 2). Page: LSN = (30:165:3), allocation unit = 458752, type = 1.
I installed SQL Server 2005 Developer Edition. When i create a new database (using the "New Database" dialog) i cannot set the new database's compatibility level to "SQL Server 2005(90)" because this option is not in the "dropdown list". the only items shown are: "SQL Server 7.0(70)" and "SQL Server 2000(80)". I set the owner to "sa". How do i get "SQL Server 2005(90)" in my "compatibility level" drop down list? Is this an installation option that i missed? Thanks in advance for any assistance!
missing witness server information and the fail-over is broken suddenly? 4:00am no maintenance job. I have one sql job on 10pm for backup on database transaction log only.
I can see the primary have problem then perform fail-over to mirror database, the auto fail-over was broken.
I re-build the sql mirror is OK , but i want to find the root cause.
Windows application event was full when there have many failed event, i have increase log size for application event. Â
Hi all, I had to uninstall SQL2005 Service, client-tools & BI studio applications on my laptop running XP SP-2. Now, I'm trying a fresh install, a simple install of >>just<< the 2005 DB service is failing. Snippet of log file------------------------- MSI (s) (F8:80) [22:35:02:484]: Machine policy value 'DisableUserInstalls' is 0 MSI (s) (F8:80) [22:35:02:484]: Warning: Local cached package 'C:WINDOWSInstaller4c483c.msi' is missing. Snippet of log file-------------------------
CSetupBootstrapWizard returned 1 <EndFunc Name='DisplaySCCWizard' Return='0' GetLastError='183'> Failed to find help file for LCID :3081 Loaded DLL:C:Program FilesMicrosoft SQL Server90Setup Bootstrapsqlsval.dll Version:2005.90.1399.0 <EndFunc Name='DwLaunchMsiExec' Return='0' GetLastError='0'> Complete: InvokeSqlSetupDllAction at: 2006/10/8 22:18:10, returned true Running: SetPackageInstallStateAction at: 2006/10/8 22:18:10 Complete: SetPackageInstallStateAction at: 2006/10/8 22:18:12, returned true Running: DeterminePackageTransformsAction at: 2006/10/8 22:18:12 Complete: DeterminePackageTransformsAction at: 2006/10/8 22:18:25, returned true Running: ValidateSetupPropertiesAction at: 2006/10/8 22:18:25 Complete: ValidateSetupPropertiesAction at: 2006/10/8 22:18:25, returned true Running: OpenPipeAction at: 2006/10/8 22:18:25 Complete: OpenPipeAction at: 2006/10/8 22:18:25, returned false Error: Action "OpenPipeAction" failed during execution. Running: CreatePipeAction at: 2006/10/8 22:18:25 Complete: CreatePipeAction at: 2006/10/8 22:18:25, returned false Error: Action "CreatePipeAction" failed during execution. Action "RunRemoteSetupAction" will be skipped due to the following restrictions: Condition "Action: CreatePipeAction has finished and passed." returned false.
The OWC11 setup failure is triggerring SQL DB Service installation to fail as well. Please help!!!
Hi i have a sorted procedure that create a @temp table that return strNomObjet,strNomDescripteur,strReponse,Percentage
I need to calculate the Percentage for strReponse for each strNomDescripteur. strReponse can be = to A,B,C, or D To calculate the Percentage i have no problem my is that something it possible that a certain strNomDescripteur that will have only A,B and D and there no C i need to put 0%.
INSERT INTO @Temp Select te.stdlastn,te.stdfirstn,COALESCE(NULLIF(REPLACE(tr.T3,'*',''),' '),REPLACE(tr.T2,'*','')),tob.Nom,tob.Affichage,td.Nom,td.Affichage fromBulletin.dbo.tblEleves as te INNER JOIN Bulletin.dbo.tblBulletin as tb ON te.stdnumber=tb.NoEtud INNER JOIN Bulletin.dbo.tblNomBull as tnb ON tb.NoBull=tnb.ID INNER JOIN Bulletin.dbo.tblSection as ts ON ts.ID_Bull = tnb.ID INNER JOIN Bulletin.dbo.tblObjetas tob ON tob.ID_Sec = ts.ID INNER JOIN Bulletin.dbo.tblDescripteur as td ON td.ID_Obj = tob.ID INNER JOIN Bulletin.dbo.tblReponse as tr ON tr.ID = tb.ID whereintActif = 1 and tb.NoBull not like '%EdPhy%' and tnb.Nom not like '%EdPhy%' and tnb.Date = '2006-2007' and te.STDGRADeID = 3 and te.schoolid = '1202' and ts.Nom = 'MATHÉMATIQUES' and tr.[Desc] = td.ID and tr.T2 <> 'NULL' and tr.T3 <> 'NULL' and (tr.T2 <> '' OR tr.T3 <> '') ORDER BY tob.Affichage,td.Affichage
SELECT t1.strNomObjet,t1.strNomDescripteur,t1.strReponse, t1.ReponseCount * 100.0/t2.PersonCount AS Percentage FROM ( SELECT strNomObjet,strNomDescripteur,strReponse,count(*) AS ReponseCount FROM @Temp GROUP BY strNomObjet,strNomDescripteur,strReponse)t1 INNER JOIN (SELECT strNomObjet,strNomDescripteur,count(*) AS PersonCount FROM @Temp GROUP BY strNomObjet,strNomDescripteur)t2 ON t2.strNomObjet=t1.strNomObjet AND t2.strNomDescripteur=t1.strNomDescripteur
This will give this result : As you can see it always A,B,C,D A,B,C,D
Hello all,I hope someone can help me; if got a value in a cell (040 1234567),when I run a queryin the Analyser I got as respons only 40 1234567, so missing the zero(0) not the whole number is displayed. When I run a query on a cellwith value 1234567 I received the number 1234567 and that's oke. TheData Type of the Column is Char.Thanks,Marko
When I log in to Windows (XP Pro SP2), I get the following message displayed in the Application Event Viewer.
"The ASP.NET DLL (Path: C:WINDOWSMicrosoft.NETFrameworkv2.0.40607aspnet_isapi.dll) (Version:2.0.40607.0) is missing"
The message is quite correct in its assertion that the file is not where it says it is. There is a copy of the noted DLL however, in C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 and in C:WINDOWSMicrosoft.NETFrameworkv1.1.4322
Why is the Report Server looking for that particular version? Why can't it point at the later version?
I'm trying to access some files on a file server in CLR code and I have to impersonate the windows login to get permission. I am using the classic example of SqlContext and i can see that after calling the impersonate method it changes. I always get false from the System.IO Direcotry and File functions to see if there are any files or even if the directory exists. The permissions are correct on the file share and the batch submission is using the correct login.
When I sign on to my computer I get this message, MSVCR70.dll can not be found try to reinstall it this may fix the problem, BUT CAN'T find the dll that is missing to reinstall it, HOW DO I FIX THIS please HELPPPPPPPPP!!!!!!
I have a normal nvarchar(50) field in a table that has a single comma in it but when i read it using OleDbDataReader the comma gets removed. any ideas what i am doing wrong ?
Hi guys need some help, someone has given me some code to help me filter a gridview by the surname field by the selected letter of a dropdown list. My code is below, however if i select a letter from the dropdown and click the button i get an error, can someone take a look please. <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<script runat="server"> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim dset As New Data.DataSet Dim dview As New Data.DataView dview.Table = dset.Tables("modelRegistration1") dview.RowFilter = "surname LIKE" + surnameFilter.SelectedValue.ToString() + " % " GridView1.DataSource = dview GridView1.DataBind() End Sub </script>
error message is Server Error in '/KayKay' Application.
Syntax error: Missing operand after 'LIKEC' operator. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand after 'LIKEC' operator.Source Error:
Line 6: Dim dview As New Data.DataView Line 7: dview.Table = dset.Tables("modelRegistration1") Line 8: dview.RowFilter = "surname LIKE" + surnameFilter.SelectedValue.ToString() + " % " Line 9: GridView1.DataSource = dview Line 10: GridView1.DataBind()Source File: E:InetpubwwwrootKayKayAdminupdateModels.aspx Line: 8 Stack Trace:
In the console, when right clicking on a table name...then selecting 'open table', the toolbar at the top of the page is not displaying. This is the graphical bar with the 'SQL' button that lets you filter the results.
Recently I installed MSDE and then Analysis services and also applied SP3's for both...
However I have noticed that the FoodMart Database which was automatically installed previously with Analysis services is not installed. Is there any way to get that?
I need to build a results grid that reports totals or zero for an attribute
SELECT ClaimType, VendorNumber, COUNT (ClaimNumber) AS ClaimCount FROM ClaimHeader GROUP BY VendorNumber, ClaimType ORDER BY VendorNumber ASC;
THe underlying data has two claim types (UB, and HCFA). Some vendor numbers have only UB claims or only HCFA claims. I want my totals to show a zero for those vendor numbers. Example
My current group by doesn't give me the 3rd row in my example. How do I change my query to add those rows that have no claims as a zero. Put another way, every vendorNumber has to report a HCFA total and a UB total, even if they're zero.
I have encountered an issue with one of my log files which has me somewhat puzzled. I receieved notification at 00:02:16:36 that the Log file was full: The log file for database 'TDS' is full. Back up the transaction log for the database to free up some log space.. A large number of these same messages have followed.
Prior to these messages starting the log file was backed up successfully at 00:00:01:10 Shortly after this there is a message - and this is the bit that confuses me - at 00:02:16:35 that says: d:mssqldata ds_log.ldf: Operating system error 112(error not found) encountered.
So from what I can tell the log file was backed up successfully. Then approx 1 minute later the system can't find the log file??? Then I keep getting these log file full messages - until the next log backup (60 min later)...then everything is fine. HUH?
When looking at the log file for SQL it is sitting there, and isn't new, as it's created date is back when I setup the database initially.
Can anyone shed any light on what this message might mean and whether there is specifically something that I can do to circumvent it in the future.
Oh yeah we have nothing tricky in terms of replication or log shipping or anything like that.....
Hi all, I would greatly appreciate a boost with this problem. I'm trying to 'script' the mundane task of adding descriptions to my tables (I know this can be done from Enterprise manager via Diagrams, but I have a huge (did I mention huge?) amount of tables and I really don't want to have to go to the properties of each and every table.
Now, if I read BOL right I can use sp_addextendedproperty (and here is their example):
sp_addextendedproperty 'Caption', 'Caption Test Table', 'user', dbo, 'table', TestExProp <--- Does this not add a description to the the table?
Well, I tried it and No Joy ! When I look at the table properties from the Diagram (w/in Enterprise Manager) I have a nice big EMPTY Description Box. I tried changing it from 'Caption' to 'Description' thinking that would work but alas, I sit here and wonder where I went wrong ....
What have I missed?
Any input would put me out of my misery and make me a productive individual (at least for today !)
I installed SQL server 2005 on a win2003 server box.
When I open the Connect to Server dialog box, I choose server type: Database Engine. There is no Servername listed, so I put in the name of the PC.
I get a long error message when I try to connect:
Cannot connect to PCName.... ...error: 40 - Could not open a connection to SQL Server)...
When I try to go into the Surface area Configuration, I get this message: "No sql server 2005 components were found on the specified computer. Either no components are installed, or you are not an administrator on this computer. (SQLSAC)"
I am logged in as Administrator in the PC, so did I do something seriously wrong with the installation?
In the services window, I can not fine MSSQLserver (not sure if this is relevant).