PL/SQL 101 : Cursors and SQL Projection

PL/SQL 101 : Cursors and SQL Projection
This is not a question, it's a forum article, in reponse to the number of questions we get regarding a "dynamic number of columns" or "rows to columns"
There are two integral parts to an SQL Select statement that relate to what data is selected. One is Projection and the other is Selection:-
Selection is the one that we always recognise and use as it forms the WHERE clause of the select statement, and hence selects which rows of data are queried.
The other, SQL Projection is the one that is less understood, and the one that this article will help to explain.
In short, SQL Projection is the collective name for the columns that are Selected and returned from a query.
So what? Big deal eh? Why do we need to know this?
The reason for knowing this is that many people are not aware of when SQL projection comes into play when you issue a select statement. So let's take a basic query...
First create some test data...
create table proj_test as
  select 1 as id, 1 as rn, 'Fred' as nm from dual union all
  select 1,2,'Bloggs' from dual union all
  select 2,1,'Scott' from dual union all
  select 2,2,'Smith' from dual union all
  select 3,1,'Jim' from dual union all
  select 3,2,'Jones' from dual
... and now query that data...
SQL> select * from proj_test;
         ID         RN NM
         1          1 Fred
         1          2 Bloggs
         2          1 Scott
         2          2 Smith
         3          1 Jim
         3          2 Jones
6 rows selected.
OK, so what is that query actually doing?
To know that we need to consider that all queries are cursors and all cursors are processed in a set manner, roughly speaking...
1. The cursor is opened
2. The query is parsed
3. The query is described to know the projection (what columns are going to be returned, names, datatypes etc.)
4. Bind variables are bound in
5. The query is executed to apply the selection and identify the data to be retrieved
6. A row of data is fetched
7. The data values from the columns within that row are extracted into the known projection
8. Step 6 and 7 are repeated until there is no more data or another condition ceases the fetching
9. The cursor is closed
The purpose of the projection being determined is so that the internal processing of the cursor can allocate memory etc. ready to fetch the data into. We won't get to see that memory allocation happening easily, but we can see the same query being executed in these steps if we do it programatically using the dbms_sql package...
CREATE OR REPLACE PROCEDURE process_cursor (p_query in varchar2) IS
  v_sql       varchar2(32767) := p_query;
  v_cursor    number;            -- A cursor is a handle (numeric identifier) to the query
  col_cnt     integer;
  v_n_val     number;            -- numeric type to fetch data into
  v_v_val     varchar2(20);      -- varchar type to fetch data into
  v_d_val     date;              -- date type to fetch data into
  rec_tab     dbms_sql.desc_tab; -- table structure to hold sql projection info
  dummy       number;
  v_ret       number;            -- number of rows returned
  v_finaltxt  varchar2(100);
  col_num     number;
BEGIN
  -- 1. Open the cursor
  dbms_output.put_line('1 - Opening Cursor');
  v_cursor := dbms_sql.open_cursor;
  -- 2. Parse the cursor
  dbms_output.put_line('2 - Parsing the query');
  dbms_sql.parse(v_cursor, v_sql, dbms_sql.NATIVE);
  -- 3. Describe the query
  -- Note: The query has been described internally when it was parsed, but we can look at
  --       that description...
  -- Fetch the description into a structure we can read, returning the count of columns that has been projected
  dbms_output.put_line('3 - Describing the query');
  dbms_sql.describe_columns(v_cursor, col_cnt, rec_tab);
  -- Use that description to define local datatypes into which we want to fetch our values
  -- Note: This only defines the types, it doesn't fetch any data and whilst we can also
  --       determine the size of the columns we'll just use some fixed sizes for this example
  dbms_output.put_line(chr(10)||'3a - SQL Projection:-');
  for j in 1..col_cnt
  loop
    v_finaltxt := 'Column Name: '||rpad(upper(rec_tab(j).col_name),30,' ');
    case rec_tab(j).col_type
      -- if the type of column is varchar2, bind that to our varchar2 variable
      when 1 then
        dbms_sql.define_column(v_cursor,j,v_v_val,20);
        v_finaltxt := v_finaltxt||' Datatype: Varchar2';
      -- if the type of the column is number, bind that to our number variable
      when 2 then
        dbms_sql.define_column(v_cursor,j,v_n_val);
        v_finaltxt := v_finaltxt||' Datatype: Number';
      -- if the type of the column is date, bind that to our date variable
      when 12 then
        dbms_sql.define_column(v_cursor,j,v_d_val);
        v_finaltxt := v_finaltxt||' Datatype: Date';
      -- ...Other types can be added as necessary...
    else
      -- All other types we'll assume are varchar2 compatible (implicitly converted)
      dbms_sql.DEFINE_COLUMN(v_cursor,j,v_v_val,2000);
      v_finaltxt := v_finaltxt||' Datatype: Varchar2 (implicit)';
    end case;
    dbms_output.put_line(v_finaltxt);
  end loop;
  -- 4. Bind variables
  dbms_output.put_line(chr(10)||'4 - Binding in values');
  null; -- we have no values to bind in for our test
  -- 5. Execute the query to make it identify the data on the database (Selection)
  -- Note: This doesn't fetch any data, it just identifies what data is required.
  dbms_output.put_line('5 - Executing the query');
  dummy := dbms_sql.execute(v_cursor);
  -- 6.,7.,8. Fetch the rows of data...
  dbms_output.put_line(chr(10)||'6,7 and 8 Fetching Data:-');
  loop
    -- 6. Fetch next row of data
    v_ret := dbms_sql.fetch_rows(v_cursor);
    -- If the fetch returned no row then exit the loop
    exit when v_ret = 0;
    -- 7. Extract the values from the row
    v_finaltxt := null;
    -- loop through each of the Projected columns
    for j in 1..col_cnt
    loop
      case rec_tab(j).col_type
        -- if it's a varchar2 column
        when 1 then
          -- read the value into our varchar2 variable
          dbms_sql.column_value(v_cursor,j,v_v_val);
          v_finaltxt := ltrim(v_finaltxt||','||rpad(v_v_val,20,' '),',');
        -- if it's a number column
        when 2 then
          -- read the value into our number variable
          dbms_sql.column_value(v_cursor,j,v_n_val);
          v_finaltxt := ltrim(v_finaltxt||','||to_char(v_n_val,'fm999999'),',');
        -- if it's a date column
        when 12 then
          -- read the value into our date variable
          dbms_sql.column_value(v_cursor,j,v_d_val);
          v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
      else
        -- read the value into our varchar2 variable (assumes it can be implicitly converted)
        dbms_sql.column_value(v_cursor,j,v_v_val);
        v_finaltxt := ltrim(v_finaltxt||',"'||rpad(v_v_val,20,' ')||'"',',');
      end case;
    end loop;
    dbms_output.put_line(v_finaltxt);
    -- 8. Loop to fetch next row
  end loop;
  -- 9. Close the cursor
  dbms_output.put_line(chr(10)||'9 - Closing the cursor');
  dbms_sql.close_cursor(v_cursor);
