problermas con :::: db = DAL('mssql://usur:123@contralor/prueba',pool_size=1,check_reserved=['all'])

69 views
Skip to first unread message

Jose Padron

unread,
Sep 17, 2013, 11:23:29 AM9/17/13
to web2py-...@googlegroups.com
Grupo  buenas..
de antemanos  muchas gracias....


Tengo problemas para configurar la conexion con Sqlserver 2000,   
he cambia usuario, clave, el pyodbc actualizado, uso python33
existe la base de datos prueba
el usuario usur  tiene todos los privilegios,etc..

****
como veran  en la conexion conoco contralor que es el nombre del servidor sql,,,  aunque trabajo de forma local,
se le dejo localhost.... de una no entra el error es mucha mas rapido..., pero conocanco contralor,,, se queda pensando y luego tira el error

adjunto todo el ticket de error..

Gracias

**********************************************************

Error ticket for "p1"

Ticket ID

127.0.0.1.2013-09-17.12-08-14.a35cbe27-cadd-42ed-bb0f-aaf95e1b2198

<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times: Traceback (most recent call last): File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7508, in __init__ File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3260, in __init__ File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 622, in reconnect File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3258, in connector Error: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452) (SQLDriverConnect); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0)")

Versión

web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20
Python Python 2.7: C:\Python33\web2py\web2py.exe (prefix: C:\Python33\web2py)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Traceback (most recent call last):
File "/home/mdipierro/make_web2py/web2py/gluon/restricted.py", line 217, in restricted
File "C:/Python33/web2py/applications/p1/models/db.py", line 14, in <module>
File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7529, in __init__
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7508, in __init__
File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3260, in __init__
File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 622, in reconnect
File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3258, in connector
Error: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452) (SQLDriverConnect); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0)")

Error snapshot help

<type 'exceptions.RuntimeError'>(Failure to connect, tried 5 times: Traceback (most recent call last): File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7508, in __init__ File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3260, in __init__ File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 622, in reconnect File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 3258, in connector Error: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452) (SQLDriverConnect); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error de inicio de sesi\xf3n del usuario 'usur'. Motivo: no est\xe1 asociado a una conexi\xf3n de SQL Server de confianza. (18452); [01S00] [Microsoft][ODBC SQL Server Driver]Atributo de cadena de conexi\xf3n no v\xe1lido (0)") )

inspect attributes

Frames

  • File C:\home\mdipierro\make_web2py\web2py\gluon\restricted.py in restricted at line 217 código argumentos variables

  • File C:\Python33\web2py\applications\p1\models\db.py in <module> at line 14 código argumentos variables

    Code listing
    9.
    10.
    11.
    12.
    13.
    14.

    15.
    16.
    17.
    18.
    ## be redirected to HTTPS, uncomment the line below:
    # request.requires_https()

    if not request.env.web2py_runtime_gae:
    ## if NOT running on Google App Engine use SQLite or other DB
    db = DAL('mssql://usur:123@contralor/prueba',pool_size=1,check_reserved=['all'])

    else:
    ## connect to Google BigTable (optional 'google:datastore://namespace')
    db = DAL('google:datastore')
    ## store sessions and tickets there
  • File C:\home\mdipierro\make_web2py\web2py\gluon\dal.py in __init__ at line 7529 código argumentos variables

    Function argument list

    (self=<DAL uri="mssql:******@contralor/prueba">, uri='mssql://usur:123@contralor/prueba', pool_size=1, folder=None, db_codec='UTF-8', check_reserved=['all'], migrate=True, fake_migrate=False, migrate_enabled=True, fake_migrate_all=False, decode_credentials=False, driver_args=None, adapter_args=None, attempts=5, auto_import=False, bigint_id=False, debug=False, lazy_tables=False, db_uid=None, do_connect=True, after_connection=None, tables=None)

    Code listing
    Variables

In file: C:\Python33\web2py\applications\p1\models\db.py

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
# -*- coding: utf-8 -*-

