Question: I would like to import my File Geodatabase from ArcGIS 10.1 into MS SQL Server 2012. 

I have never done it before, so I expect to do the import the same way as import data from excel table.

Problem is when I open MS SQL Server Import wizard and as a data source I choose Esri geodatabse OLE DB provider - an error occured:

*ClassFactory cannot get required class. (Microsoft OLE DB Service Components)*

Please does anybody know what I´m doing wrong, or is there some easiest way, for example with ArcSDE?

Answer: 
If you do have access to ArcSDE, then all of your conversion can be done within the ArcGIS Desktop/Arcpy kit of tools. For example, in ArcCatalog you simply right-click the feature class in your file GDB and select Export/Geodatabase (single or multiple items).

If you are not afraid of scripting, I would recommend [pyodbc](https://code.google.com/p/pyodbc/). You can use a [da.SearchCursor](http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000) to create an array of values using the SHAPE@WKT field option so your geometry is in WKT. This can be loaded into a temporary table in Sql Server as VARCHAR(MAX) which can then be loaded into your Sql Server table with a Geometry column.

This is a very brief arcpy sample and will not run on its own:

```
import arcpy, os, pyodbc
# a shapefile
par = (r'[your shapefile/gdb feature class path]')
# fields you want to include
fields = ['FID',[other fields...,] 'SHAPE@WKT']
# a query to limit records; useful for testing
qry = (r'FID < 100000')

# pyodbc connection to sql server 2012
cnxn = pyodbc.connect('driver={SQL Server Native Client 11.0};server=[server];'
                      'database=[dbname];Trusted_Connection=YES')
# define a cursor object
cursor = cnxn.cursor()
# create table query - #tmpPar is a temporary table
ctQry = ("""
Create Table #tmpPar (OID Int Not Null,[other fields...,] SHAPE Varchar(Max) NULL)
;""")

# create the temp table
cursor.execute(ctQry)
cnxn.commit()

# insert query; ? are parameter placeholders
itQry = ("""
Insert Into #tmpPar (OID,[fields...,]Shape)
Values (?,?,?);""")
# Query to Insert records from temp table into sql table
ipQry = ("""
Insert into [tablename] (ObjectId, [fields...,] Shape)
(Select OID, [fields...,] Shape From #tmpPar);""")

# use the search cursor of the shapefile to insert
# records into the temp table
rows = arcpy.da.SearchCursor(par,fields,qry)
for row in rows:
  cursor.execute(itQry, row[0], row[1], row[2])
  cnxn.commit()

# insert recs from tmpPar to sql server table
cursor.execute(ipQry)
cnxn.commit()

```

I see this question is a bit dated but perhaps someone else who is struggling with an approach will stumble on this and save some time.
You could also go via shape file (not the most elegant but gets the job done):
FileGeodatabase -> Export to ShapeFile - then use [Shape2SQL](http://www.sharpgis.net/page/SQL-Server-2008-Spatial-Tools.aspx) tool to import shape into Sql Server.