What do corrupted sql database viewer ?

There MS SQL 2005 server and a database that you want to connect to the server.
There mdf ldf and files. The problem is that, most likely, the base was incorrectly disabled, and now when you try to connect the message:
File activation failure. The physical file name "C: \ Program Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ Data \ GB_main_log2.ldf" may be incorrect.
The log can not be rebuilt because the database was not cleanly shut down. (Microsoft SQL Server, Error: 5120)
What do corrupted sql database viewer ?

Hi VectoriaKoalak,
As other post, the best bet is to restore the database from a good backup.
However, if you have no backups or have damaged backups.  To fix the database, you can set the database in Emergency Mode and run DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS option to fix up corruptions. For more detailed steps, please review
the following blog.
EMERGENCY-mode repair: the very, very last resort
http://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-emergency-mode-repair-the-very-very-last-resort/
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support

Similar Messages

  • SQL Database is corrupted

     unfortunately hard disk of my system is damaged, now i recovered my database. but it cannot be attached again to SQL management studio 2005.
      the error is
     myfile.mdf is not a primary database file. (SQL server , error 5171)

    not a primary database file. (Microsoft SQL Server, Error: 5171) ? 
    The aforementioned error message conveys that the database is corrupt and is, therefore, not accessible. 
    Cause: 
    The root cause of this error message is that the database file is corrupt. It may be possible because of various reasons such as power surges, human errors,
    virus infections, etc. 
    Resolution: 
    To address this issue, there are few things that you can perform. First of all, take a backup of this corrupted database lest it is further damaged. Then,
    you should try to check the database consistency using the DBCC CHECKDB utility. For this, you should run the utility without any clause. The command is executed and the reason for corruption is provided. Then, run the utility using the mentioned clause. However,
    if you are still not able to repair sql, then you should use a third-party ms sql repair tool for mdf repair. Such tools recover corrupted SQL database components after all kinds of logical crash scenarios. 
    SQL Recovery software is a robust tool that is used to recover corrupt databases created in MS SQL Server 2000, 2005, and 2008. It is able to repair sql
    components such as tables, defaults, stored procedures, triggers, views and rules. It can also repair database constraints such as primary key, foreign key, unique key, check, etc. It is a highly interactive tool that does not overwrite the original database
    while scanning it. It is compatible with Window 7, Vista, 2003 Server, XP, 2000, and NT.

  • What's a better connection to an SQL database? ODBC or OLE DB

    NEw user here, but what would be a preferred way of connecting to my SQL database?  So far I have option of using ODBC (RDO) connection or OLE DB(ADO) connection. I'm not sure what the differences or when to use one or the other.
    Thanks

    I like OLE DB for the simply because it's "portable". With OLE DB the connection info is stored in the report. With ODBC, the report is using a system dsn connection. It means that if you want to send it to another user / computer, you also have to make sure the other computer has the same ODBC connection.
    In terms of performance... I've used both and have never seen a difference.
    Jason

  • What are the differences between the following Oracle database views?

    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor function

    junez wrote:
    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor functionV$SQL_PLAN-this is dynamic perfomance view which contain execution plan information for each child cursor loaded in the library cache.
    DBA_HIST_SQL_PLAN- data dictionary view also contain execution plan information for each child cursor bun in workload repository.Actually this view captures information from V$SQL_PLAN and is used with the DBA_HIST_SQLSTAT .
    dbms_xplan.display_cursor - function displays explain plan of any cursor loaded in the cursor cache. See more information below links:
    http://youngcow.net/doc/oracle10g/server.102/b14237/dynviews_2120.htm
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_2154.htm
    http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10802/d_xplan.htm#998179

  • What are the Benefits of Synchronizing/ Replicating Project Online with an on-Premise SQL Database

    Hi
    What are some of the reasons and/ or benefits that one may want to consider with regards to setting up and synchronizing Project Online with a on-Premise SQL database ?
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Spiro,
    Reporting via Project Online is limited to OData, and writing queries with OData starts getting complex at a certain point.
    So, if your organization in using third party BI tools, or want to use OLAP cubes, or in general want to use straight SQL queries instead of oData, it is generally beneficial to have the data in house for reporting.
    So in general, using the SQL Synchronization, will bring data into "your" organization, as opposed to being with Microsoft so you get a LOT more flexibility with reporting.
    Hope this helps your question.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • Developing database views between Oracle and SQL Server tables

    I am on Oracle 10.2, my organization has many SQL Server databases as well and has now made
    SQL server as company standard so many new databases will be developed in SQL Server. It is of course
    not possible to convert all Oracle databases to SQL Server, so a mix environment will exist. Two questions:
    1.     Is it possible to develop database views in Oracle (10g in my case) which join Oracle tables with tables in SQL Server 2008? If yes, how. I have seen some heterogeneous connectivity setup to connect SQL Server to Oracle, but not sure whether it is possible to develop a database view across two databases.
    2.     I know it is not a SQL Server forum, but many DBA’s know both Oracle and SQL Server. Is it possible to develop views in SQL Server (SQL Server 2008 R2 in my case) which join Oracle 10g and SQL Server 2008 tables? I know in SQL Server, there is way to set up linked servers, but do not know whether it is possible to develop views.
    Thanks a lot for your insight.

    You can create views that join local Oracle tables and remote SQL Server tables. I'm pretty sure you can do the reverse as well but I haven't personally done it.
    However, I would be very concerned about the performance you'd get if you created that sort of view. You'd very frequently end up in a situation where Oracle has to pull all the data in the remote table across the database link in order to apply predicates and join the data locally. That could be disastrous from a performance standpoint.
    Justin

  • Oracle DB View - MS SQL Database

    Hello XI Experts,
    I have a scenario where I should deliver data from 10 views in Oracle data warehouse into corresponding MS SQL database tables. The problem is that I can't update the view so therefore I don't know which data was already processed because I can't flag them or delete them. Some of the views are really huge so to fetch them all in once is impossible. (I already crashed the system trying to do so). I need to fetch them in sequences but don't have any idea how. Has anybody have similar experience or any idea?
    Thanks and regards,
    Pavol Suba

    It would be good to know which product you're going to use as both gateway products that can connect to the SQL Server are based on ODBC. I assume you're talking about DG4ODBC but will also comment on Dg4MSQL.
    When you're going to use DG4ODBC it is the ODBC driver that needs to be SSL capable. When you have a SSL capable driver you can either use 11.2 or 12.1 release of DG4ODBC.
    Regarding DG4MSQl up to 11.2.0.4 the SSL libs have been releases for several platforms and support can ask for a backport of the libs to 11.2.0.4 if they do not exist. So just file a service request if they are missing.
    12c by default comes with the SSL libs and you only need to configure it.
    - Klaus
    Message was edited by: kgronau

  • SQL database...busy....what's it doing?!?

    Today a R/3 sap system is very low in performance. We have checked on the TASK MANAGER and we have seen that it's due to a high use of CPU by SQL DATABASE. So....cause we don't have activate any strange activity on it we would like to monitor which activity is running on it?how can we see that?
    thanx very much
    Sonya

    Hello,
    you can use the SQL Profiler to see all activity running on the SQL Server. The Profiler will capture any single command issued to the SQL Server, but might have a performance impact.
    Furthermore can you check the activity with the activity monitor (SQL 2005) or with the Enterprise Manager -> Management -> Current Activity -> Process Info. There you will see all connections made to the SQL Server and what it is currently doing (doubleklick on it).
    Best regards
      Clas

  • SQL Database is corrupted....... plz help.

    Respected Sir,
    unfortunately hard disk of my system is damaged, now i recovered my database. but it cannot be attached again to SQL management
    studio 2005.
    the error is myfile.mdf is not a primary database file. (SQL server , error 5171)
    plz sir help me...

    Corruption in SQL server database can happen due to any uncertain like virus attack, power
    failure, hardware issue, OS malfunction, sudden system shutdown, so on. When a SQL server data file (.mdf) is corrupt then DBAs can try several methods to repair and recover data from it. 
    Run DBCC CHECKDB: It checks & reports all the error message
    in errorlog, if there is any problem with the database. Try to analyze & understand the error message logged in the errorlog. Re-run DBCC CHECKDB with the recommended minimum repair option to repair the file. 
    Detailed information about DBCC CHECKDB is available here: http://www.techrepublic.com/forums/discussions/sql-database-recovery-from-corrupt-database-file/
    Restore from backup: If above command fails to fix the error
    message the try to restore the database from clean backup. 
    3rd party tool: Try 3rd party
    Recovery Toolbox for SQL Server to recover data from corrupt mdf file. Most of the software have demo version that shows the preview of corrupt SQL server data file. 
    http://www.sql.recoverytoolbox.com/

  • SQL queries against a database view from an external system?

    Hi,
    I have a question about Database views in se11.
    Is it possible to create a database view and that do SQL queries against this  view from an
    external system, Not a SAP system?
    Please, I need you help.
    Best Regards
    Annika

    Hi Annika,
    it is possible , yes... but depends on your database systems in the SAP source DB and the external DB
    (easier if they are the same,  i.e. both ORACLE) - check out with your BASIS team (they have to create something like a "database link" in the external DB system  that you can use to access the tables in the SAP source).
    In the external DB you sure can create a view on these "remote" tables.
    We used this to pull data form SAP DB  to another DB system (both ORACLE based).
    But this is NOT supported by SAP , so be carefull. Below is the restriction for ORACLE (as well for other DB systems )
    see SAP note 581312 "Oracle database: licensing restrictions"
    As of point 3, it follows that direct access to the Oracle database is
    only allowed for tools from the areas of system administration and
    monitoring. If other software is used, the following actions, among
    other things, are therefore forbidden at database level:
    * Querying/changing/creating data in the database
    * Using ODBC or other SAP external access methods
    This means that additional application software is only allowed if this
    accesses the database through SAP interfaces (for example, RFC, SAP J2EE
    or BAPI).
    I would say if you KNOW the tables involved (using valid WHERE conditions and joins )
    and don't start queries from hell (ad-hoc type) wich can bring down your SAP system performance
    you can try it.
    But be warned...
    good luck...
    bye
    yk

  • What is size limit for a database view?

    hi all..
    can anybody pls tell me about the size category for a database view?

    hi
    check out this document
    http://help.sap.com/saphelp_nw04/helpdata/en/36/74c0358373003ee10000009b38f839/frameset.htm
    this would answer all ur queries
    regards
    Aakash Banga

  • What is the use of Database View, maintenace , projection and Help view

    hello friends,
    I created tables..and set check table relation.
    how to create Database View, maintenace , projection and Help view
    phani

    Hi,
    have a look at this.
    4 type of views
    database
    maintainance
    help
    projection view
    check this link as well
    (https://forums.sdn.sap.com/click.jspa?searchID=9904886&messageID=4885135)
    Database views are implemented with an equivalent view on the database.
    Projection views are used to hide fields of a table (only projection).
    Database views should be created if want to select logically connected data from different tables simultaneously.
    Database views implement an inner join.
    Application programs can access the data of a database view using the database interface. (Just as we write select queries on database tables, we can write them for views as well.)
    Includes in Database Views
    An entire table can be included in a database view. In this case all the fields of the included table will become fields of the view (whereby you can explicitly exclude certain fields).
    To include one of the tables in the view, enter character * in field View field, the name of the table to be included in field Table and character * again in field Field name on the View fields tab page of the maintenance screen of the view.
    You can also exclude individual fields of an included table. If you do not want to include a field of the included table in the view, enter - in field View field, the name of the included table in field Table and the name of the field to be excluded in field Field name.
    Inserts with Database Views
    If a database view contains only one single table, data can be inserted in this table with the view .
    You have the following options for the contents of the table fields not contained in the view:
    If the field is defined on the database with NOT NULL as initial value, the field is filled with the corresponding initial value.
    If the field is defined on the database as NOT NULL without initial value, an insert is not possible. This results in a database error.
    If the field is not defined on the database as NOT NULL, there will be a NULL value in this field.
    A maintenance view permits you to maintain the data of an application object together.
    The maintenance status determines which accesses to the data of the underlying tables are possible with the maintenance view.
    Read only: Data can only be read through the view.
    Read, change, delete, insert: Data of the tables contained in the view can be
    changed, deleted, and inserted through the view.
    Read and change: Existing view entries can be changed. However, records
    cannot be deleted or inserted.
    Read and change (time-dependent views): Only entries whose non-time
    dependent part of the key is the same as that of existing entries may be
    inserted.
    Maintenance View ( SE54 )
    You can use a maintenance view to maintain data, which is distributed over several tables, at the same time.
    Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
    Creating maintenance View:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm
    regards,
    vipul

  • What is max capacity of Azure SQL database? 500GB? Possible to compress?

    I have 1TB data on SQL Server VM and would like to migrate to Azure SQL.
    Is 500GB really the max? Any compression available so that I can fit 1TB data?
    Kenny_I

    Hi,
    on the contrary, this was announced a while back but for some reason the announcement was pulled out
    it seems there's support for compression though, check:
    http://thomaslarock.com/2014/06/microsoft-azure-sql-database-data-compression/
    I don't think you can compress 1TB data to SQL Azure.
    Request to provide your feedback
    http://feedback.azure.com/forums/217321-sql-database/suggestions/403510-allow-data-compression-to-improve-size-performanc
    Girish Prajwal

  • I need to host a website with a SQL database - Azure pricing details are too confusing

    Hello,
    I need to give a potential client a hosting price for a somewhat simple web application they want me to build. I told them it shouldn't be a problem. After gathering the requirements, I figured I would use the following technology to build and host
    it:
    ASP.NET 4.5
    MVC 5
    1 SQL Database ~ 25GB with options to expand and also with a backup
    SSL certificate needed
    Hosting would be on Azure because I have some experience using Visual Studio 2012 and integrating the Visual Studio Online (TFS) source code and scrum web applications. I've never actually spun up a website with a SQL database using Azure before, but I
    imagined it wasn't too difficult to find a general hosting plan to support the above requirements.
    The use of the website will be very simple and limited to the basic CRUD operations. Will support forms authentication using the Identity 2.0 framework. The web applications main purpose is to fill out a form for new accounts, have a search page for
    those accounts, a page to view a created account and add notes to it. So performance wise, it isn't asking for much. I just want it to be fast and secure.
    So I start looking on the Azure's pricing landing page which is here: (can't put links in here, but search Azure pricing on Bing) and I see this Pricing Calculator, so I click it
    First thing I notice is the Websites tab doesn't mention SQL Database - in fact the Data Management is a separate tab from Websites. And if I made my selections on the Websites tab, the estimated monthly price doesn't stay the same when I go to the Data
    Management tab - so I get the illusion I have to have two separate purchases.
    I'm not exactly sure if the Pay as You Go billing feature would be okay because it's just a bit scary to leave every monthly payment up to chance; somewhat. Would love to know if there is other payment options that I could see for what I described above.
    I want to use Azure to host my asp.net website - it makes sense and the integration with Visual Studio is amazing. I love the publish feature for both MVC 5 Projects and SQL Database Projects.
    Thanks in advance for the help!

    Hello jdevanderson,
    I suggest that you start by looking at the pricing TIERS for the Azure website. This link will give you clarity on different Service TIERS that are availaible:
    http://azure.microsoft.com/en-in/pricing/details/websites/
    You can guage your requirement and choose the Service TIER accordingly.
    And regarding the database, you are right about it. You will be charged seperately for the database. You can refer to this link that will give you clarity on SQL database pricing:
    http://azure.microsoft.com/en-in/pricing/details/sql-database/
    Refer to this link for more information on 'How pricing works':
    http://azure.microsoft.com/en-in/pricing/
    Use the full calculator to add your website and the database to get an estimated cost:
    http://azure.microsoft.com/en-in/pricing/calculator/?scenario=full
    Thanks,
    Syed Irfan Hussain

  • Database Initialiser does not create azure sql database

    I have a WPF application In the OnStartup in the app.cs I set the Database initializer and forced the context the initialise my database:
    Debug.WriteLine("Setting Initializer");
    Database.SetInitializer<MyContext>(new MyDatabaseInitializer());
    Debug.WriteLine("Declaring new context");
    using (MyContext c = new MyContext("MyContext"))
    Debug.WriteLine("Force the initialization");
    c.Database.Initialize(true);
    Debug.WriteLine("Done!");
    I created a sql database in the management portal of the azure.
    Copied the connectionstring it provided for ADO.net.
    But my database is not created.
    I also added a firewall rule but nothing happens. I Have no clue what to do.
    Can anybody please help me with this?
    If you need more information please ask i really have to get this sorted out.
    Thanks in advance!

    Hi Turkstra,
    I have tried to use EF to create Azure SQL database, it works as expect, the database 'jambordbcreate' appear in my SQL Azure, below is the detailed codes.
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace CodeFirst
    class Program
    static void Main(string[] args)
    Database.SetInitializer(
    new CreateDatabaseIfNotExists<SchContext>());
    using (var db = new SchContext("Server=tcp:****.database.windows.net,1433;Database=jambordbcreate;User ID=vote@***;Password=***;Trusted_Connection=False;Encrypt=True;Connection Timeout=30"))
    string name = "jambor";
    var student=new Student(){Name=name, ID="1a"};
    db.Students.Add(student);
    db.SaveChanges();
    db.Database.Initialize(true);
    public class Student
    public string ID { get; set; }
    public string Name { get; set; }
    public string age { get; set; }
    public string sex { get; set; }
    public class School
    public string ID { get; set; }
    public string Name { get; set; }
    public virtual List<Student> Students { get; set; }
    public class SchContext : DbContext
    public SchContext(string connection):base(connection)
    public DbSet<Student> Students { get; set; }
    public DbSet<School> Schools { get; set; }
    I suggest  you check your SQL connection, after run your code, please refresh azure portal to see whether your database is exist. Hope this give you some help.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Issue using one 2 Fact tables with one dimension Table.

    Hi, I have 1 Dimension table X and 2 Fact tables A and B X is joined to Both A and B for Loan Amount ( with A) and for colleatral amount (with B) when I am selecting the X.Product_Name, A.Loan_Amt, B.Collateral Amount, it is giving an error message S

  • WBS element number ranges

    Hi, I want to know how to maintain number ranges for WBS elements. Tcode:SNUM and the object is PRPS. we have 2 ranges  01----   001-099                            02---- 100-199 At present 01 is being used but want to change it to 02.How to do it. T

  • How to test if a QT movie is Self-contained?

    I have had difficulties in DVD SP because some movies produced in FCE were (inadvertently) created with the box "Make Movie Self-contained" unchecked. I had lost some of my files on my Scratch Disc (render files I think) on which the movies depended

  • PS docked to additional monitor not opening in main monitor

    Do so hope someone can help. I'm running CS5 on an ASUS laptop with Win7 (my desktop system had a motherboard failure) that is docked to a 23" monitor. For some reason, Illustrator and other parts of CS5 Design Standard seem to open just fine on the

  • How well will Mountain Lion run on the following MacBook Pro?

    Thinking about biting the bullet and upgrading to Mountain Lion on my MacBook Pro. My specs are as follows: MacBook Pro 15" (Late 2008 model MacBookPro5,1) Intel core 2 duo 2.53Ghz 8GB RAM 1TB HD with 390GB free Mac OS X 10.6.8 So, how well will Moun