#########################################################################
## This scaffolding model makes your app work on Google App Engine too
## File is released under public domain and you can use without limitations
#########################################################################

## if SSL/HTTPS is properly configured and you want all HTTP requests to
## be redirected to HTTPS, uncomment the line below:
# request.requires_https()

if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL('mssql://usur:123@contralor/prueba',pool_size=1,check_reserved=['all'])
else:
## connect to Google BigTable (optional 'google:datastore://namespace')
db = DAL('google:datastore')
## store sessions and tickets there
session.connect(request, response, db=db)
## or store session in Memcache, Redis, etc.
## from gluon.contrib.memdb import MEMDB
## from google.appengine.api.memcache import Client
## session.connect(request, response, db = MEMDB(Client()))

## by default give a view/generic.extension to all actions from localhost
## none otherwise. a pattern can be 'controller/function.extension'
response.generic_patterns = ['*'] if request.is_local else []
## (optional) optimize handling of static files
# response.optimize_css = 'concat,minify,inline'
# response.optimize_js = 'concat,minify,inline'

#########################################################################
## Here is sample code if you need for
## - email capabilities
## - authentication (registration, login, logout, ... )
## - authorization (role based authorization)
## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
## - old style crud actions
## (more options discussed in gluon/tools.py)
#########################################################################

from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
crud, service, plugins = Crud(db), Service(), PluginManager()

## create all tables needed by auth if not custom tables
auth.define_tables(username=False, signature=False)

## configure email
mail = auth.settings.mailer
mail.settings.server = 'logging' or 'smtp.gmail.com:587'
mail.settings.sender = 'y...@gmail.com'
mail.settings.login = 'username:password'

## configure auth policy
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True

## if you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, write your domain:api_key in private/janrain.key
from gluon.contrib.login_methods.rpx_account import use_janrain
use_janrain(auth, filename='private/janrain.key')

#########################################################################
## Define your tables below (or better in another model file) for example
##
## >>> db.define_table('mytable',Field('myfield','string'))
##
## Fields can be 'string','text','password','integer','double','boolean'
## 'date','time','datetime','blob','upload', 'reference TABLENAME'
## There is an implicit 'id integer autoincrement' field
## Consult manual for more options, validators, etc.
##
## More API examples for controllers:
##
## >>> db.mytable.insert(myfield='value')
## >>> rows=db(db.mytable.myfield=='value').select(db.mytable.ALL)
## >>> for row in rows: print row.id, row.myfield
#########################################################################

## after defining tables, uncomment below to enable auditing
# auth.enable_record_versioning(db)

mail.settings.server = settings.email_server
mail.settings.sender = settings.email_sender
mail.settings.login = settings.email_login




**************************************************

samuel bonill

unread,
Sep 17, 2013, 4:50:50 PM9/17/13
to web2py-...@googlegroups.com
ese es el problema 'Python3.3', web2py solo corre en python 2.x, se esta trabajando para darle soporte a python 3 pero es algo a largo plazo.... intenta con python 2.7.x


2013/9/17 Jose Padron <fpad...@gmail.com>

--
Has recibido este mensaje porque estás suscrito al grupo "web2py-usuarios" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a web2py-usuari...@googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.

Jose Padron

unread,
Sep 19, 2013, 3:14:21 PM9/19/13
to web2py-...@googlegroups.com

Me fui al Herramientas del cliente de SqlServer  y verifique:


para verficar corri la siquiente sentencia en el analizador de consultas de sql

-- get current SQL Server name\instance name
  SELECT @@SERVERNAME
-- get current machine name and instance name
  SELECT SERVERPROPERTY('MachineName'), SERVERPROPERTY ('InstanceName')


el @@SERVERNAME  y el SERVERPROPERTY('MachineName')  debe dar el mismo nombre..... al ser asi... web2py se conecta sin error---

Gracias a todos aportaron en la solucion de este dolor de cabeza,,,, jajjaa

Gracias...........



Reply all
Reply to author
Forward
0 new messages