Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > PostgreSQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 24-04-2012
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Sí, no sé qué tiene que ver ese mensaje. A m me ha funcionado bien en Windows 7 32 bits.

// Saludos
Responder Con Cita
  #2  
Antiguo 24-04-2012
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Po otra parte, hay que considerar que los instaladores para windows no los hace el propo PostgreSQL, según entiendo, así que no es propiamente culpa de ellos los posibles defectos.

// Saludos
Responder Con Cita
  #3  
Antiguo 24-04-2012
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
roman siempre, te expresas de una forma. que solo puedo estar de acuerdo.. ..
Responder Con Cita
  #4  
Antiguo 24-04-2012
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por JXJ Ver Mensaje
Firebird el mejor del mundo. si.. posgresql apesta..
Cita:
Empezado por JXJ Ver Mensaje
si el instalador apesta bitrock. segun parace es para todos los Sistemas operativos ..el instaldor grafico
en nix. pues parece que usa otras cosas si no es grafico.
especialmente windows. bull shit.. disque empresa española. pero no manchen. no avisa bien que pex.
.......... ..
Responder Con Cita
  #5  
Antiguo 25-04-2012
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
a eso casimiro notevi. es por que buscano con que instalador lo hicieron encontre que la toman como gran empresa.
bueno para micaso. el instalador no funciona como el innosetup.

y a mi desesperacion.. de que no instala el postgresql.

una duda. buscando en el codigo de instalacion

hay un vbscript que se encarga de la inicializacion del cluster de base de datos
usando un programa initdb

el codigo llama asi.
[/code]
' Check the command line
If WScript.Arguments.Count <> 11 Then
Wscript.Echo "Usage: initcluster.vbs <OSUsername> <SuperUsername> <Password> <Install dir> <Data dir> <xlog dir> <Port> <Locale> <Mode> <server_utilization> <workload_profile>"
Wscript.Quit 127
End If
[/code]

y en el log de instalacion se llama a ese vb con los parametros

Código:
Executing cscript //NoLogo "C:\PostgresPlus\8.4AS\installer\server/initcluster.vbs" "enterprisedb" "enterprisedb" "****" "C:\PostgresPlus\8.4AS" "C:\PostgresPlusData" "C:\PostgresPlusData\pg_xlog" 5444 "DEFAULT" "oracle" "66" "oltp"cd
mi problema es aqui

<OSUsername> <SuperUsername> <Password>

"enterprisedb" "enterprisedb" "****"

¿saben que contraseña tiene el usuario enterprisedb ?
por que ahi lo enmascaran y lo crea el instalador.


Código:
On Error Resume Next

' Postgres Plus Advanced Server server cluster init script for Windows
' Dave Page, EnterpriseDB

Const ForReading = 1
Const ForWriting = 2

' Check the command line
If WScript.Arguments.Count <> 11 Then
 Wscript.Echo "Usage: initcluster.vbs <OSUsername> <SuperUsername> <Password> <Install dir> <Data dir> <xlog dir> <Port> <Locale> <Mode> <server_utilization> <workload_profile>"
 Wscript.Quit 127
End If

strOSUsername = WScript.Arguments.Item(0)
strUsername = WScript.Arguments.Item(1)
strPassword = WScript.Arguments.Item(2)
strInstallDir = WScript.Arguments.Item(3)
strDataDir = WScript.Arguments.Item(4)
strXlogDir = WScript.Arguments.Item(5)
lPort = CLng(WScript.Arguments.Item(6))
strLocale = WScript.Arguments.Item(7)
strDatabaseMode = WScript.Arguments.Item(8)
strServerUtilization = WScript.Arguments.Item(9)
strWorkLoadProfile = WScript.Arguments.Item(10)
strMode=" "

'set database mode to --no-redwood-compat if mode is postgresql
If strDatabaseMode = "postgresql" Then
strMode = "--no-redwood-compat"
End If


' Remove any trailing \'s from the data dir - they will confuse cacls
If Right(strDataDir, 1) = "\" Then
    strDataDir = Left(strDataDir, Len(strDataDir)-1)
End IF
' Remove any trailing \'s from the xlog dir - they will confuse cacls
If Right(strXlogDir, 1) = "\" Then
    strXlogDir = Left(strXlogDir, Len(strXlogDir)-1)
End IF

Dim strInitdbPass
iWarn = 0

' Get temporary filenames
Set objShell = WScript.CreateObject("WScript.Shell")
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objTempFolder = objFso.GetSpecialFolder(2)
strBatchFile = Replace(objFso.GetTempName, ".tmp", ".bat")
strOutputFile = objTempFolder.Path & "\" & objFso.GetTempName
Set objFso = CreateObject("Scripting.FileSystemObject")

' Change the current directory to the installation directory
' This is important, because initdb will drop Administrative
' permissions and may lose access to the current working directory
objShell.CurrentDirectory = strInstallDir