END;
SQL> exec process_cursor('select * from proj_test');
1 - Opening Cursor
2 - Parsing the query
3 - Describing the query
3a - SQL Projection:-
Column Name: ID                             Datatype: Number
Column Name: RN                             Datatype: Number
Column Name: NM                             Datatype: Varchar2
4 - Binding in values
5 - Executing the query
6,7 and 8 Fetching Data:-
1     ,1     ,Fred
1     ,2     ,Bloggs
2     ,1     ,Scott
2     ,2     ,Smith
3     ,1     ,Jim
3     ,2     ,Jones
1     ,3     ,Freddy
1     ,4     ,Fud
9 - Closing the cursor
PL/SQL procedure successfully completed.
So, what's really the point in knowing when SQL Projection occurs in a query?
Well, we get many questions asking "How do I convert rows to columns?" (otherwise known as a pivot) or questions like "How can I get the data back from a dynamic query with different columns?"
Let's look at a regular pivot. We would normally do something like...
SQL> select id
  2        ,max(decode(rn,1,nm)) as nm_1
  3        ,max(decode(rn,2,nm)) as nm_2
  4  from proj_test
  5  group by id
  6  /
        ID NM_1   NM_2
         1 Fred   Bloggs
         2 Scott  Smith
         3 Jim    Jones
(or, in 11g, use the new PIVOT statement)
but many of these questioners don't understand it when they say their issue is that, they have an unknown number of rows and don't know how many columns it will have, and they are told that you can't do that in a single SQL statement. e.g.
SQL> insert into proj_test (id, rn, nm) values (1,3,'Freddy');
1 row created.
SQL> select id
  2        ,max(decode(rn,1,nm)) as nm_1
  3        ,max(decode(rn,2,nm)) as nm_2
  4  from proj_test
  5  group by id
  6  /
        ID NM_1   NM_2
         1 Fred   Bloggs
         2 Scott  Smith
         3 Jim    Jones
... it's not giving us this 3rd entry as a new column and we can only get that by writing the expected columns into the query, but then what if more columns are added after that etc.
If we look back at the steps of a cursor we see again that the description and projection of what columns are returned by a query happens before any data is fetched back.
Because of this, it's not possible to have the query return back a number of columns that are based on the data itself, as no data has been fetched at the point the projection is required.
So, what is the answer to getting an unknown number of columns in the output?
1) The most obvious answer is, don't use SQL to try and pivot your data. Pivoting of data is more of a reporting requirement and most reporting tools include the ability to pivot data either as part of the initial report generation or on-the-fly at the users request. The main point about using the reporting tools is that they query the data first and then the pivoting is simply a case of manipulating the display of those results, which can be dynamically determined by the reporting tool based on what data there is.
2) The other answer is to write dynamic SQL. Because you're not going to know the number of columns, this isn't just a simple case of building up a SQL query as a string and passing it to the EXECUTE IMMEDIATE command within PL/SQL, because you won't have a suitable structure to read the results back into as those structures must have a known number of variables for each of the columns at design time, before the data is know. As such, inside PL/SQL code, you would have to use the DBMS_SQL package, just like in the code above that showed the workings of a cursor, as the columns there are referenced by position rather than name, and you have to deal with each column seperately. What you do with each column is up to you... store them in an array/collection, process them as you get them, or whatever. They key thing though with doing this is that, just like the reporting tools, you would need to process the data first to determine what your SQL projection is, before you execute the query to fetch the data in the format you want e.g.
create or replace procedure dyn_pivot is
  v_sql varchar2(32767);
  -- cursor to find out the maximum number of projected columns required
  -- by looking at the data
  cursor cur_proj_test is
    select distinct rn
    from   proj_test
    order by rn;
begin
  v_sql := 'select id';
  for i in cur_proj_test
  loop
    -- dynamically add to the projection for the query
    v_sql := v_sql||',max(decode(rn,'||i.rn||',nm)) as nm_'||i.rn;
  end loop;
  v_sql := v_sql||' from proj_test group by id order by id';
  dbms_output.put_line('Dynamic SQL Statement:-'||chr(10)||v_sql||chr(10)||chr(10));
  -- call our DBMS_SQL procedure to process the query with it's dynamic projection
  process_cursor(v_sql);
end;
SQL> exec dyn_pivot;
Dynamic SQL Statement:-
select id,max(decode(rn,1,nm)) as nm_1,max(decode(rn,2,nm)) as nm_2,max(decode(rn,3,nm)) as nm_3 from proj_test group by id order by id
1 - Opening Cursor
2 - Parsing the query
3 - Describing the query
3a - SQL Projection:-
Column Name: ID                             Datatype: Number
Column Name: NM_1                           Datatype: Varchar2
Column Name: NM_2                           Datatype: Varchar2
Column Name: NM_3                           Datatype: Varchar2
4 - Binding in values
5 - Executing the query
6,7 and 8 Fetching Data:-
1     ,Fred                ,Bloggs              ,Freddy
2     ,Scott               ,Smith               ,
3     ,Jim                 ,Jones               ,
9 - Closing the cursor
PL/SQL procedure successfully completed.
... and if more data is added ...
SQL> insert into proj_test (id, rn, nm) values (1,4,'Fud');
1 row created.
SQL> exec dyn_pivot;
Dynamic SQL Statement:-
select id,max(decode(rn,1,nm)) as nm_1,max(decode(rn,2,nm)) as nm_2,max(decode(rn,3,nm)) as nm_3,max(decode(rn,4,nm)) as nm_4 from proj_test group by id order by id
1 - Opening Cursor
2 - Parsing the query
3 - Describing the query
3a - SQL Projection:-
Column Name: ID                             Datatype: Number
Column Name: NM_1                           Datatype: Varchar2
Column Name: NM_2                           Datatype: Varchar2
Column Name: NM_3                           Datatype: Varchar2
Column Name: NM_4                           Datatype: Varchar2
4 - Binding in values
5 - Executing the query
6,7 and 8 Fetching Data:-
1     ,Fred                ,Bloggs              ,Freddy              ,Fud
2     ,Scott               ,Smith               ,                    ,
3     ,Jim                 ,Jones               ,                    ,
9 - Closing the cursor
PL/SQL procedure successfully completed.
Of course there are other methods, using dynamically generated scripts etc. (see Re: 4. How do I convert rows to columns?), but the above simply demonstrates that:-
a) having a dynamic projection requires two passes of the data; one to dynamically generate the query and another to actually query the data,
b) it is not a good idea in most cases as it requires code to handle the results dynamically rather than being able to simply query directly into a known structure or variables, and
c) a simple SQL statement cannot have a dynamic projection.
Most importantly, dynamic queries prevent validation of your queries at the time your code is compiled, so the compiler can't check that the column names are correct or the tables names, or that the actual syntax of the generated query is correct. This only happens at run-time, and depending upon the complexity of your dynamic query, some problems may only be experienced under certain conditions. In effect you are writing queries that are harder to validate and could potentially have bugs in them that would are not apparent until they get to a run time environment. Dynamic queries can also introduce the possibility of SQL injection (a potential security risk), especially if a user is supplying a string value into the query from an interface.
To summarise:-
The projection of an SQL statement must be known by the SQL engine before any data is fetched, so don't expect SQL to magically create columns on-the-fly based on the data it's retrieving back; and, if you find yourself thinking of using dynamic SQL to get around it, just take a step back and see if what you are trying to achieve may be better done elsewhere, such as in a reporting tool or the user interface.
Other articles in the PL/SQL 101 series:-
PL/SQL 101 : Understanding Ref Cursors
PL/SQL 101 : Exception Handling

