Create Enterprise Geodatabase with arcpy - No command options given

262
4
06-27-2014 11:10 PM
Highlighted
New Contributor
hi, I'm trying to create geodatabase using python first time. i used script in installation guide. but getting following error:

C:\Users\Administrator\Desktop\geodatbase.py: error: No command options given

Usage: geodatbase.py [Options]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
--DBMS=SQLSERVER Type of enterprise DBMS: SQLSERVER, ORACLE, or
POSTGRESQL.
-i MSSQLSERVER DBMS instance name
-D NGDB Database name: Not required for Oracle
--auth=DATABASE_AUTH Authentication type options (case-sensitive):
DATABASE_AUTH, OPERATING_SYSTEM_AUTH.
Default=DATABASE_AUTH
-U SA DBMS administrator user
-P sysadminpass DBMS administrator password
--schema=SDE_SCHEMA Schema Type for SQL Server geodatabase, SDE or DBO.
Default=SDE_SCHEMA
-u SDE Geodatabase administrator user name
-p SDEPASSWORD Geodatabase administrator password
-t Tablespace name
-l C:\PROGRAM FILES\ESRI\LICENSE10.2\SYSGEN\KEYCODES
Full path and name of authorization file

THANKS
0 Kudos
4 Replies
Highlighted
Occasional Contributor III
Hi,

it seems you are missing flag parameters such as '-D' '-U' '-t'....etc in your python code.

why not use the geo-processing tool in ArcCatalog: http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000r7000000


Regards,
0 Kudos
Highlighted
Esri Esteemed Contributor
The Python tool for Create Enterprise Geodatabase (Data Mangement) doesn't look anything
like what you've posted.  Instead, it looks like you used a trivial wrapper around the 'sdesetup'
utility (which isn't available in modern versions of ArcGIS). 

If you're using ArcGIS 10.1 or later, use the ArcPy tool; if you're using 10.0 or earlier, just use
the 'sdesetup' utility natively.  Either way, you're going to need to provide required parameters.

- V
0 Kudos
Highlighted
Occasional Contributor II
Hi jbatbayar,

The script you are running from the install guide takes in many parameters as the output shows. You just need to provide those for it to run - such as the type of DBMS (--DBMS), user name (-u), etc. It is in fact just a wrapper around the GP tool which you can also use.
0 Kudos
Highlighted
New Contributor
thanks all,

i used arcpy tool. thanks for useful information

Batbayar.J
0 Kudos