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.
Of course, the result still fail but we can see the blue screen message now.
Based 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.
After change it from STA to IDE, the system can be normally boot now.
不必問我是誰,我就像您一樣:僅是位平凡人,但卻想在人生旅途上留下生活的足跡! 哪怕是過程跌跌撞撞、經歷風風雨雨,只要有您的關注,就是我最大的欣慰與成就!!! 感謝您的蒞臨:) 下一個職涯十年信念:不到最後關頭,決不輕言放棄!!!
2012年4月28日 星期六
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
After download,extract and execute “SQL2000SampleDB.msi” by following the wizard, the extracted files will be put on “C:\SQL Server 2000 Sample Database”.For 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”
Open Microsoft SQL Server Management Studio and Right-Click Database, select “Attach” item in menu so that Attach Databases windows will show up now.
In Attach Database window,click “Add” button, select “Northwind.MDF” next to click “OK” button to complete this selection.
So does that the Northwind database will be mounted and online now.
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
After download,extract and execute “SQL2000SampleDB.msi” by following the wizard, the extracted files will be put on “C:\SQL Server 2000 Sample Database”.For 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”
Open Microsoft SQL Server Management Studio and Right-Click Database, select “Attach” item in menu so that Attach Databases windows will show up now.
In Attach Database window,click “Add” button, select “Northwind.MDF” next to click “OK” button to complete this selection.
So does that the Northwind database will be mounted and online now.
標籤:
技術---SQL_Server
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”
Select the right value as Connection, SQLSourceType, FileConnection next to click “OK” button
(5).Create SSIS Variable and configure the related setting
Create Variable
In main menu, select “SSIS” –> "Variables”
Click Control Flow surface anywhere next to click “Add Variables” button
Key in “strFile” Name and select “String” Data Type
Configure Foreach Loop Container
Right-Click the “Foreach Loop Container” to select “Edit…” in menu or Double-Click “Foreach Loop Container”
Click “Collection”, select “C:\SQLFILE” Folder and assign “ *.sql ” Files
Click “Variable Mappings”, select “User::strFile” variable and click “OK” button
Configure Connection Manager
Click “SQLFILE” Connection ---> Managers, Expresssions ---> “…” button
The property Expressions Editor will show up
Select “Connection String” in Property and click “…” button
Drag and Paste “User::strFile” from Variables to “Expression” surface next to click “OK” button
So does that “@[User::strFile]” will show on Expression now.
(6).Create file format with SQL languageIn “C:\SQLFILE” path, create “three” SQL Server Query File
In each file, the content is as follows
(7).Build and Start with debugging
When we execute “Build and Start” this SSIS package, the result is successful.
In Microsoft SQL Server Management Studio, the table “TestSQLTask” will be created and the value will be inserted now.
Right-Click the second “Execute SQL Task” to select “Edit…” in menu or Double-Click “Execute SQL Task”
Select the right value as Connection, SQLSourceType, FileConnection next to click “OK” button
(5).Create SSIS Variable and configure the related setting
Create Variable
In main menu, select “SSIS” –> "Variables”
Click Control Flow surface anywhere next to click “Add Variables” button
Key in “strFile” Name and select “String” Data Type
Configure Foreach Loop Container
Right-Click the “Foreach Loop Container” to select “Edit…” in menu or Double-Click “Foreach Loop Container”
Click “Collection”, select “C:\SQLFILE” Folder and assign “ *.sql ” Files
Click “Variable Mappings”, select “User::strFile” variable and click “OK” button
Configure Connection Manager
Click “SQLFILE” Connection ---> Managers, Expresssions ---> “…” button
The property Expressions Editor will show up
Select “Connection String” in Property and click “…” button
Drag and Paste “User::strFile” from Variables to “Expression” surface next to click “OK” button
So does that “@[User::strFile]” will show on Expression now.
(6).Create file format with SQL languageIn “C:\SQLFILE” path, create “three” SQL Server Query File
In each file, the content is as follows
(7).Build and Start with debugging
When we execute “Build and Start” this SSIS package, the result is successful.
In Microsoft SQL Server Management Studio, the table “TestSQLTask” will be created and the value will be inserted now.
標籤:
技術---SQL_Server
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.
(1).Design Control Flow
As before, I firstly open “SQL Server Business Intelligence Development Studio” and create a new Integration Services Project.
Drag the first “Execute SQL Task” object from Control Flow in left tool to designer surface
Drag the “Foreach Loop Container” object from Control Flow in left tool to designer surface
Drag the second “Execute SQL Task” object from Control Flow into the inner “Foreach Loop Container” object
Drag a green arrow in the first “Execute SQL Task” to “Foreach Loop Container” object
So does that I have already finished the initial “Control Flow Design”
(2).Create Connection ManagerOLE DB Connection
Right-click Connection Manager surface next to select “New OLE DB Connection…” in menu
Click “New” button
Select the right value as Provider, Server Name, Authentication, Database Name and click “OK” button if “Test Connection” is normal.
Finally, it will create a new Connection Managers as “TEST-SQL-03.AdventureWorks”
File ConnectionRight-click Connection Manager surface next to select “New File Connection…” in menu
Select the right value as Usage type, Folder and click “OK” button
Finally, it will create a new Connection Managers as “SQLFILE”
(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”
Select the right value as Connection Type, Connection, SQLSourceType and click SQLStatement button
Write down T-SQL language for creating Testing Table if it no exit and inserting some value to this Table
(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.
(1).Design Control Flow
As before, I firstly open “SQL Server Business Intelligence Development Studio” and create a new Integration Services Project.
Drag the first “Execute SQL Task” object from Control Flow in left tool to designer surface
Drag the “Foreach Loop Container” object from Control Flow in left tool to designer surface
Drag the second “Execute SQL Task” object from Control Flow into the inner “Foreach Loop Container” object
Drag a green arrow in the first “Execute SQL Task” to “Foreach Loop Container” object
So does that I have already finished the initial “Control Flow Design”
(2).Create Connection ManagerOLE DB Connection
Right-click Connection Manager surface next to select “New OLE DB Connection…” in menu
Click “New” button
Select the right value as Provider, Server Name, Authentication, Database Name and click “OK” button if “Test Connection” is normal.
Finally, it will create a new Connection Managers as “TEST-SQL-03.AdventureWorks”
File ConnectionRight-click Connection Manager surface next to select “New File Connection…” in menu
Select the right value as Usage type, Folder and click “OK” button
Finally, it will create a new Connection Managers as “SQLFILE”
(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”
Select the right value as Connection Type, Connection, SQLSourceType and click SQLStatement button
Write down T-SQL language for creating Testing Table if it no exit and inserting some value to this Table
標籤:
技術---SQL_Server
訂閱:
文章 (Atom)
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.
©Copyright Davidwa Inc. All rights reserved.