excellent article. However there is one thing which is slightly erroneous. You don't need a type to be declared in the database to fetch the data, but you do need to declare a type;
here is one of my unit test scripts that does just that.
DECLARE
PN_CARDAPPL_ID NUMBER;
v_Return Cci_Standard.ref_cursor;
type getcardapplattrval_recordtype
Is record
(cardappl_id ci_cardapplattrvalue.cardappl_ID%TYPE,
tag ci_cardapplattrvalue.tag%TYPE,
value ci_cardapplattrvalue.value%TYPE
getcardapplattrvalue_record getcardapplattrval_recordtype;
BEGIN
PN_CARDAPPL_ID := 1; --value must be supplied
v_Return := CCI_GETCUSTCARD.GETCARDAPPLATTRVALUE(
PN_CARDAPPL_ID => PN_CARDAPPL_ID
loop
fetch v_return
into getcardapplattrvalue_record;
dbms_output.put_line('Cardappl_id=>'||getcardapplattrvalue_record.cardappl_id);
dbms_output.put_line('Tag =>'||getcardapplattrvalue_record.tag);
dbms_output.put_line('Value =>'||getcardapplattrvalue_record.value);
exit when v_Return%NOTFOUND;
end loop;
END;

Similar Messages

  • How to switch between SQL Server Express and SQL Server Evaluation

    I have both SQL Server Express and SQL Server Evaluation installed on my laptop. 
    I am wondering how to start SQL Server Evaluation; when I click All Programs > SQL Server Management Studio, I always get SQL Server Express (which I installed on my laptop a couple years ago). 
    I just downloaded SQL Server Evaluation (a couple days ago). 
    Whenever I try to access SQL Server Evaluation, I always seem to get SQL Server Express. 
    Sorry if this is a trivial thing; I just can’t seem to get it to work (and I Googled for a solution before posting this).
    Thanks everyone!!

    Ah!  It worked!!  This is great!!  It seems like I can connect to my version of SQL Server Evaluation, named 'EXCEL-PC\EXCEL'.
    Somehow, though, I seem to keep getting errors in my BIDS when I try to run an SSIS project.  See below:
    Ah!  It worked!!  This is great!!  It seems like I can connect to my version of SQL Server Evaluation, named 'EXCEL-PC\EXCEL'.
    I am getting an error that VS is unable to load a document:
    BIDS has to be installed by one of these editions of SQL Server 2008: Standard, Enterprise, Developer, or Evaluation. 
    To install BIDS, run SQL Server Setup and select Business Intelligence Development Studio.
    #1)  I recently downloaded and installed SQL Server Evaluation (specifically for the opportunity to try using BIDS and learn about this technology).
    #2)  When I run BIDS > SSIS, I get the error I described above. 
    #3)  I have had SQL Server Express installed for a couple years on my laptop
    So, my question is this: is it possible that BIDS > SSIS is picking up my SQL Server Express, instead of SQL Server Evaluation? 
    If so, how can I get BIDS to point to SQL Server Evaluation? 
    You can see in the image above that I have my BIDS Data Connections pointing to EXCEL-PC\EXCEL, which is the name of my SQL Server Evaluation. 
    Is this correct?  Why doesn’t this work? 
    I’ve spent some considerable time on this.  I’m close to just uninstalling EVERYTHING pertaining to SLQ Server, and just reinstalling SQL Server Evaluation, but this will take some time, and I don’t necessarily want
    to get rid of my SQL Server Express.  However, if that’s the only way to get this working, then that’s what I’ll do.
    I’d greatly appreciate any insight into this!!

  • SQL server service and SQL agent service

    Hi all. If I am going to use a Domain User to start SQl server service and SQL agent service,
    does the domain user need to  be SYSADMIN ????

    No. not at all required.
    Service account should have below permissions to start SQL service and Agent services.
    Log on as a service (SeServiceLogonRight)
    Replace a process-level token (SeAssignPrimaryTokenPrivilege)
    Bypass traverse checking (SeChangeNotifyPrivilege)
    Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
    Permission to start SQL Writer
    Permission to read the Event Log service
    Permission to read the Remote Procedure Call service
    Also please go though the below URL for more information:
    http://msdn.microsoft.com/en-us/library/ms143504.aspx#Windows

  • SQL server 2014 and Sql 2012 installation on VMWare machine

    Hi ,
    Please let me know Can we Install SQL Server 2014 RTM version and SQL Server 2012 SP1 On Vmare machine version 9.
    Does it Supports on VMware 9 . If yes please give me the links .
    Thanks a lot

    Hello,
    You can find that on VMware Web site for their high end products only as you can see in the following URL. For VMware
    9 you won't find it.
    http://www.vmware.com/resources/compatibility/sim/interop_matrix.php
    VMware 9 is a PC product that basically allows to install any product that works on Windows 8 and Windows Server 2012 or earlier. VMware 9 introduces support for Windows 8 and Windows 2012.
    So, SQL Server 2012 and SQL Server 2012 should install on Windows 8/Windows 2012 RTM with no issues on a VMware 9 virtual machine. Earlier operating systems may require installation of service packs and updates as explained on the following URLs.
    https://msdn.microsoft.com/en-us/library/ms143506(v=sql.120).aspx
    https://msdn.microsoft.com/en-us/library/ms143506(v=sql.110).aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to add sql server (SQLEXPRESS) AND sql server Agent(SQLEXPRESS) in sql server Configuration Manager

    When I had uninstall Sql Server 2008 R2, that time I had uninstalled instances (SQLEXPRESS and MSSQLSERVER) and again installed sql server 2008 r2 setup .
    Before uninstalling from control panel >Uninstall program showed two setups 
    1) Microsoft sql server  2) Microsoft sql server R2 , I uninstalled both. 
    As i installed SQL R2 again, it is showing only 1 instance ie "Microsoft sql server R2" but the other instance is some how missing -"Microsoft sql server" and 
    also sql server (SQLEXPRESS)  AND sql server Agent(SQLEXPRESS)  services from sql server configuration manager are missing
    How to retain the missing instance and the above services? 
    Plz give replay

    Hi Tushar,
    I need to ask you a question here. 
    Why you require SQL Express edition on your machine, if there is no need you can safely ignore it and continue using SQL Server 2008 R2 edition.
    Express edition can also get installed if you happen to have installed Visual Studio 2010 for instance.
    If you need it then you must install SQL Server Express edition, It is a freeware and can be download from Microsoft website.
    BR, Shashikant

  • SQL Server Setup Failure 0x84B10001 (SQL 2012 SP2 and SQL 2014 Standard)

    I'm having a problem with SQL Server Setup. I had SQL Server 2012 R2 SP1 installed, and the SP2 installer would fail.
    I decided to just get SQL Server 2014. The setup (and system configuration checker) for that fails with the same error.
    SQL Server Setup failure
    SQL Server Setup has encountered the following error:
    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747.
    Error code 0x84B10001
    I found this and other posts about similar problems that point at MSDE being the cause.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bc9f4949-1b45-427c-aa2b-d2222488a13e/problems-installing-sql-server-2012error-code-0x84b10001?forum=sqlexpress
    I definitely had MSDE installed, but I went through the steps to manually remove it and rebooted with no luck.
    /* Don Reynolds */

    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.SqlBrowserExtension.sqlBrowserStopServicePrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.SqlBrowserExtension.sqlBrowserStopServicePrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.SqlBrowserExtension.sqlBrowserStopServicePrivateConfig.xsd' loaded
    into datastore path '/Datastore/ProductSettings/SqlBrowserStopService/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPublicConfigObject.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPublicConfigObjectDefault.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPublicConfigObjectDefault.xml' validated with schema 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPublicConfigObject.xsd' loaded into datastore path '/Datastore/ProductSettings/Sku/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPrivateConfigObject.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPrivateConfigObjectDefault.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPrivateConfigObjectDefault.xml' validated with schema 'Microsoft.SqlServer.Configuration.SetupExtension.SkuPrivateConfigObject.xsd' loaded into datastore path '/Datastore/ProductSettings/Sku/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Repl_ConfigExtension.ReplPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Repl_ConfigExtension.ReplPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Repl_ConfigExtension.ReplPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.Repl_ConfigExtension.ReplPrivateSettings.xsd' loaded into datastore path
    '/Datastore/ProductSettings/Repl/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPublicDefaultSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPublicDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPublicDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPublicDefaultSettings.xsd' loaded into datastore
    path '/Datastore/ProductSettings/SqlRSSHP/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPrivateDefaultSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.RSSHPExtension.SqlRSSHPConfigPrivateDefaultSettings.xsd' loaded into
    datastore path '/Datastore/ProductSettings/SqlRSSHP/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPublicDefaultSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPublicDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPublicDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPublicDefaultSettings.xsd' loaded into datastore path
    '/Datastore/ProductSettings/SqlRS/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPrivateDefaultSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSConfigPrivateDefaultSettings.xsd' loaded into datastore path
    '/Datastore/ProductSettings/SqlRS/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSDBConfigPrivateDefaultSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSDBConfigPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSDBConfigPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.RSExtension.SqlRSDBConfigPrivateDefaultSettings.xsd' loaded into datastore
    path '/Datastore/ProductSettings/SqlRS/DBPrivate'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPublicSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPublicDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPublicDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPublicSettings.xsd'
    loaded into datastore path '/Datastore/ProductSettings/ManagementTools/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsPrivateSettings.xsd'
    loaded into datastore path '/Datastore/ProductSettings/ManagementTools/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPublicSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPublicDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPublicDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPublicSettings.xsd'
    loaded into datastore path '/Datastore/ProductSettings/ManagementToolsAdvanced/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.ManagementToolsExtension.ManagementToolsAdvancedPrivateSettings.xsd'
    loaded into datastore path '/Datastore/ProductSettings/ManagementToolsAdvanced/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ControllerPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ControllerPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ControllerPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ControllerPrivateSettings.xsd' loaded
    into datastore path '/Datastore/ProductSettings/DReplayController/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ClientPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ClientPrivateDefaultSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ClientPrivateDefaultSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.DistributedReplayExtension.ClientPrivateSettings.xsd' loaded into
    datastore path '/Datastore/ProductSettings/DReplayClient/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPrivateConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPrivateConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterDisk/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPublicConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPublicConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterDiskPublicConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterDisk/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPrivateConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPrivateConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterGroup/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPublicConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPublicConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterGroupPublicConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterGroup/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPrivateConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPrivateConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterIPAddresses/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterIPAddresses/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePrivateConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePrivateConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/FailOverClusterName/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePublicConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePublicConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.FailoverInstanceNamePublicConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/FailoverClusterName/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePrivateConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePrivateConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePrivateConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePrivateConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterNode/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePublicConfig.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePublicConfig.xml' validated with schema 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodePublicConfig.xsd' loaded into datastore path '/Datastore/ProductSettings/ClusterNode/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.SlpExtension.SQLServerSCPPrivateSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.SlpExtension.SQLServerSCPPrivateSettings.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.SlpExtension.SQLServerSCPPrivateSettings.xml' validated with schema 'Microsoft.SqlServer.Configuration.SlpExtension.SQLServerSCPPrivateSettings.xsd' loaded into datastore path '/Datastore/ProductSettings/SQLServerSCP/Private'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodesStatusPublicConfig.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.Cluster.ClusterNodesStatusPublicConfig.xml' loaded into datastore path '/Datastore/ProductSettings/ClusterNodesStatus/Public'
    (01) 2014-07-02 10:52:57 Slp: Reading schema resource 'Microsoft.SqlServer.Configuration.ASExtension.ASSPIInputSettings.xsd'
    (01) 2014-07-02 10:52:57 Slp: Reading XML resource 'Microsoft.SqlServer.Configuration.ASExtension.ASSPIInputSettingsDefaults.xml'
    (01) 2014-07-02 10:52:57 Slp: Document 'Microsoft.SqlServer.Configuration.ASExtension.ASSPIInputSettingsDefaults.xml' validated with schema 'Microsoft.SqlServer.Configuration.ASExtension.ASSPIInputSettings.xsd' loaded into datastore path '/Datastore/ProductSettings/ASSIP/Public'
    (01) 2014-07-02 10:52:57 Slp: Completed Action: LoadPackageDatastoreObjects, returned True
    (01) 2014-07-02 10:52:57 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:57 Slp: Running Action: InitializeInputSettingStore
    (01) 2014-07-02 10:52:57 Slp: Completed Action: InitializeInputSettingStore, returned True
    (01) 2014-07-02 10:52:57 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:57 Slp: Running Action: InitializeRoleService
    (01) 2014-07-02 10:52:57 Slp: Loading role: SPI_AS_NewFarm
    (01) 2014-07-02 10:52:58 Slp: Loading role: SPI_AS_ExistingFarm
    (01) 2014-07-02 10:52:58 Slp: Loading role: AllFeatures_WithDefaults
    (01) 2014-07-02 10:52:58 Slp: Completed Action: InitializeRoleService, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ProcessChainerCommandLineArguments
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: WORKFLOW
    (01) 2014-07-02 10:52:58 Slp: Value specified: RUNRULES
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: NotSpecified
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: TIMESTAMP
    (01) 2014-07-02 10:52:58 Slp: Value specified: 20140702_105236
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: Default
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: LOGMARKER
    (01) 2014-07-02 10:52:58 Slp: Value specified:
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: Default
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: MEDIASOURCE
    (01) 2014-07-02 10:52:58 Slp: Value specified: R:\
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: NotSpecified
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: INSTALLMEDIAPATH
    (01) 2014-07-02 10:52:58 Slp: Value specified: R:\x64\setup\
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: NotSpecified
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: ENU
    (01) 2014-07-02 10:52:58 Slp: Value specified: True
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: Default
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: MEDIALAYOUT
    (01) 2014-07-02 10:52:58 Slp: Value specified: Full
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: Default
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: ACTION
    (01) 2014-07-02 10:52:58 Slp: Value specified: RUNRULES
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: NotSpecified
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: RULES
    (01) 2014-07-02 10:52:58 Slp: Value specified: SCCCheckRules
    (01) 2014-07-02 10:52:58 Slp: New setting source: CommandLine; previous setting source: Default
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Completed Action: ProcessChainerCommandLineArguments, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ProcessMediaChainerConfigFileArguments
    (01) 2014-07-02 10:52:58 Slp: Procssing media configuration file R:\x64\setup\..\DefaultSetup.ini.
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Setting: PID
    (01) 2014-07-02 10:52:58 Slp: New setting source: ConfigFile; previous setting source: NotSpecified
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Completed Action: ProcessMediaChainerConfigFileArguments, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ProcessChainerConfigFileArguments
    (01) 2014-07-02 10:52:58 Slp: Completed Action: ProcessChainerConfigFileArguments, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ProcessSlipstreamParameters
    (01) 2014-07-02 10:52:58 Slp: Completed Action: ProcessSlipstreamParameters, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Skipping Action: SetRoleAndUIModeForExpressMedia
    (01) 2014-07-02 10:52:58 Slp: Action is being skipped due to the following restrictions:
    (01) 2014-07-02 10:52:58 Slp: Condition "IsMediaExpress" did not pass as it returned false and true was expected.
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: InitializeRetryHandler
    (01) 2014-07-02 10:52:58 Slp: Completed Action: InitializeRetryHandler, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ExecuteBootstrapProcessInputSettings
    (01) 2014-07-02 10:52:58 Slp: Workflow to execute: 'BOOTSTRAPPROCESSINPUTSETTINGS'
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: StartSqmSession
    (01) 2014-07-02 10:52:58 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
    (01) 2014-07-02 10:52:58 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\120
    (01) 2014-07-02 10:52:58 Slp: Sco: Attempting to get registry value CustomerFeedback
    (01) 2014-07-02 10:52:58 Slp: SQM Service: Sqm does not have active session.
    (01) 2014-07-02 10:52:58 Slp: SQM is opted-out by command line parameter /SQMREPORTING or registry key setting, SQM session is closed
    (01) 2014-07-02 10:52:58 Slp: Completed Action: StartSqmSession, returned True
    (01) 2014-07-02 10:52:58 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:58 Slp: Running Action: ValidateChainerSetting
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Compute new PID
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Read lcid 1033 from CultureInfo
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:58 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ValidateChainerSetting, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: ProcessFeatureCommandLineArguments
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ProcessFeatureCommandLineArguments, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: ProcessMediaFeatureConfigFileArguments
    (01) 2014-07-02 10:52:59 Slp: Procssing media configuration file R:\x64\setup\..\DefaultSetup.ini.
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ProcessMediaFeatureConfigFileArguments, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: ProcessFeatureConfigFileArguments
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ProcessFeatureConfigFileArguments, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: ValidateSettingsAgainstScenario
    (01) 2014-07-02 10:52:59 Slp: Scenario: RunRules
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ValidateSettingsAgainstScenario, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: FinalCalculateSettings
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid is normalizing input pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid
    (01) 2014-07-02 10:52:59 Slp: -- PidInfoProvider : Use cached PID
    (01) 2014-07-02 10:52:59 Slp: Completed Action: FinalCalculateSettings, returned True
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ExecuteBootstrapProcessInputSettings, returned True
    (01) 2014-07-02 10:52:59 Slp: Completed Action: ExecuteBootstrapAfterExtensionsLoaded, returned True
    (01) 2014-07-02 10:52:59 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:52:59 Slp: Running Action: RunRemoteDiscoveryAction
    (01) 2014-07-02 10:52:59 Slp: Running discovery on local machine
    (01) 2014-07-02 10:53:03 Slp: Error: Action "Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction" threw an exception during execution.
    (01) 2014-07-02 10:53:03 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747. ---> Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException:
    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747. ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747.
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseNumericCharRef(Boolean expand, BufferBuilder internalSubsetBuilder, EntityType& entityType)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseElement()
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
    (01) 2014-07-02 10:53:03 Slp:    at System.Xml.XmlDocument.Load(XmlReader reader)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(String xml, XmlSchema schema, String namespacePrefix, String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:03 Slp:    --- End of inner exception stack trace ---
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(String xml, XmlSchema schema, String namespacePrefix, String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(XmlDocument doc, XmlSchema schema, String namespacePrefix, String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
    (01) 2014-07-02 10:53:03 Slp:    --- End of inner exception stack trace ---
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    (01) 2014-07-02 10:53:03 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    (01) 2014-07-02 10:53:03 Slp: Received request to add the following file to Watson reporting: c:\temp\tmpFEEB.tmp
    (01) 2014-07-02 10:53:03 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
    (01) 2014-07-02 10:53:03 Slp: Inner exceptions are being indented
    (01) 2014-07-02 10:53:03 Slp:
    (01) 2014-07-02 10:53:03 Slp: Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
    (01) 2014-07-02 10:53:03 Slp:     Message:
    (01) 2014-07-02 10:53:03 Slp:         '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747.
    (01) 2014-07-02 10:53:03 Slp:     HResult : 0x84b10001
    (01) 2014-07-02 10:53:03 Slp:         FacilityCode : 1201 (4b1)
    (01) 2014-07-02 10:53:03 Slp:         ErrorCode : 1 (0001)
    (01) 2014-07-02 10:53:03 Slp:     Stack:
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(String xml, XmlSchema schema, String namespacePrefix, String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(XmlDocument doc, XmlSchema schema, String namespacePrefix, String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.SqlDiscoveryDatastoreInterface.LoadData(IEnumerable`1 machineNames, String discoveryDocRootPath, String clusterDiscoveryDocRootPath)
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
    (01) 2014-07-02 10:53:03 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
    (01) 2014-07-02 10:53:03 Slp:     Inner exception type: System.Xml.XmlException
    (01) 2014-07-02 10:53:03 Slp:         Message:
    (01) 2014-07-02 10:53:03 Slp:                 '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747.
    (01) 2014-07-02 10:53:03 Slp:         HResult : 0x80131940
    (01) 2014-07-02 10:53:03 Slp:         Stack:
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32&
    charCount, EntityType& entityType)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseNumericCharRef(Boolean expand, BufferBuilder internalSubsetBuilder, EntityType& entityType)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseAttributes()
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseElement()
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlTextReaderImpl.ParseElementContent()
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
    (01) 2014-07-02 10:53:03 Slp:                 at System.Xml.XmlDocument.Load(XmlReader reader)
    (01) 2014-07-02 10:53:03 Slp:                 at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument(String xml, XmlSchema schema, String namespacePrefix,
    String namespaceUri, String rootPath)
    (01) 2014-07-02 10:53:08 Slp: Watson Bucket 2
     Original Parameter Values
    (01) 2014-07-02 10:53:08 Slp: Parameter 0 : SQL Server
    2014@RTM@
    (01) 2014-07-02 10:53:08 Slp: Parameter 1 : Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.LoadXmlDocument
    (01) 2014-07-02 10:53:08 Slp: Parameter 2 : System.Xml.XmlTextReaderImpl.Throw
    (01) 2014-07-02 10:53:08 Slp: Parameter 3 :
    Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException@1201@1
    (01) 2014-07-02 10:53:08 Slp: Parameter 4 :
    System.Xml.XmlException@-2146232000
    (01) 2014-07-02 10:53:08 Slp: Parameter 5 : RunRemoteDiscoveryAction
    (01) 2014-07-02 10:53:08 Slp:
     Final Parameter Values
    (01) 2014-07-02 10:53:08 Slp: Parameter 0 : SQL Server
    2014@RTM@
    (01) 2014-07-02 10:53:08 Slp: Parameter 1 : 0xDBE3EAAC
    (01) 2014-07-02 10:53:08 Slp: Parameter 2 : 0x066FCAFD
    (01) 2014-07-02 10:53:08 Slp: Parameter 3 :
    0xDF039760@1201@1
    (01) 2014-07-02 10:53:08 Slp: Parameter 4 : 0x5539C151
    (01) 2014-07-02 10:53:08 Slp: Parameter 5 : RunRemoteDiscoveryAction
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Wow6432Node_Microsoft_Microsoft SQL Server.reg_
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Wow6432Node_Microsoft_Windows_CurrentVersion_Uninstall.reg_
    (01) 2014-07-02 10:53:09 Slp: Sco: Attempting to write hklm registry key MSSQLServer to file C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140702_105236\Registry_SOFTWARE_Wow6432Node_Microsoft_MSSQLServer.reg_
    (01) 2014-07-02 10:53:10 Slp: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 231747.
    (01) 2014-07-02 10:53:10 Slp: Watson bucket for exception based failure has been created
    (01) 2014-07-02 10:53:10 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
    (01) 2014-07-02 10:53:10 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\120
    (01) 2014-07-02 10:53:10 Slp: Sco: Attempting to get registry value EnableErrorReporting
    (01) 2014-07-02 10:53:10 Slp: WER: Successfully read app consent from registry Software\Microsoft\Microsoft SQL Server\120\EnableErrorReporting=.
    (01) 2014-07-02 10:53:10 Slp: WER: Application level consent value '' was mapped to consent status 'WerConsentNotAsked'
    (01) 2014-07-02 10:53:12 Slp: WER: Result of the submission:: 'WerReportCancelled'
    (01) 2014-07-02 10:53:12 Slp: WER: Submitted 1 of 1 failures to the Watson data repository
    (01) 2014-07-02 10:53:12 Slp:
    (01) 2014-07-02 10:53:12 Slp: ----------------------------------------------------------------------
    (01) 2014-07-02 10:53:12 Slp:
    (01) 2014-07-02 10:53:12 Slp: Error result: -2068774911
    (01) 2014-07-02 10:53:12 Slp: Result facility code: 1201
    (01) 2014-07-02 10:53:12 Slp: Result error code: 1
    (01) 2014-07-02 10:53:12 Slp: SQM Service: Sqm does not have active session.
    /* Don Reynolds */

  • Differernce between SQL Tuning Pack and SQL Tuning Advisor, Access Advisor

    Hi. all.
    I have been using "TKPROF" in order to tune SQL till now.
    I am learning 10g, and would like to know the difference
    between "1. SQL Tuning Pack" and "2. SQL Tuning Advisor, Access Advisor".
    Are they same thing? If not, what are the differences in their "functionality"?
    All I know is that SQL Tuning Pack is not free, and SQL Tuning Advisor
    is packed with default installation. Right???
    Could you give me some html links or your "any advice and experience"?
    Thanks in advance. Have a good day.
    Best Regards.

    Hi,
    There are alternatives to the Oracle tuning packs, and remember the SQL advisors are relatuively simple, finding missing indexes and recommending MV's.
    A human can do a better job if you use the right techniques.
    BTW, you can get a SQLTuning advisor license online for only $3k:
    http://www.dba-oracle.com/oracle_news/2005_3_17_dql_tuning_access_advisor_licenses_available_online.htm
    SHAMELESS PITCH! - I wrote a book that describes techniques for tuning with scripts, instead of the advisors, if you are interested:
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press author

  • Question regarding the execution of cursors and SQL statements

    Hi,
    I have cursor which fetches results from a table A.
    Now, simultaneously, in other session, I ran an update on the table A and commited it.
    1) My question is will the cursor keep fetching the old results or the cursor start fetching the new values when the data is committed?
    2) I have a similar question in SQL too. We generally write SQL queries which take considerable amount of time- around half an hour. During this time, I ran an update on the table and committed it. Will the result set contain the old values ?
    As per my knowledge, both should fetch the old values.
    But, I would like to get my beliefs reinforced.
    Thanks for your help.
    Don

    donisback wrote:
    Thanks John..
    Your post drives me to ask another question. We've been getting the error "Snapshot Too Old" quite frequently.
    So, we minimized the SQL and used cursor committing every 10000 records. This prevented the above error.
    Is there any other possible reason why we get the error "Snapshot too Old"?
    Thanks,
    DonDon:
    Typically, commiting more frequently increases the likelyhood of 1555, not decreases it. The 1555 error comes when the undo (or rollback in old terms) records that need to be read to support read consistency are no longer available. Simplistically, once a change has been committed, the undo records are marked as available for re-use and could be re-used thereby destroying the information that you need.
    Even though ithe initial question is really old, read the Ask Tom thread posted by RPuttagunta. Tom explains it far better than I could, and the basic concepts have not changed.
    John
    John

  • Changing sql server service and sql server agent service startup account in SQL Server hosting SharePoint DB

    Hi 
    i have a sharepoint deployment with one SQL Server (running on VM) hosting the config DB and another SQL Server (Physical Host because VM was running out of space) to host the huge Content DBs. I need to schedule automatic backups of the Content DBs to a
    network share. For that i need to run the SQL Server Service with an account having permissions to the share as suggested in https://support.microsoft.com/kb/207187?wa=wsignin1.0
    I tried changing the logon as a service account to a domain
    account which has permissions to the Network Share and is also in local Administrators group of SQL Server and has "public and sysadmin" roles in SQL Server but that caused an issue. the SharePoint Web Application started showing a White Screen so
    I had to revert back to the default accounts i.e. NT Service\SQLSERVERAGENT and NT Service\MSSQLSERVER. I viewed the event logs . These are the types of error i got after changing the logon as a service account to a domain account
    1) Information Rights Management (IRM): Retried too many times to initialize IRM client. Cannot retry more. Retried times is:0x5.
    System
    Provider
    [ Name]
    Microsoft-SharePoint Products-SharePoint Foundation
    [ Guid]
    {6FB7E0CD-52E7-47DD-997A-241563931FC2}
    EventID
    5148
    Version
    15
    Level
    2
    Task
    9
    Opcode
    0
    Keywords
    0x4000000000000000
    TimeCreated
    [ SystemTime]
    2015-02-02T04:46:04.750899500Z
    EventRecordID
    176477
    Correlation
    [ ActivityID]
    {8FACE59C-1E17-50D0-7135-25FDB824CDBE}
    Execution
    [ ProcessID]
    6912
    [ ThreadID]
    8872
    Channel
    Application
    Computer
    Security
    [ UserID]
    S-1-5-21-876248814-3204482948-604612597-111753
    EventData
    hex0
    0x5
    2)
    Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below.
    The target principal name is incorrect.  Cannot generate SSPI context.
    System
    Provider
    [ Name]
    Microsoft-SharePoint Products-SharePoint Foundation
    [ Guid]
    {6FB7E0CD-52E7-47DD-997A-241563931FC2}
    EventID
    5586
    Version
    15
    Level
    2
    Task
    3
    Opcode
    0
    Keywords
    0x4000000000000000
    TimeCreated
    [ SystemTime]
    2015-02-02T07:01:35.843757700Z
    EventRecordID
    176490
    Correlation
    [ ActivityID]
    {50B4E59C-5E3A-50D0-7135-22AD91909F02}
    Execution
    [ ProcessID]
    6912
    [ ThreadID]
    5452
    Channel
    Application
    Computer
    Security
    [ UserID]
    S-1-5-17
    EventData
    int0
    0
    string1
    The target principal name is incorrect. Cannot generate SSPI context.

    Hi Aparna,
    According to your description, you get the above two errors when scheduling backups of Content DB. Right?
    Based on those two error messages, they are related to the service principal name(SPN) for SQL Server service. Please verify the if the SPN is registered successfully. You can view it in ADSI Edit or use command line. Please see:
    http://blogs.msdn.com/b/psssql/archive/2010/03/09/what-spn-do-i-use-and-how-does-it-get-there.aspx
    When installing SQL Server, those two services below should be registered:
            MSSQLSvc/servername:1433      
            MSSQLSvc/servername
    Please check if those SPNs or duplicated SPNs exist. You can use command to reset SPN or remove duplicated SPN and add new one. See:
    Setspn.
    We have also met this issue when this SPN is registered under Administrator. Please try to register it under Computer. You can add it in ADSI Edit.
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Request: PL/SQL, External Table and SQL Loader

    I see lately Questions asked in SQL and PL/SQL forum regarding SQL Loader and External Table are being moved to {forum:id=732}.
    Being an PL/SQL developer for some time now i feel External Table (and if i may, SQL Loader and DBMS_DATAPUMP) are very much an integral part of a PL/SQL development and the question related to these topics are well suited in SQL and PL/SQL forum. Even in SQL and PL/SQL FAQ we have exclusive content that discuss on these topics {message:id=9360007}
    So i would like to request the moderators to consider not moving such questions out of the SQL and PL/SQL forum.
    Thanks,
    Karthick.

    Karthick_Arp wrote:
    I see lately Questions asked in SQL and PL/SQL forum regarding SQL Loader and External Table are being moved to {forum:id=732}.
    Being an PL/SQL developer for some time now i feel External Table (and if i may, SQL Loader and DBMS_DATAPUMP) are very much an integral part of a PL/SQL development and the question related to these topics are well suited in SQL and PL/SQL forum. Even in SQL and PL/SQL FAQ we have exclusive content that discuss on these topics {message:id=9360007}
    So i would like to request the moderators to consider not moving such questions out of the SQL and PL/SQL forum.
    Thanks,
    Karthick.Not sure which moderators are moving them... cos it ain't me. I'm quite happy to leave those there.

  • SQL Loader Truncate and SQL TRUNCATE difference

    Could any one let me know what is difference between truncate used by control file of the SQL Loader and TRUNCATE command used by SQL? Is there any impact or difference of these both over the data files.
    Thanks

    Mr Jens I think TRUNCATE in SQLLDR control file reuses extents, unlike SQL TRUNCATE command. In my opinion it is best to truncate these to show the normal usage of these tables, not the elevated values.
    Could you please further comment?

  • SQL 2014 RTM and Sql 2008r2 standard side by side installation ..

    We are planning on reconfiguring our database server and then installing SQL 2008 R2 Standard edition in a side by side installation with SQL 2014 RTM. I have researched a little, and have not seen any major issues when planning this type of configuration.
    Are there any issues that may occur with this?
    2008 R2 will be in the default instance, and 2014 will be using a named instance. We do foresee uninstalling 2008 R2 after a period of time, and moving all of our databases to 2014 after testing has been performed. Once we uninstall 2008 R2, will we be able
    to install a default instance of 2014? Are there any special steps that need to be taken to do that?

    Hello,
    If possible install the SQL Server 2008 R2 instance first, then install SQL Server 2014. Through the years, the formula
    of installing the older versions of SQL Server first has proved to be a winner for me.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Records and Objects, Cast for PL/SQL Type RECORD and SQL Type OBJECT

    Hi seniors:
    In my job, we have Oracle 10g, programming with Packages, the parameters are PL/SQL Types,
    Example:
    PACKAGE BODY NP_CONTROL_EQUIPMENT_PKG
    IS
    TYPE TR_EQUIPMENT_OPERATION IS RECORD(
    wn_npequipmentoperid CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npequipmentoperid%TYPE,
    wv_npactiveservicenumber CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npactiveservicenumber%TYPE,
    wv_npspecification ORDERS.NP_SPECIFICATION.npspecification%TYPE,
    wv_nptype ORDERS.NP_SPECIFICATION.nptype%TYPE,
    wn_nporderid CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.nporderid%TYPE,
    wn_npguidenumber CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npguidenumber%TYPE,
    wd_npdevolutionprogramdate CONTROL_EQUIPMENT.NP_EQUIPMENT_STATUS.npdevolutionprogramdate%TYPE
    TYPE TT_TR_EQUIPMENT_OPERATION_LST IS TABLE OF TR_EQUIPMENT_OPERATION INDEX BY BINARY_INTEGER;
    PROCEDURE SP_GET_EQUIPMENT_OPERATION_LST(
    an_npequipstatid IN CONTROL_EQUIPMENT.NP_EQUIPMENT_STATUS.npequipstatid%TYPE,
    at_equipment_operation_list OUT TT_TR_EQUIPMENT_OPERATION_LST,
    av_message OUT VARCHAR2
    IS
    BEGIN
    SELECT EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate
    BULK COLLECT INTO at_equipment_operation_list
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    EXCEPTION
    WHEN OTHERS THEN
    av_message := 'NP_CONTROL_EQUIPMENT_PKG.SP_GET_EQUIPMENT_OPERATION_LST: '||SQLERRM;
    END SP_GET_EQUIPMENT_OPERATION_LST;
    END;
    Procedures calls other procedures and passing parameters IN OUT defined that PL/SQL Types. The problem appears when the access is through Java. Java can't read PL/SQL Types because only read SQL Types (Types defined in SCHEMA):
    CREATE OR REPLACE
    TYPE TO_EQUIPMENT_OPERATION AS OBJECT (
    wn_npequipmentoperid NUMBER,
    wv_npactiveservicenumber VARCHAR2(15),
    wv_npspecification VARCHAR2(8),
    wv_nptype VARCHAR2(2),
    wn_nporderid NUMBER,
    wn_npguidenumber NUMBER,
    wd_npdevolutionprogramdate DATE
    CREATE OR REPLACE
    TYPE TT_EQUIPMENT_OPERATION_LST
    AS TABLE OF "CONTROL_EQUIPMENT"."TO_EQUIPMENT_OPERATION"
    Java can read this SQL Types. The problem is how cast OBJECT to RECORD, because I can't execute that:
    DECLARE
    wt_operation_lst TT_EQUIPMENT_OPERATION_LST;
    BEGIN
    SELECT EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate
    BULK COLLECT INTO wt_operation_lst
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    END;
    and throws NOT ENOUGH VALUES, and I modified to:
    DECLARE
    wt_operation_lst TT_EQUIPMENT_OPERATION_LST;
    BEGIN
    SELECT TO_EQUIPMENT_OPERATION(EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate)
    BULK COLLECT INTO wt_operation_lst
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    END;
    Worst is that I can't modify this procedure and PL/SQL Types will survive.
    I have create a copy that CAST RECORD to OBJECT and OBJECT to RECORD too.
    PROCEDURE SP_COPY_PLSQL_TO_SQL(
    an_npequipstatid IN NUMBER,
    at_dominio_lst OUT ORDERS.TT_EQUIPMENT_OPERATION_LST, --SQL Type
    av_message OUT VARCHAR2
    IS
    wt_dominio_lst CONTROL_EQUIPMENT.NP_CONTROL_EQUIPMENT_PKG.TT_TR_EQUIPMENT_OPERATION_LST; --PL/SQL Type
    BEGIN
    SP_GET_EQUIPMENT_OPERATION_LST(an_npequipstatid, wt_dominio_lst, av_message);
    IF av_message IS NULL THEN
    at_dominio_lst := ORDERS.TT_EQUIPMENT_OPERATION_LST(ORDERS.TO_EQUIPMENT_OPERATION('','','','','','',''));
    at_dominio_lst.EXTEND(wt_dominio_lst.COUNT - 1);
    FOR i IN 1..wt_dominio_lst.COUNT LOOP
    at_dominio_lst(i) := ORDERS.TO_EQUIPMENT_OPERATION(wt_dominio_lst(i).wn_npequipmentoperid,
    wt_dominio_lst(i).wv_npactiveservicenumber,
    wt_dominio_lst(i).wv_npspecification,
    wt_dominio_lst(i).wv_nptype,
    wt_dominio_lst(i).wn_nporderid,
    wt_dominio_lst(i).wn_npguidenumber,
    wt_dominio_lst(i).wd_npdevolutionprogramdate
    END LOOP;
    END IF;
    END;
    I would like that the CAST is direct. Somebody can help me?. Thank you so much!

    I am facing the same problem as u had...may I know how u solved ur probkem...
    thanks,
    kishore

  • Pl/sql bound variable and SQL statement

    Hi,
    I'm using the Additional pl/sql tab to display the outcome of an sql query in the report header as adding <#MYCOLUMN.FIELD#> in the header section does not work.
    The code I have is:
    loop
    if (l_arg_names(i) = 'carry_forumid') then
    htp.p('The Forum is '||l_arg_values(i));
    end if;
    end loop;
    However, I need to query the outcome of the loop:
    declare
    store_forum_name varchar2(32767);
    begin
    select name into store_forum_name from df.forum where forum.id = l_arg_names(i);
    htp.p(store_forum_name);
    end;
    Does anyone know how the combine the two? Just not sure how to arrange the code/order it should be written. Thanks for the help.

    Hi,
    I'm using the Additional pl/sql tab to display the outcome of an sql query in the report header as adding <#MYCOLUMN.FIELD#> in the header section does not work.
    The code I have is:
    loop
    if (l_arg_names(i) = 'carry_forumid') then
    htp.p('The Forum is '||l_arg_values(i));
    end if;
    end loop;
    However, I need to query the outcome of the loop:
    declare
    store_forum_name varchar2(32767);
    begin
    select name into store_forum_name from df.forum where forum.id = l_arg_names(i);
    htp.p(store_forum_name);
    end;
    Does anyone know how the combine the two? Just not sure how to arrange the code/order it should be written. Thanks for the help.

  • How to repair database using SQL server 2008 and C#

    How to repair database in SQL server 2008 using C#
    Musakkhir Sayyed.

    Unfortunately your post is off topic as it's not specific to SQL Server Samples and Community Projects.  
    This is a standard response I’ve written in advance to help the many people who post their question in this forum in error, but please don’t ignore it.  The links I provide below will help you determine the right forum to ask your
    question in.
    For technical issues with Microsoft products that you would run into as an end user, please visit the Microsoft Answers forum ( http://answers.microsoft.com ) which has sections for Windows, Hotmail,
    Office, IE, and other products.
    For Technical issues with Microsoft products that you might have as an IT professional (like technical installation issues, or other IT issues), please head to the TechNet Discussion forums at http://social.technet.microsoft.com/forums/en-us, and
    search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), please head to the MSDN discussion forums at http://social.msdn.microsoft.com/forums/en-us, and
    search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here: http://community.dynamics.com/
    If you think your issue is related to SQL Server Samples and Community Projects and I've flagged it as Off-topic, I apologise.  Please repost your question and include as much detail as possible about your problem so that someone can assist you further. 
    If you really have no idea where to post your question please visit the Where is the forum for…? forum http://social.msdn.microsoft.com/forums/en-us/whatforum/
    When you see answers and helpful posts, please click Vote As Helpful,
    Propose As Answer, and/or Mark As Answer
    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCSA, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Twitter: @Mr_Wharty
    MC ID:
    Microsoft Transcript

Maybe you are looking for