' Is this Vista or above?
Function IsVistaOrNewer()
    Set objWMI = GetObject("winmgmts:\\.\root\cimv2")
    Set colItems = objWMI.ExecQuery("Select * from Win32_OperatingSystem",,48)
	
    For Each objItem In colItems
        strVersion = Left(objItem.Version, 3)
    Next
	
    If InStr(strVersion, ".") > 0 Then
        majorVersion = CInt(Left(strVersion,  InStr(strVersion, ".") - 1))
    ElseIf InStr(strVersion, ",") > 0 Then
        majorVersion = CInt(Left(strVersion,  InStr(strVersion, ",") - 1))
    Else
        majorVersion = CInt(strVersion)
    End If
	
    If majorVersion >= 6.0 Then
        IsVistaOrNewer = True
    Else
        IsVistaOrNewer = False
    End If
End Function

' Execute a command
Function DoCmd(strCmd)
    Set objBatchFile = objTempFolder.CreateTextFile(strBatchFile, True)
    objBatchFile.WriteLine "@ECHO OFF"
    objBatchFile.WriteLine strCmd & " > """ & strOutputFile & """ 2>&1"
	objBatchFile.WriteLine "EXIT /B %ERRORLEVEL%"
    objBatchFile.Close
    DoCmd = objShell.Run(objTempFolder.Path & "\" & strBatchFile, 0, True)
    If objFso.FileExists(objTempFolder.Path & "\" & strBatchFile) = True Then
        objFso.DeleteFile objTempFolder.Path & "\" & strBatchFile, True
    End If
    If objFso.FileExists(strOutputFile) = True Then
        Set objOutputFile = objFso.OpenTextFile(strOutputFile, ForReading)
        WScript.Echo objOutputFile.ReadAll
        objOutputFile.Close
        objFso.DeleteFile strOutputFile, True
    End If
End Function

Sub Die(msg)
    If objFso.FileExists(strInitdbPass) = True Then
        objFso.DeleteFile strInitdbPass, True
    End If
    WScript.Echo msg
    WScript.Quit 1
End Sub

Sub Warn(msg)
    WScript.Echo msg
    iWarn = 2
End Sub

Function CreateDirectory(DirectoryPath)
    If objFso.FolderExists(DirectoryPath) Then Exit Function

    Call CreateDirectory(objFso.GetParentFolderName(DirectoryPath))
    objFso.CreateFolder(DirectoryPath)
End Function

' Create a password file
strInitdbPass = strInstallDir & "\" & objFso.GetTempName
Set objInitdbPass = objFso.OpenTextFile(strInitdbPass, ForWriting, True)
WScript.Echo Err.description
objInitdbPass.WriteLine(strPassword)
objInitdbPass.Close

' Create the data directory
If objFso.FolderExists(strDataDir) <> True Then
    CreateDirectory(strDataDir)
    If Err.number <> 0 Then
        Die "Failed to create the data directory (" & strDataDir & ")"
    End If
End If


'for default xlog dir, don't pass -X parameter
strXLogArg = ""

'Create pg_xlog directory if it is not the default one
If strXlogDir <> strDataDir & "\pg_xlog" Then
  strXlogDir = strXlogDir & "\pg_xlog"
  strXLogArg = " -X """ & strXlogDir & """ " 
  If objFso.FolderExists(strXlogDir) <> True Then
      CreateDirectory(strXlogDir)
      If Err.number <> 0 Then
        Die "Failed to create the XLog directory (" & strXlogDir & ")"
      End If
  End If
End If

Set objNetwork = CreateObject("WScript.Network")

iRetXlog = 0

If IsVistaOrNewer() = True Then
    WScript.Echo "Ensuring we can write to the data directory (using icacls):"
    iRet = DoCmd("icacls """ & strDataDir & """ /T /grant:r """ & objNetwork.Username & """:F")
    WScript.Echo "Ensuring we can write to the xlog directory if it exists (using icacls)"
    If objFso.FolderExists(strXlogDir) = True Then
      iRetXlog = DoCmd("icacls """ & strXlogDir & """ /T /grant:r """ & objNetwork.Username & """:F")
    End If
Else
    WScript.Echo "Ensuring we can write to the data directory (using cacls):"
    iRet = DoCmd("echo y|cacls """ & strDataDir & """ /E /T /G """ & objNetwork.Username & """:F")
    WScript.Echo "Ensuring we can write to the xlog directory if it exists (using cacls):"
    If objFso.FolderExists(strXlogDir) = True Then
      iRetXlog = DoCmd("echo y|cacls """ & strXlogDir & """ /E /T /G """ & objNetwork.Username & """:F")
    End If
End If
if iRet <> 0 Then
    WScript.Echo "Failed to ensure the data directory is accessible (" & strDataDir & ")"
End If
if iRetXlog <> 0 Then
    WScript.Echo "Failed to ensure the xlog directory is accessible (" & strXlogDir & ")"
End If

' Initialise the database cluster, and set the appropriate permissions/ownership
if strLocale = "DEFAULT" Then
    iRet = DoCmd("""" & strInstallDir & "\bin\initdb.exe"" " & strMode & "  --pwfile """ & strInitdbPass & """ --encoding=UTF-8 -A md5 -U " & strUsername & " -D """ & strDataDir & """" & strXLogArg & "")
