Executing multiple scripts using sqlcmd utility and halt execution on error

Hello Everyone,
This is a kind of urgent. I'm stuck with this from last couple of days and had a bad weekend due to this.
Any help on this topic will be appreciated.
I'm running through an issue in which I am executing 214 sql scripts in a folder using
sqlcmd -S %Server% -E -d Employee2K6 -b -i "!dir!!file" -b -r1 1>NUL 2>"%logs%\!file!.log"
I'm able to generate the logs as well.  I'm not able to stop the execution on error.
Can anybody tell me how to stop the subsequent scripts execution if any of the scripts fails?
Many Thanks!
Kusum 

Hi Visakh,
Thanks for the reply. 
I think I didn't put together my question correctly here. 
Here's some more information for you.
I'm executing the below mentioned command in a batchfile.
sqlcmd -S %Server% -E -d Employee2K6 -b -i "!dir!!file" -b -r1 1>NUL 2>"%logs%\!file!.log"
the !dir!!file here brings the folder that contains 214 scripts. I want the script execution to halt whenever a script
fails.
Right now all the scripts are getting executed and if some of them fails it generates the logs as well.
I checked sqlcmd commands to halt execution on error. The msdn has it has -b but that's not working for me.
Any help on this is highly appreciated.
Thanks!

Similar Messages

  • How to execute SQL Script using windows powershell(using invoke-sqlcmd or any if)

    OS : Windows server 2008
    SQL Server : SQL Server 2012
    Script: Test.sql (T-SQL)  example : "select name from sys.databases"
    Batch script: windows  MyBatchscript.bat ( here connects to sql server using sqlcmd  and output c:\Testput.txt) 
     (sqlcmd.exe -S DBserverName -U username -P p@ssword -i C:\test.sql -o "c:\Testoutput.txt)  ---it working without any issues.....
    This can execute if i double click MyBatchscript.bat file and can see the output in c:\testput.txt.
    Powershell: Similarly, How can i do in powershell 2.0 or higher versions?  can any one give full details with each step?
    I found some of them online, but nowhere seen clear details or examples and it not executing through cmd line (or batch script).
    example: invoke-sqlcmd -Servernameinstance Servername -inputfile "c:\test.sql" | out-File -filepath "c:\psOutput.txt"  --(call this file name MyTest.ps1)
    (The above script working if i run manually. I want to run automatic like double click (or schedule with 3rd party tool/scheduler ) in Batch file and see the output in C drive(c:\psOutput.txt))
    Can anyone Powershell experts give/suggest full details/steps for this. How to proceed? Is there any configurations required to run automatic?
    Thanks in advance.

    Testeted the following code and it's working.....thanks all.
    Execute sql script using invoke-sqlcmd with batch script and without batch script.
    Option1: using Import sqlps
    1.Save sql script as "C:\scripts\Test.sql"  script in side Test.sql: select name from sys.databases
    2.Save Batch script as "C:\scripts\MyTest.bat" Script inside Batch script:
    powershell.exe C:\scripts\mypowershell.ps1
    3.Save powershell script as "C:\scripts\mypowershell.ps1"
    import-module "sqlps" -DisableNameChecking
    invoke-sqlcmd -Servername ServerName -inputFile "C:\scripts\Test.sql" | out-File -filepath "C:\scripts\TestOutput.txt"
    4.Run the Batch script commandline or double click then can able to see the output "C:\scripts\TestOutput.txt" file.
    5.Connect to current scripts location  cd C:\scripts (enter)
    C:\scripts\dir (enter )
    C:\scripts\MyTest.bat (enter)
    Note: can able to see the output in "C:\scripts" location as file name "TestOutput.txt".
    Option2: Otherway, import sqlps and execution
    1.Save sql script as "C:\scripts\Test.sql"  script in side Test.sql: select name from sys.databases
    2.Save powershell script as "C:\scripts\mypowershell.ps1"
    # import-module "sqlps" -DisableNameChecking #...Here it not required.
    invoke-sqlcmd -Servername ServerName -inputFile "C:\scripts\Test.sql" | out-File -filepath "C:\scripts\TestOutput.txt"
    3.Connect to current scripts location
    cd C:\scripts (enter)
    C:\scripts\dir (enter )
    C:\scripts\powershell.exe sqlps C:\scripts\mypowershell.ps1 (enter)
    Note: can able to see the output in "C:\scripts" location as file name "TestOutput.txt".

  • How to execute a script using ombplus

    hi
    i have created one scripts using umbplus now i want to execute that scripts using ombplus editor...
    can any one pls let me know how to execute that using ombplus editor..
    thanks
    keka.

    hi,
    we have created a batch file say a.bat and in that batch file we have given the ombplus path "C:\oracle\OWBHome\owb\bin\win32\OMBPlus.bat" and the path of the script file " C:\OWB\test.tcl". if you run the a.bat file its connecting to ombplus but the script is not executing.
    let me know how to achive this??
    thanks.

  • TS1338 I have 4 Trojan Horse viruses on my external drive I use for Time Machine.  My MacBook Pro hard drive is clean.  I have eased the external drive 3 times using Disk Utility and it still has the 4 Trojan Horse viruses. How do I get rid of them. Wayne

    I have 4 Trojan Horse viruses on my external drive I use for Time Machine.  My MacBook Pro hard drive is clean.  I have eased the external drive 3 times using Disk Utility and it still has the 4 Trojan Horse viruses. How do I get rid of them. I am using 10.8.3  Wayne

    ksu62 wrote:
    The infection names are:  classload.jar-719ef6a5.zip
                                              classload.jar-5db452le31.zip
                                              ar3.jar-6ce3b2f-45l483f.zip
                                              classload.jar-lef99412-63bsd3fl.zip
    Those look alot like file names and not infection names. I don't find any reference to anything like that on Norton or VirusTotal. Since you said these were Trojans, I would expect to see "Trojan" as part of the infection name.
    ".jar" files are executable Java applets. The random alpha-numerics would seem to indicate a cache file, likely from a browser with Java enabled. And we all know what ".zip" means.
    Worst case is that you had Java enabled in a browser and were infected by one of the late variants of the Flashback Trojan over a year ago or one of a couple of other attacks using the same vulnerability but targetted against a small number of political sympathizers. Much more probable is that thes were Windows only Trojans. Hopefully you have a fully up-to-date OS X, including Java, and have disabled Java in all your browsers by now.

  • When I repair disk permissions using Disk Utility and it says it's completed the task, I click on it again and it repairs more. This has been going on for hours now. Could there be that many wrong permissions? Should it get to "all repaired" eventually?

    When I repair disk permissions using Disk Utility and it says it's completed the task, I click on it again and it repairs more. This has been going on for hours now. Could there be that many wrong permissions? Should it get to "all repaired" eventually?

    It's normal behavior. You don't have to worry about. Most of what's listed is just a report of what the utility finds., not necessarily that there is omething wrong.
    If you want to find out more, read the link below, or see the More Like This links on this page.
    http://support.apple.com/kb/TS1448?viewlocale=en_US

  • I burned an exercise DVD using disk utility and when I played it in my DVD player it was choppy and skipped.  Any suggestions are greatly appreciated.

    I burned an exercise DVD using disk utility and when I played it in my DVD player it was choppy and skipped.  Any suggestions are greatly appreciated.

    Commercial
    Roxio Toast
    <http://www.roxio.com/enu/products/toast/titanium/>
    NTI DragonBurn
    <http://www.ntidragonburn.com/en/us/product/dragon_burn.asp?>
    Shareware or freeware
    DVD Image Utility
    <http://geek.thinkunique.org/2007/07/17/dvd-image-utility/>
    Disco
    <http://discoapp.com/>
    no longer supported, but free, simple, and runs well under SL.
    LiquidCD
    <http://www.maconnect.ch/>
    free; iffy support, but, again, simple, and runs well under SL.
    Burn
    <http://burn-osx.sourceforge.net/Pages/English/home.html>
    open source; not clear how active development and support are, but runs well under SL.
    Terminal Whiz Kid
    mkisofs
    <http://cdrecord.berlios.de/private/cdrecord.html>
    (part of the cdrtools kit)
    Use mkisofs to create the disc image, and burn it with hdiutil or drutil. (Some of the free options mentioned above actually use mkisofs.)

  • Report Script returns no data and "java.io.FileNotFoundException" error

    When attempting to write to a new file (Eg: C:\TEST.txt), Report Script returns no data and "java.io.FileNotFoundException" error occurs.
    This error occurs only in Essbase 9.3.1.3 release, however it works fine in release 9.3.1.0.
    After running the report the script, it pops up the follwing message:
    "java.io.FileNotFoundException: ..\temp\eas17109.tmp (The system cannot find the file specified): C:\TEST.txt"
    When checked the TEST.txt, it was empty.

    Sorry folks, I just found out the reason. Its because there was no data in the combination what I was extracting.
    but is this the right error message for that? It should have atleast create a blank file right?

  • How to operate multiple querys using DB Adapter and 'Execute Custom SQL'

    I have a requirment that I need to create database adapter in your BPEL process with 'Execute Custom SQL' to operate multiple query in DB in one atomic
    here are the details:
    inbound request:
    <ns1:Query_bpelProcessRequest>
    <ns1:input>
    <ns1:ItemDetail>
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>1126EWWA</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>11208FSAA</ns1:ItemID>
    </ns1:ItemDetail>
    </ns1:input>
    </ns1:Query_bpelProcessRequest>
    I use for-each fuction in XSLT to mapping the all ItemID value:
    <xsl:template match="/">
    <xsl:for-each select="/tns:Query_bpelProcessRequest/tns:input/tns:ItemDetail">
    <ns1:QueryFromDB_Input>
    <ns1:ItemID>
    <xsl:value-of select="tns:ItemID"/>
    </ns1:ItemID>
    </ns1:QueryFromDB_Input>
    </xsl:for-each>
    </xsl:template>
    and in DB Adapter I use the 'Execute Custom SQL' to query the CONTENT value according the ItemID value:
    select distinct CONTENT from agile.item where ITEM_NUMBER=’<ItemID>’
    However, in the result, It only query the first item value for <ns1:ItemID>1123DDDS</ns1:ItemID>
    <<QueryFromDB_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_Input_msg">
    <QueryFromDB_Input xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </QueryFromDB_Input>
    </part></QueryFromDB_InputVariable>
    <QueryFromDB_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_OutputCollection">
    <QueryFromDB_OutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <QueryFromDB_Output>
    <ITEM_NUMBER>1123DDDS</ITEM_NUMBER>
    <CONTENT >SJIFESSFFJ</CONTENT >
    </QueryFromDB_Output>
    </QueryFromDB_OutputCollection>
    </part></QueryFromDB_OutputVariable>
    the other two querys are not operated.
    what can I do to operate multiple querys??
    Thanks

    Hi Rod,
    I are using while loop and assign array inputvalue to the inputvarable of DBadapter now, but actually it doesn't work.
    Throw expection
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"] should not return multipe nodes.
    Please check the BPEL source at line number "89" and verify the part and xpath query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"].
    Possible reasons behind this problems are: some xml elements has maxOccurs > 1 or the xml data is invalid according to XML Schema.
    To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
    </summary>
    </part></selectionFailure>
    my inbound XSD:
    <element name="ItemsQuery_bpelProcessRequest">
    <complexType>
    <sequence>
    <element name="input" type="tns:inputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="inputType">
    <sequence>
    <element name="inputDetail" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="ProductID" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="ItemsQuery_bpelProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="tns:outputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="outputType">
    <sequence>
    <element name="ItemOutput" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="item_id" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    DB Adapter XSD:
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="QueryItem_Input" type="QueryItem_Input"/>
    <xs:complexType name="QueryFrom_Input">
    <xs:sequence>
    <xs:element name="ProductID" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="QueryItem_OutputCollection" type="QueryItem_OutputCollection"/>
    <xs:complexType name="QueryItem_OutputCollection">
    <xs:sequence>
    <xs:element name="QueryItem_Output" type="QueryItem_Output" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="QueryItem_Output">
    <xs:sequence>
    <xs:element name="item_id" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    the bpel assign:
    <assign name="Initial_Index">
    <copy>
    <from expression="0"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('ItemIndex')&lt;ora:countNodes('inputVariable','payload','/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID)">
    <sequence name="Sequence_1">
    <assign name="Assign_QueryInput">
    <copy>
    <from variable="inputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID{bpws:getVariableData('ItemIndex')}'/>
    <to variable="QueryItem_InputVariable"
    part="QueryItem_nput_msg"
    query="/ns2:QueryItem_Input/ns2:ProductID"/>
    </copy>
    </assign>
    <invoke name="Invoke_QueryDB" partnerLink="QueryItem"
    portType="ns1:QueryItem_ptt"
    operation="QueryItem_PSFT"
    inputVariable="QueryItem_InputVariable"
    outputVariable="QueryItem_OutputVariable"/>
    <assign name="Assign_Output">
    <copy>
    <from variable="QueryItem_OutputVariable"
    part="QueryItem_OutputCollection"
    query="/ns2:QueryItem_OutputCollection/ns2:QueryItem_Output/ns2:item_id"/>
    <to variable="outputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessResponse/client:result/client:ItemOutput/client:item_id{bpws:getVariableData('ItemIndex')}'/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('ItemIndex')+1"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    </sequence>
    </while>
    I use {} instead of  []  for array,  because [] seams not reveal in this message board
    seems I can't assign array values to the DB inputvalue, Are there any solutions for this ?
    I still haven't found any way for operating multiple querys using DB Adapter.
    Thanks
    Edited by: user1065212 on 07-Jan-2010 19:39
    Edited by: user1065212 on 07-Jan-2010 19:41
    Edited by: user1065212 on 07-Jan-2010 19:44
    Edited by: user1065212 on 07-Jan-2010 19:45

  • Executing multiple scripts with error reporting where necessary.

    Hi,
    I'm a developer using SQL developer to create scripts for Tables / Views / Procs. I'm relatively new to Oracle, as I've been using SQL server mostly. So please bear with me.
    Now, the dev team constantly upset the dba due to subtle syntax issues between SQL Developer and SQL+. So, what we are now meant to do is test our scripts via SQL+ on the understanding that if it works with that it's good.
    However, you DBAs know that developers don't always do what they are told :).
    Hence, I have been tasked each morning to run all the scripts to make sure they are ok.
    I know I can execute multiple scrips easily like this....
    @c:\Scripts\Table1
    @c:\Scripts\Table2
    @c:\Scripts\Proc1
    @c:\Scripts\Proc2
    etc
    However, this seems to echo all the contents of the scripts in the output window. So it's a bit of a task to trawl through the output to see if there are any errors.
    What I would really like to do is as above, but rather than echoing the script contents, just provide output to say that each object (tables / views / procs) has been created correctly, or if an error occurred, output the relevant object name and the error.
    eg - If Table2 DDL has errors, output along the lines of....
    Table1 created successfully.
    Error creating Table2: <Invalid data type>
    Proc1 created successfully.
    Error creating Proc2:<Object Table2 does not exist>
    Is this possible?
    Example pretty please.
    Ultimately, I'd like to email the output automatically - however, that's a task for another day :).
    Many thanks
    DC

    I'm not sure what you mean by "echo all the contents of the scripts in the output window". If I create a script a.sql
    drop table a;
    create table a ( col1 number );
    drop table b;
    create table b ( col1 number );
    drop table c;
    -- Note the error in the definition of c
    create table c ( 123 number ); and run it in a vanilla SQL*Plus session, I get the output you appear to be looking for
    SQL> @c:\temp\a.sql
    Table dropped.
    Table created.
    Table dropped.
    Table created.
    drop table c
    ERROR at line 1:
    ORA-00942: table or view does not exist
    create table c ( 123 number )
    ERROR at line 1:
    ORA-00904: : invalid identifierAre you looking for something different? Or are you getting different results?
    Justin

  • Execute OBIEE report using Command Utility

    Hi All,
    I am working on OBIEE 11.1.1.5.0
    I'm trying to execute/run OBIEE report through command utility and the output should be in any format other than text.
    This report should be scheduled on hourly basis at particular destination/ location without using delivers scheduler.
    Thanks in advance.
    KD

    Hi Veera,
    I ran the report using nqcmd and to achive the desired result I had also specified the path by giving -0, which had also generated the pdf file for the same but the problem is when I'm opening the pdf file it throws an error saying "could not open 'quar3.pdf' because it is either not a supported file type or because the file has been damaged". Below is what I had passed in cmd.
    D:\MI2\Oracle_BI1\bifoundation\server\bin>nqcmd -d coreapplication_OH1426052389
    -u weblogic -p weblogic_1 -s C:\quar3.sql -o C:\quar3.pdf
    I tried creating .xls, .doc which gets generated but it is not in a tabular format.
    Please help....
    Thanks,
    KD

  • Can we execute multiple tasks using emcli

    Hi,
    I know we can execute any task on target using emcli but just wondering if we can execute multiple command in one emcli execution,
    also does any one has any idea about how to pass the target variables in emcli command.
    Thanks,
    Ritu

    Hi Salman,
    Thanks for your reply but I do not want to use deplyoment procedured as this means for patching and provisioning related tasks,
    I want to automate the health checks using EMCLI and for that I can use submit job verb of emcli,
    I just wanted to if i have multiple command to pass to emcli,how to do that ?
    Regards,
    Ritu

  • How to execute Remote scripts using OSB or BPEL

    Hi all,
    Can we execute the Remote Scripts from OSB and BPEL ??
    What is best way to invoke the scripts using OSB ?
    Thanks
    Phani

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

  • How to execute SQL scripts using OWB Process flows ?

    Hi,
    I have some SQL Scripts. I have to execute them using OWB Process flows.
    Can i get any document or link which helps me in achieving this?
    Thanks in Advance,
    SriGP

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

  • Resized partition using Disk Utility and now Windows 7 will not boot

    Hi,
    Hopefully someone can help me!!
    I had previously used Boot Camp to install Windows 7. However, I later realised I had not given myself anywhere near enough disk space as I started using Windows for things I hadn't originally planned on using it for.
    Anyway, long story short, to solve the problem I uninstalled some applications on my Mac OSX and used Disk Utility to decrease the size of my Mac partition. My plan was then to reboot to Windows and use a Windows application to increase the size of the Windows partition. However - I coudln't even get that far.
    Upon decreasing the size of my Mac partition (succesfully) I restarted my Mac in order to boot to Windows. However, I was greeted with a message along the lines of "unable to boot to Windows please insert boot disk and press any key" (I can't remember the exact message).
    I was wondering if anyone knows of any way to restore my Windows partition, retaining all of my previously saved files on my Windows disk. It's probably a long shot, but the thought of losing everything I have been working on for the last few months is a sickening one.
    What does give me a bit of hope is that, if I click Boot Camp it seems to recognise that Windows 7 is installed as the option that appears is to uninstall it.
    Furthermore, if I view partitions in Disk Utility, a "DISK0S4" is listed. However, it's only at 20gb - if this WAS my BootCamp partition previously, it was originally at something around 60gb (I think - either way, definitely bigger than 20gb!).
    On top of this, my current Macintosh HD parition is at 260gb and with the DISK0S4 partition at 20.21gb, there seems to be some space missing... I'm hoping this is the files I've been working on over the last few months!
    Anyway, I've done some searching on the net and it *seems* that GPT fdisk *might* be my savour. I've downloaded it but have no idea how to use it and don't plan on playing about with it as I could no doubt do some real damage. If it is likely to solve my problem however, I'm certainly more than capable of being walked through what I need to do.
    Please help!

    Hi Christopher,
    I also have problems with Windows rebooting after partition resize trying to reduce Mac side and increase Windows side. I do not see the BootCamp partition labelled as such while running disk utility. The Windows partition shows up when I boot up while pressing the ALT key. However, when I try to run Windows, it says " error loading operatig system".
    I also followed instruction and went through to run gdisk successfully. Results towards the end.
    What can be done? Windows still does not boot and It shows ? Suspicious MBR at sector 0.
    Below is information based on typical questions you ask.
    diskutil list
    /dev/disk0   #:                       TYPE NAME                    SIZE        IDENTIFIER
       0:              GUID_partition_scheme                        *120.0 GB     disk0
       1:                                           EFI                         209.7 MB     disk0s1
       2:                         Apple_HFS Macintosh HD            78.5 GB     disk0s2
       3:                       Apple_Boot Recovery HD             650.0 MB     disk0s3
       4:                   Microsoft Basic Data                         31.7 GB      disk0s4  
    sudo gpt -r -vv show disk0
    gpt show: disk0: mediasize=120034123776; sectorsize=512; blocks=234441648
    gpt show: disk0: Suspicious MBR at sector 0
    gpt show: disk0: Pri GPT at sector 1
    gpt show: disk0: Sec GPT at sector 234441647
          start       size            index       contents
              0          1                             MBR
              1          1                             Pri GPT header
              2         32                            Pri GPT table
             34          6        
             40     409600           1            GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
         409640  153240016      2            GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      153649656    1269544     3            GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
      154919200   17628896        
      172548096   61892608    4            GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      234440704        911        
      234441615         32                       Sec GPT table
      234441647          1                        Sec GPT header
    sudo fdisk /dev/disk0
    Disk: /dev/disk0 geometry: 14593/255/63 [234441648 sectors]Signature: 0xAA55
             Starting       Ending
    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    1: EE    0   0   2 - 1023 254  63 [         1 -  172548095] <Unknown ID>
    *2: 07 1023 254  63 - 1023 254  63 [ 172548096 -   61892608] HPFS/QNX/AUX
    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused  
    sudo gdisk /dev/disk0
    GPT fdisk (gdisk) version 0.8.7
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    Found valid GPT with hybrid MBR; using GPT.
    Command (? for help): r
    Recovery/transformation command (? for help): h
    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
    just hit the Enter key at the below prompt and your MBR partition table will
    be untouched.
    Type from one to three GPT partition numbers, separated by spaces, to be
    added to the hybrid MBR, in sequence: 4
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
    Creating entry for GPT partition #4 (MBR partition #2)
    Enter an MBR hex code (default 07):
    Set the bootable flag? (Y/N): y
    Unused partition space(s) found. Use one to protect more partitions? (Y/N): n
    Recovery/transformation command (? for help): o
    Disk size is 234441648 sectors (111.8 GiB)
    MBR disk identifier: "DELETED INFO"
    MBR partitions:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                               1    172548095   primary     0xEE
       2           *     172548096    234440703   primary     0x07
    Recovery/transformation command (? for help): w
    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
    PARTITIONS!!
    Do you want to proceed? (Y/N): y
    OK; writing new GUID partition table (GPT) to /dev/disk2.
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully.

  • Executing a script using full path in ODT 11.1.0.5.10 beta?

    Using a query window from ODT 10x, I used to be able to run a script using '@' and the path to the script. For example: '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql'.
    Now I get the following error:
    Command '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql' is not supported in query window.
    I checked the documentation, but I couldn't find an alternative way to do this. Anyone know of any alternatives?

    Use VS.NET Tools menu->Run SQL*Plus Script->Specify the full path of your filename ->Select the connection->Hit the ok button.

Maybe you are looking for

  • Why does the migration wizard run every time I start up my mac after upgrading to mavericks ?

    After upgrading to Mavericks, I log in as normal but then a migration wizard starts up asking me where I want to import data from and create new accounts. Why and how do I stop it ?

  • Motorprise Application set-up for ATG - MultiUserUpdateFormHandler

    Hi There, I have installed ATG 10.1.1 on Windows 8 with Jdk 1.6 on Weblogic application server. I am trying to study the inbuilt application like Motorprise which is already provided with the ATG Application. However I am having some problem while lo

  • REG:http to webservice

    Hi , Iam new to XI and had developed a http to webservice scenario.when I send the request through http adapter Ian getting the response as an error <SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:Ad

  • Premiere CC is crashing anytime I try to move a clip on the timeline

    It also will crash by just selecting a clip. I've tried to identify any problem clips through a process of elimination, but it doesn't seem to be realetd to any specific footage. I am getting this error messge: [/ppro721/releases/2013.10/shared/adobe

  • Arch Vs HP Mini 100-4100

    Hi All, i'm a new user on Arch, i come from other distro's (debian/ubuntu - fedora) i spend the day following a lot of wiki's and guides in order to install Arch on my netbook. The problem is: X doesn't start. surely i made a lot mistake on the insta