[web2py] Re: MSSQL connection
The official book is a good place to start - have you reviewed that yet? http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Dependencies On Wednesday, December 21, 2016 at 11:13:17 PM UTC-5, Steve Lyle wrote: > > Hi guys. > Newbie (of sorts) here. > 20+ years in programming including Python but not for a couple of years > now. > > But now I have the first time opportunity to build my application in > web2py ~ so not a newbie but yes a web2py newbie. > > Any quick start guides/guide for dummys style for adapting the default > application to connect to MSSQL? > You reference will be appreciated. > > If I remember from prior python work that even though the module is call > '..odbc' is doesn't really use odbc does it?!? > > Thanks. > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mssql connection URGENT!
Thank you for the reply. I found that that problem was why it doesn't accept IP Address instead of Named Instance and fixed the SQL Server configuration to use static IP to connect SQL Server. I can't connect to my servers SQL database via an IP Address http://dba.stackexchange.com/questions/62165/i-cant-connect-to-my-servers-sql-database-via-an-ip-address Problem Solved! On Monday, February 2, 2015 at 1:33:35 PM UTC-6, Massimo Di Pierro wrote: The problem is that since you did not specify a name for the .table files you get default (nobody does). default is a hash of the db uri so if you change it the .table files break. If this is just a change in the name but the tables are already in the database, the you should enable a fake_migration ( http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#migrate--fake_migrate) so that new .table files are created. If this is a new database, you need to enable migrations (I see they are disabled for you). Make sure you do not change the database schema until this is resolved else there is no way for me to tell in which state you db and your .table are. Massimo On Monday, 2 February 2015 08:29:23 UTC-6, Omi Chiba wrote: The below connection statement was working fine and the SQL Servers's instance was HELPDESK/HELPDESK. dbh = DAL(mssql2://username:password@HELPDESK/HS2000CS, migrate_enabled=False) Now, our vendor change the name of instance to HELPDESK/HELPDESK_VM. I tried, dbh = DAL(mssql2://username:password@[HELPDESK/HELPDESK_VM]/HS2000CS, migrate_enabled=False) dbh = DAL(mssql2://username:password@10.30.6.222/HS2000CS, migrate_enabled=False) SQL Server is in our local network and 10.30.6.222 is the local ip address. but both doesn't work. It's in production and I need to fix in a few hours. Please help! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mssql connection URGENT!
Thanks! On Monday, February 2, 2015 at 3:06:05 PM UTC-6, Niphlod wrote: uhm. Technically having more than one instance of mssql running on the same ip is possible (multiple named instances) but it involves a totally different connection handshake. If you don't specify different port numbers, you can still have them dynamic but you have to resort to have SQL Server Browser running on the server and specifying a connection using the odbc connectionstring notation (mssql://{Driver={SQL Server};Server=hostname\instancename;..}), that will trigger that new handshakeeverything works fine, I use it every day. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mssql connection URGENT!
uhm. Technically having more than one instance of mssql running on the same ip is possible (multiple named instances) but it involves a totally different connection handshake. If you don't specify different port numbers, you can still have them dynamic but you have to resort to have SQL Server Browser running on the server and specifying a connection using the odbc connectionstring notation (mssql://{Driver={SQL Server};Server=hostname\instancename;..}), that will trigger that new handshakeeverything works fine, I use it every day. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mssql connection URGENT!
The problem is that since you did not specify a name for the .table files you get default (nobody does). default is a hash of the db uri so if you change it the .table files break. If this is just a change in the name but the tables are already in the database, the you should enable a fake_migration (http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#migrate--fake_migrate) so that new .table files are created. If this is a new database, you need to enable migrations (I see they are disabled for you). Make sure you do not change the database schema until this is resolved else there is no way for me to tell in which state you db and your .table are. Massimo On Monday, 2 February 2015 08:29:23 UTC-6, Omi Chiba wrote: The below connection statement was working fine and the SQL Servers's instance was HELPDESK/HELPDESK. dbh = DAL(mssql2://username:password@HELPDESK/HS2000CS, migrate_enabled=False) Now, our vendor change the name of instance to HELPDESK/HELPDESK_VM. I tried, dbh = DAL(mssql2://username:password@[HELPDESK/HELPDESK_VM]/HS2000CS, migrate_enabled=False) dbh = DAL(mssql2://username:password@10.30.6.222/HS2000CS, migrate_enabled=False) SQL Server is in our local network and 10.30.6.222 is the local ip address. but both doesn't work. It's in production and I need to fix in a few hours. Please help! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: mssql connection
Thank you... / will try feedback .. :) On Thursday, November 14, 2013 5:14:12 AM UTC+7, Derek wrote: Possible... Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified. This usually happens in one of the following scenarios: - you referenced your connection incorrectly (e.g. spelled the DSN name, or one of the DSN-less string components wrong); - you referenced a DSN that doesn't exist; - the user connecting to the DSN or DSN-less connection doesn't have access to the information stored in the registry (see KB #306345http://support.microsoft.com/default.aspx/kb/306345 ); - you used an English or localized driver detail for your connection string when your system is not set up in that language (see KB #174655http://support.microsoft.com/default.aspx/kb/174655); or, - you are missing the connection string entirely (this can happen if you maintain your connection string in a session variable, and your sessions aren't working; see Article #2157http://www.aspfaq.com/show.asp?id=2157 ). http://tutorials.aspfaq.com/8000x-errors/80004005-errors.html On Tuesday, November 12, 2013 9:03:05 PM UTC-7, Cacpacific O wrote: Hello Tim, Thank you for sharing. I've try as your advice but it still return error message as follow, Is it possible that there is something wrong with my odbc setup. :) db = DAL('mssql://UserName:passw...@203.xxx.xx.xxx\SQLExpress/myDatabase', lazy_tables=True, pool_size=10) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/www-data/web2py/gluon/dal.py, line 7562, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/www-data/web2py/gluon/dal.py, line 3279, in __init__ if do_connect: self.reconnect() File /home/www-data/web2py/gluon/dal.py, line 627, in reconnect self.connection = f() File /home/www-data/web2py/gluon/dal.py, line 3277, in connector return self.driver.connect(cnxn,**driver_args) Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') On Wednesday, November 13, 2013 5:27:55 AM UTC+7, Tim Richardson wrote: Here is a working example using server authentication on a server called win2003, with a sqlserver instance name hcnsql07 and connecting to a database called hcn using default ports (I've added a couple of other parameters for performance. Investigate lazy_tables, it makes a huge difference. ) db_ps_1TE = DAL('mssql://tim:password@win2003\hcnsql07/hcn', lazy_tables=True, pool_size=10) On Monday, 11 November 2013 07:10:43 UTC+11, Ariya Owam-aram wrote: Dear all, I have to connect mssql database which is locate on another server by using pyodbc. It working if connect by using pyodbc.connect(DNS=dns;UID=user_name;PWD=password) pyodbc.Connection at 0x391bdc0 But I can't connect with DAL() db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase) return error as follow Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') As searching from web2py google group, I also try: db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase?Driver={FreeTDS}) return error as follow Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') --- in my /etc/odbc.ini [TS] Description=ODBC Connection via FreeTDS Driver=FreeTDS Server=203.xxx.xx.xxx port=1433 Database=myDatabase --- in my /etc/odbcinst.ini [FreeTDS] Description=FreeTDS Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/freetds.conf ### Did not change anything ### --- in my /etc/freetds/tds.driver.template [TDS] Description = FreeTDS Driver for Linux MSSQL on Win32 Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/tds.dsn.template [DSN_NAME] Description = Descripton of you DSN connection. Driver = TDS Trace = No Database= myDatabase Server = 203.xxx.xx.xxx Port= 1433 TDS_Version = 8.0 Thank you very much Ariya -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop
[web2py] Re: mssql connection
Possible... Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified. This usually happens in one of the following scenarios: - you referenced your connection incorrectly (e.g. spelled the DSN name, or one of the DSN-less string components wrong); - you referenced a DSN that doesn't exist; - the user connecting to the DSN or DSN-less connection doesn't have access to the information stored in the registry (see KB #306345http://support.microsoft.com/default.aspx/kb/306345 ); - you used an English or localized driver detail for your connection string when your system is not set up in that language (see KB #174655http://support.microsoft.com/default.aspx/kb/174655); or, - you are missing the connection string entirely (this can happen if you maintain your connection string in a session variable, and your sessions aren't working; see Article #2157http://www.aspfaq.com/show.asp?id=2157 ). http://tutorials.aspfaq.com/8000x-errors/80004005-errors.html On Tuesday, November 12, 2013 9:03:05 PM UTC-7, Cacpacific O wrote: Hello Tim, Thank you for sharing. I've try as your advice but it still return error message as follow, Is it possible that there is something wrong with my odbc setup. :) db = DAL('mssql://UserName:passw...@203.xxx.xx. javascript:xxx\SQLExpress/myDatabase', lazy_tables=True, pool_size=10) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/www-data/web2py/gluon/dal.py, line 7562, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/www-data/web2py/gluon/dal.py, line 3279, in __init__ if do_connect: self.reconnect() File /home/www-data/web2py/gluon/dal.py, line 627, in reconnect self.connection = f() File /home/www-data/web2py/gluon/dal.py, line 3277, in connector return self.driver.connect(cnxn,**driver_args) Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') On Wednesday, November 13, 2013 5:27:55 AM UTC+7, Tim Richardson wrote: Here is a working example using server authentication on a server called win2003, with a sqlserver instance name hcnsql07 and connecting to a database called hcn using default ports (I've added a couple of other parameters for performance. Investigate lazy_tables, it makes a huge difference. ) db_ps_1TE = DAL('mssql://tim:password@win2003\hcnsql07/hcn', lazy_tables=True, pool_size=10) On Monday, 11 November 2013 07:10:43 UTC+11, Ariya Owam-aram wrote: Dear all, I have to connect mssql database which is locate on another server by using pyodbc. It working if connect by using pyodbc.connect(DNS=dns;UID=user_name;PWD=password) pyodbc.Connection at 0x391bdc0 But I can't connect with DAL() db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase) return error as follow Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') As searching from web2py google group, I also try: db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase?Driver={FreeTDS}) return error as follow Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') --- in my /etc/odbc.ini [TS] Description=ODBC Connection via FreeTDS Driver=FreeTDS Server=203.xxx.xx.xxx port=1433 Database=myDatabase --- in my /etc/odbcinst.ini [FreeTDS] Description=FreeTDS Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/freetds.conf ### Did not change anything ### --- in my /etc/freetds/tds.driver.template [TDS] Description = FreeTDS Driver for Linux MSSQL on Win32 Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/tds.dsn.template [DSN_NAME] Description = Descripton of you DSN connection. Driver = TDS Trace = No Database= myDatabase Server = 203.xxx.xx.xxx Port= 1433 TDS_Version = 8.0 Thank you very much Ariya -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit
[web2py] Re: mssql connection
@derek: except that he's using unixodbc ^_^ Anyway, googling [unixODBC][Driver Manager]Data source name not found leads you to several hundreds blogposts on the matter. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: mssql connection
Regardless, it's the same message just a different driver manager. I'd say one of the settings being passed just won't work for mssql express, i'd guess 'pooling'. On Wednesday, November 13, 2013 3:25:38 PM UTC-7, Niphlod wrote: @derek: except that he's using unixodbc ^_^ Anyway, googling [unixODBC][Driver Manager]Data source name not found leads you to several hundreds blogposts on the matter. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: mssql connection
Here is a working example using server authentication on a server called win2003, with a sqlserver instance name hcnsql07 and connecting to a database called hcn using default ports (I've added a couple of other parameters for performance. Investigate lazy_tables, it makes a huge difference. ) db_ps_1TE = DAL('mssql://tim:password@win2003\hcnsql07/hcn', lazy_tables=True, pool_size=10) On Monday, 11 November 2013 07:10:43 UTC+11, Ariya Owam-aram wrote: Dear all, I have to connect mssql database which is locate on another server by using pyodbc. It working if connect by using pyodbc.connect(DNS=dns;UID=user_name;PWD=password) pyodbc.Connection at 0x391bdc0 But I can't connect with DAL() db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase) return error as follow Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') As searching from web2py google group, I also try: db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase?Driver={FreeTDS}) return error as follow Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') --- in my /etc/odbc.ini [TS] Description=ODBC Connection via FreeTDS Driver=FreeTDS Server=203.xxx.xx.xxx port=1433 Database=myDatabase --- in my /etc/odbcinst.ini [FreeTDS] Description=FreeTDS Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/freetds.conf ### Did not change anything ### --- in my /etc/freetds/tds.driver.template [TDS] Description = FreeTDS Driver for Linux MSSQL on Win32 Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/tds.dsn.template [DSN_NAME] Description = Descripton of you DSN connection. Driver = TDS Trace = No Database= myDatabase Server = 203.xxx.xx.xxx Port= 1433 TDS_Version = 8.0 Thank you very much Ariya -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: mssql connection
Hello Tim, Thank you for sharing. I've try as your advice but it still return error message as follow, I think something wrong with my odbc setup somehow. :) db = DAL('mssql://UserName:Password@203.150.29.227\SQLExpress/myDatabase', lazy_tables=True, pool_size=10) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/www-data/web2py/gluon/dal.py, line 7562, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/www-data/web2py/gluon/dal.py, line 3279, in __init__ if do_connect: self.reconnect() File /home/www-data/web2py/gluon/dal.py, line 627, in reconnect self.connection = f() File /home/www-data/web2py/gluon/dal.py, line 3277, in connector return self.driver.connect(cnxn,**driver_args) Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') On Wednesday, November 13, 2013 5:27:55 AM UTC+7, Tim Richardson wrote: Here is a working example using server authentication on a server called win2003, with a sqlserver instance name hcnsql07 and connecting to a database called hcn using default ports (I've added a couple of other parameters for performance. Investigate lazy_tables, it makes a huge difference. ) db_ps_1TE = DAL('mssql://tim:password@win2003\hcnsql07/hcn', lazy_tables=True, pool_size=10) On Monday, 11 November 2013 07:10:43 UTC+11, Ariya Owam-aram wrote: Dear all, I have to connect mssql database which is locate on another server by using pyodbc. It working if connect by using pyodbc.connect(DNS=dns;UID=user_name;PWD=password) pyodbc.Connection at 0x391bdc0 But I can't connect with DAL() db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase) return error as follow Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') As searching from web2py google group, I also try: db = DAL(mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase?Driver={FreeTDS}) return error as follow Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') --- in my /etc/odbc.ini [TS] Description=ODBC Connection via FreeTDS Driver=FreeTDS Server=203.xxx.xx.xxx port=1433 Database=myDatabase --- in my /etc/odbcinst.ini [FreeTDS] Description=FreeTDS Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/freetds.conf ### Did not change anything ### --- in my /etc/freetds/tds.driver.template [TDS] Description = FreeTDS Driver for Linux MSSQL on Win32 Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so --- in my /etc/freetds/tds.dsn.template [DSN_NAME] Description = Descripton of you DSN connection. Driver = TDS Trace = No Database= myDatabase Server = 203.xxx.xx.xxx Port= 1433 TDS_Version = 8.0 Thank you very much Ariya -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL connection error
Got it with FreeTDS. Thanks On Thursday, July 18, 2013 5:26:33 PM UTC-7, Niphlod wrote: plenty of references around the web it's a PITA to connect to MSSQL from a linux client but take advices even related to other programming languages to fix the odbc driver bugs and intricacies, like http://stackoverflow.com/questions/10728290/mssql-servers-native-odbc-driver-for-linux-and-php-5-4 On Thursday, July 18, 2013 9:50:04 PM UTC+2, greenpoise wrote: this is my URI db = DAL('mssql://sa:rms123@192.168.1.40/SQLEXPRESS/HQ') this is the error I get: Error: ('01000', [01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)) I have pyodbc and all installed.. I tried changing the pool_size to 20..nothing...Tried using the hostname instead of the IP, nothing.. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL connection error
Hi. I have no experience with web2py but it seems it's not able to read some file. Try to use strace command to determine what file is missing then you can search on the net which package contains the missing file. You can try something like strace command -o output.txt or strace -p web2py process id -o output.txt Hope it helps. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL connection error
plenty of references around the web it's a PITA to connect to MSSQL from a linux client but take advices even related to other programming languages to fix the odbc driver bugs and intricacies, like http://stackoverflow.com/questions/10728290/mssql-servers-native-odbc-driver-for-linux-and-php-5-4 On Thursday, July 18, 2013 9:50:04 PM UTC+2, greenpoise wrote: this is my URI db = DAL('mssql://sa:rms123@192.168.1.40/SQLEXPRESS/HQ') this is the error I get: Error: ('01000', [01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)) I have pyodbc and all installed.. I tried changing the pool_size to 20..nothing...Tried using the hostname instead of the IP, nothing.. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL connection error
will try. Thanks!!! On Thursday, July 18, 2013 3:30:09 PM UTC-7, Marcio Andrey Oliveira wrote: Hi. I have no experience with web2py but it seems it's not able to read some file. Try to use strace command to determine what file is missing then you can search on the net which package contains the missing file. You can try something like strace command -o output.txt or strace -p web2py process id -o output.txt Hope it helps. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL connection error
the best answer to that threat is freetds which I actually have had success from Linux but is it supported by web2py? On Thursday, July 18, 2013 5:26:33 PM UTC-7, Niphlod wrote: plenty of references around the web it's a PITA to connect to MSSQL from a linux client but take advices even related to other programming languages to fix the odbc driver bugs and intricacies, like http://stackoverflow.com/questions/10728290/mssql-servers-native-odbc-driver-for-linux-and-php-5-4 On Thursday, July 18, 2013 9:50:04 PM UTC+2, greenpoise wrote: this is my URI db = DAL('mssql://sa:rms123@192.168.1.40/SQLEXPRESS/HQ') this is the error I get: Error: ('01000', [01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)) I have pyodbc and all installed.. I tried changing the pool_size to 20..nothing...Tried using the hostname instead of the IP, nothing.. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: MSSQL Connection error on MacOS
Bruno, I too have had this problem. It seems as if Mac OS X has some real problems connecting to MSSQL, which isn't too much of a surprise I guess. The way that I develop on Mac OS X may be crazy or over-complicated, but I find it works well for me: I set up a Ubuntu Server virtual machine in Parallels, set it to use Bridged Networking, give it an IP address, then install and configure pyodbc and freetds. Both of those can be installed via aptitude. I've done it a few times, so it only takes me about 10 minutes to set up a web2py installation in a virtual machine. I also develop from multiple Macs, so I have a copy of the virtual machine on each Mac, and I use Dropbox to sync the code between each computer. I've been developing this way for about a year now, starting with Django, and haven't found any problems with it yet. Plus, I am targeting Linux as the production server for my app when it's complete, so if there are any quirks, I'll know about them before putting the app into production. Hope this helps, and if you need a more detailed setup guide, I actually have some instructions I wrote down for setting up and configuring a virtual machine for web2py development. @Annet: Bruno said MSSQL, not MySQL. Everyone seems to get those two confused because of the similar spelling, though.
Re: [web2py] Re: MSSQL Connection error on MacOS
I solved the problem with HomeBrew brew install unixodbc brew install freetds after that you can set up your dsn in Utilities iODBC. Thank you. -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Thu, Mar 31, 2011 at 10:39 AM, Ross Peoples ross.peop...@gmail.comwrote: Bruno, I too have had this problem. It seems as if Mac OS X has some real problems connecting to MSSQL, which isn't too much of a surprise I guess. The way that I develop on Mac OS X may be crazy or over-complicated, but I find it works well for me: I set up a Ubuntu Server virtual machine in Parallels, set it to use Bridged Networking, give it an IP address, then install and configure pyodbc and freetds. Both of those can be installed via aptitude. I've done it a few times, so it only takes me about 10 minutes to set up a web2py installation in a virtual machine. I also develop from multiple Macs, so I have a copy of the virtual machine on each Mac, and I use Dropbox to sync the code between each computer. I've been developing this way for about a year now, starting with Django, and haven't found any problems with it yet. Plus, I am targeting Linux as the production server for my app when it's complete, so if there are any quirks, I'll know about them before putting the app into production. Hope this helps, and if you need a more detailed setup guide, I actually have some instructions I wrote down for setting up and configuring a virtual machine for web2py development. @Annet: Bruno said MSSQL, not MySQL. Everyone seems to get those two confused because of the similar spelling, though.
Re: [web2py] Re: MSSQL Connection error on MacOS
Glad you were able to figure it out.
[web2py] Re: MSSQL Connection error on MacOS
It seens someone are having same issue woth Pyodbc and sqlalchemy http://stackoverflow.com/questions/4665078/connect-to-mssql-from-sqlalchemy-by-pyodbc-on-mac-os So it is not web2py DAL issue, it is Pyodbc issue, anyone aware? On Tue, Mar 29, 2011 at 12:28 PM, Bruno Rocha rochacbr...@gmail.com wrote: HI, I am trying connection to MSSQL using standalone DAL, but I am getting this error: Traceback (most recent call last): File baixar_arquivos.py, line 10, in module db = DAL('mssql://user1:pass...@servicogente.com.br/coelba') File /Users/rochacbruno/Dropbox/gente/web2py/gluon/dal.py, line 3665, in __init__ raise RuntimeError, Failure to connect, tried 5 times:\n%s % error RuntimeError: Failure to connect, tried 5 times: ('0', '[0] [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (0) (SQLDriverConnectW)') I installed pyodbc on MacOS X, I dont know how to deal with this error message. -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]
[web2py] Re: MSSQL Connection error on MacOS
Hi Bruno, I had the same problem using MySQLdb, I solved it by setting up a my.cnf file in /etc the following way: Log in to OS X using an administrator-level account, open Terminal; cd /usr/local/mysql/support-files/ sudo cp my-huge.cnf /etc/my.cnf and enter your admin password when prompted. I hope this helps you solve the problem. Annet.