網頁

2012年4月28日 星期六

Virtualbox Blue Screen 0x0000007B

Recently, I study a article that it said someone successfully install VMWare and Virtualbox on the same computer. It is good news for me because I need Virtualbox to mount VHD from Hyper-V created. If it can do it, I don’t need to switch the different environment to select boot menu to either VMWAR or Hyper-V.

After creating VM on Virtualbox and opening the existing VHD disk in process, it always reboot repeatedly when power on VM. For realizing what happen, I press F8 right-now after pass BIOS. So does that we can choose “Disable automatic restart on system failure” in the Advanced Boot Options.
ScreenHunter_24 Apr. 26 16.50Of course, the result still fail but we can see the blue screen message now.
ScreenHunter_18 Apr. 26 16.30Based on error condition “0x0000007B” by Google, some information said maybe need to change the Virtualbox Storage Controller because it is set as SATA by default.
ScreenHunter_19 Apr. 26 16.34After change it from STA to IDE, the system can be normally boot now.
ScreenHunter_20 Apr. 26 16.35

2012年4月25日 星期三

Install Northwind database on SQL Server 2008 R2

I have a lab for testing Bulk Insert Task in SSIS. According to this example, it need to access Northwind Database.
Due to my environment is SQL Server 2008 R2,it has already never exist this naming database since SQL Server 2005. So I want to know whether is can install Northwind sample database on SQL Server 2008 R2.

I search this database from Microsoft Website and find where it can be downloaded from
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23654
ScreenHunter_04 Apr. 25 14.30After download,extract and execute “SQL2000SampleDB.msi” by following the wizard, the extracted files will be put on “C:\SQL Server 2000 Sample Database”.ScreenHunter_05 Apr. 25 14.42For quickly complete this job, I will copy “Northwind.MDF” & “Northwind.LDF” to the SQL Server default database file location as “C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA”
ScreenHunter_06 Apr. 25 14.44Open Microsoft SQL Server Management Studio and Right-Click Database, select “Attach” item in menu so that Attach Databases windows will show up now.
ScreenHunter_07 Apr. 25 14.49In Attach Database window,click “Add” button, select “Northwind.MDF” next to click “OK” button to complete this selection.
ScreenHunter_09 Apr. 25 15.05So does that the Northwind database will be mounted and online now.
ScreenHunter_11 Apr. 25 15.14

2012年4月24日 星期二

Simple Execute SQL Task in SSIS (part 2 of 2)

(4).Configure the second “Execute SQL Task” object
Right-Click the second “Execute SQL Task” to select “Edit…” in menu or Double-Click “Execute SQL Task”
ScreenHunter_22 Apr. 20 20.06Select the right value as Connection, SQLSourceType, FileConnection next to click “OK” button
ScreenHunter_34 Apr. 20 20.40(5).Create SSIS Variable and configure the related setting
Create Variable

In main menu, select “SSIS” –> "Variables”
ScreenHunter_24 Apr. 20 20.15Click Control Flow surface anywhere next to click “Add Variables” button
ScreenHunter_27 Apr. 20 20.25Key in “strFile” Name and select “String” Data Type
ScreenHunter_28 Apr. 20 20.27Configure Foreach Loop Container
Right-Click the “Foreach Loop Container” to select “Edit…” in menu or Double-Click “Foreach Loop Container”
ScreenHunter_32 Apr. 20 20.32Click “Collection”, select “C:\SQLFILE” Folder and assign “ *.sql ” Files
ScreenHunter_13 Apr. 24 15.25Click “Variable Mappings”, select “User::strFile”  variable and click “OK” button
ScreenHunter_33 Apr. 20 20.33Configure Connection Manager
Click “SQLFILE” Connection --->  Managers, Expresssions ---> “…” button
ScreenHunter_02 Apr. 24 14.51The property Expressions Editor will show up
ScreenHunter_03 Apr. 24 14.57Select “Connection String” in Property and click “…” button
ScreenHunter_04 Apr. 24 14.58Drag and Paste “User::strFile” from Variables to “Expression” surface next to click “OK” button
ScreenHunter_05 Apr. 24 15.03So does that “@[User::strFile]” will show on Expression now.
ScreenHunter_06 Apr. 24 15.07(6).Create file format with SQL languageIn “C:\SQLFILE” path, create “three” SQL Server Query File
ScreenHunter_07 Apr. 24 15.12In each file, the content is as follows
ScreenHunter_08 Apr. 24 15.14ScreenHunter_09 Apr. 24 15.14ScreenHunter_10 Apr. 24 15.15(7).Build and Start with debugging
When we execute “Build and Start” this SSIS package, the result is successful.
ScreenHunter_14 Apr. 24 15.29In Microsoft SQL Server Management Studio, the table “TestSQLTask” will be created and the value will be inserted now.
ScreenHunter_15 Apr. 24 15.30

Simple Execute SQL Task in SSIS (part 1 of 2)

I want to do a SQL Task in SSI to realize “Execute SQL Task” mechanism. The scenario is
  (i). The first SQL Task is for creating table and import data if the table doesn’t exist
  (ii). The second SQL Task import data by executing sql language in Foreach Loop Container
For do it, I will use the AdventureWorks as example database.
ScreenHunter_01 Apr. 20 12.02(1).Design Control Flow
As before, I firstly open “SQL Server Business Intelligence Development Studio” and create a new Integration Services Project.
ScreenHunter_02 Apr. 20 13.42Drag the first “Execute SQL Task” object from Control Flow in left tool to designer surface
ScreenHunter_03 Apr. 20 13.57Drag the “Foreach Loop Container” object from Control Flow in left tool to designer surface
ScreenHunter_04 Apr. 20 14.00Drag the second “Execute SQL Task” object from Control Flow into the inner “Foreach Loop Container” object
ScreenHunter_05 Apr. 20 14.05Drag a green arrow in the first “Execute SQL Task” to “Foreach Loop Container” object
ScreenHunter_06 Apr. 20 14.09So does that I have already finished the initial “Control Flow Design”
ScreenHunter_07 Apr. 20 14.12(2).Create Connection ManagerOLE DB Connection
Right-click Connection Manager surface next to select “New OLE DB Connection…” in menu
ScreenHunter_08 Apr. 20 16.08Click “New” button
ScreenHunter_09 Apr. 20 16.12Select the right value as Provider, Server Name, Authentication, Database Name and click “OK” button if “Test Connection” is normal.
ScreenHunter_10 Apr. 20 16.13Finally, it will create a new Connection Managers as “TEST-SQL-03.AdventureWorks”
ScreenHunter_12 Apr. 20 16.14File ConnectionRight-click Connection Manager surface next to select “New File Connection…” in menu
ScreenHunter_13 Apr. 20 16.36Select the right value as Usage type, Folder and click “OK” button
ScreenHunter_16 Apr. 20 16.38Finally, it will create a new Connection Managers as “SQLFILE”
ScreenHunter_17 Apr. 20 16.38(3).Configure the first “Execute SQL Task” objectRight-Click the first “Execute SQL Task” to select “Edit…” in menu or Double-Click “Execute SQL Task”
ScreenHunter_18 Apr. 20 16.57Select the right value as Connection Type, Connection, SQLSourceType and click SQLStatement button
ScreenHunter_19 Apr. 20 19.14Write down T-SQL language for creating Testing Table if it no exit and inserting some value to this Table
ScreenHunter_20 Apr. 20 19.56
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.