Else
    iRet = DoCmd("""" & strInstallDir & "\bin\initdb.exe"" " & strMode &"  --pwfile """ & strInitdbPass & """ --locale=""" & strLocale & """ --encoding=UTF-8 -A md5 -U " & strUsername & " -D """ & strDataDir & """" & strXLogArg & "")
End If

if iRet <> 0 Then
    Die "Failed to initialise the database cluster with initdb"
End If

' Delete the password file
If objFso.FileExists(strInitdbPass) Then
    objFso.DeleteFile strInitdbPass, True
End If

' Edit the config files
' Set the following in postgresql.conf:
'      listen_addresses = '*'
'      port = $PORT
'      log_destination = 'stderr'
'      logging_collector = on
Set objConfFile = objFso.OpenTextFile(strDataDir & "\postgresql.conf", ForReading)
strConfig = objConfFile.ReadAll
objConfFile.Close
strConfig = Replace(strConfig, "#listen_addresses = 'localhost'", "listen_addresses = '*'")
strConfig = Replace(strConfig, "#port = 5432", "port = " & lPort)
strConfig = Replace(strConfig, "#port = 5444", "port = " & lPort)
strConfig = Replace(strConfig, "#log_destination = 'stderr'", "log_destination = 'stderr'")
strConfig = Replace(strConfig, "#logging_collector = off", "logging_collector = on")
strConfig = Replace(strConfig, "#log_line_prefix = ''", "log_line_prefix = '%t'")
strConfig = Replace(strConfig, "edb_dynatune = 66", "edb_dynatune = " & strServerUtilization)
strConfig = Replace(strConfig, "#edb_dynatune_profile = oltp", "edb_dynatune_profile = " & strWorkLoadProfile)

Set objConfFile = objFso.OpenTextFile(strDataDir & "\postgresql.conf", ForWriting)
objConfFile.WriteLine strConfig
objConfFile.Close

' Secure the data directory

If IsVistaOrNewer() = True Then
    WScript.Echo "Granting service account access to the data directory (using icacls):"
    iRet = DoCmd("icacls """ & strDataDir & """ /T /C /grant:r """ & strOSUsername & """:M")
Else
    WScript.Echo "Granting service account access to the data directory (using cacls):"
    iRet = DoCmd("echo y|cacls """ & strDataDir & """ /E /T /C /G """ & strOSUsername & """:C")
End If
if iRet <> 0 Then
    Warn "Failed to grant service account access to the data directory (" & strDataDir & ")"
End If
' Secure the xlog directory

If IsVistaOrNewer() = True Then
    WScript.Echo "Granting service account access to the xlog directory (using icacls):"
    iRet = DoCmd("icacls """ & strXlogDir & """ /T /C /grant:r """ & strOSUsername & """:M")
Else
    WScript.Echo "Granting service account access to the xlog directory (using cacls):"
    iRet = DoCmd("echo y|cacls """ & strXlogDir & """ /E /T /C /G """ & strOSUsername & """:C")
End If
if iRet <> 0 Then
    Warn "Failed to grant service account access to the xlog directory (" & strDataDir & ")"
End If
WScript.Echo "initcluster.vbs ran to completion"
WScript.Quit iWarn
gracias disculpen la frustracion. expresada.
Responder Con Cita
  #6  
Antiguo 25-04-2012
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
bueno al segun parece el usuario lo debe de tomar del instalador.
lo raro es que me crea 2 usuarios en windows.

postgres

enterprisedb
Responder Con Cita
  #7  
Antiguo 25-04-2012
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
avance lo mas complejo es el cluster initialization aun no encuentro que toma para inicializarlo.

el instalador creo un batch
con nombre aleatorio

rad4774c6.bat con el siguiente contenido

@ECHO OFF
"C:\PostgresPlus\8.4AS\bin\initdb.exe" --pwfile "C:\PostgresPlus\8.4AS\rad43075.tmp" --encoding=UTF-8 -A md5 -U enterprisedb -D "C:\PostgresPlus\8.4AS\data" -X "C:\PostgresPlusData\pg_xlog\pg_xlog" > "C:\Users\gdmx\AppData\Local\Temp\radB9EBB.tmp" 2>&1
EXIT /B %ERRORLEVEL%


lo que no se es a que archivos hace referencia. ??
--pwfile "C:\PostgresPlus\8.4AS\rad43075.tmp"

"C:\Users\gdmx\AppData\Local\Temp\radB9EBB.tmp"
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Como Instalar el F1Book en Windows 7 arnovisr Varios 0 23-07-2011 13:50:54
como instalar de slony en windows uper PostgreSQL 1 13-03-2010 02:48:59
como instalar delphi.net en windows xp 64bit kurono Varios 0 05-08-2008 17:47:24
Como instalar un Tservice (el exe) en Windows Vista lsg API de Windows 1 29-06-2008 01:12:48
Como instalar windows Vista RogerGR Humor 8 08-03-2007 22:05:50


La franja horaria es GMT +2. Ahora son las 07:36:31.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi