pra não esquecer…

março 8th, 2010

postgresql – show full processlist

Posted by Felipe Olivaes in Postgre SQL

SELECT pg_stat_get_backend_pid(S.backendid) AS procpid,
pg_stat_get_backend_activity(S.backendid) AS current_query
FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S;

novembro 3rd, 2009

instalando postgis

Posted by Felipe Olivaes in Postgre SQL

mkdir /usr/local/install/; cd /usr/local/install/;
cd /usr/local/install/;

wget -c http://download.osgeo.org/proj/proj-4.7.0.tar.gz
wget -c http://download.osgeo.org/geos/geos-3.1.1.tar.bz2
wget -c http://postgis.refractions.net/download/postgis-1.4.0.tar.gz

cd /usr/local/install/;
tar -zxvf proj-4.7.0.tar.gz;
cd proj-4.7.0;
./configure && make && make install;

cd /usr/local/install/;
tar -jxvf geos-3.1.1.tar.bz2;
cd geos-3.1.1;
./configure && make && make install;

cd /usr/local/install/;
tar -zxvf postgis-1.4.0.tar.gz;
cd postgis-1.4.0;
./configure && make && make install;

outubro 18th, 2009

pgsql, mudando datastyle de uma base de dados

Posted by Felipe Olivaes in Postgre SQL

Para alterar o formato da data de uma base de dados postgresql.


ALTER DATABASE nomebanco SET DATESTYLE = 'SQL, DMY';
\c nomebanco;
SHOW DATESTYLE;

agosto 20th, 2009

database hacks

Posted by Felipe Olivaes in Firebird, MS SQL Server, MySQL, Postgre SQL

realmente muito bom, dica do ara”ú”jo! =)

http://pentestmonkey.net/blog/mysql-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/postgres-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/oracle-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/mssql-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/ingres-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/db2-sql-injection-cheat-sheet/
http://pentestmonkey.net/blog/informix-sql-injection-cheat-sheet/

crack mysql hash password:
http://www.openwall.com/john/

maio 30th, 2009

dns público de qualidade no br!

Posted by Felipe Olivaes in Linux, PHP, Postgre SQL, Windows

agora temos um dns público de qualidade, para quem utiliza BRT/OI/Telefonica, deve estar cansado de acontecer coisas do genero:
página não abre da primeira vez, abre na segunda…

Quando isso ocorre com frequência, pode ser culpa da resolução de nomes, resolução de DNS.

O serviço é www.gigadns.com.br, o serviço conta com a assinatura de qualidade KingHost/Cyberweb.

Para você que precisa de uma hospedagem inteligente e principalmente de qualidade com preços baixos, recomendo a kinghost, abaixo segue código promocional na kinghost para ganhar 15% de desconto nas 3 primeiras mensalidades!
Código promocional kinghost: BIGDESCONTO

Ou abra a URL abaixo: http://www.kinghost.com.br/promo/bigdesconto.html

dezembro 12th, 2008

visualizar usuários e senhas do pgsql

Posted by Felipe Olivaes in Postgre SQL

# select * from pg_shadow;

outubro 6th, 2008

Código promocional Kinghost

Posted by Felipe Olivaes in Apache, ColdFusion, Firebird, Linux, MS SQL Server, PHP, Postgre SQL, shell, Windows

hospede na melhor hospedagem brasileira e ainda ganhe 15% de desconto nos 3 primeiros meses.

Utilize o código promocional: BIGDESCONTO
no passo 3 do cadastro

nunca foi tão fácil ganhar desconto hein…

setembro 29th, 2008

pgsql doc

Posted by Felipe Olivaes in Postgre SQL

http://postgresql.ribafs.net/

julho 18th, 2008

PostgreSql – saber tamanho ocupado pela base

Posted by Felipe Olivaes in Postgre SQL

bah mto útil! 😛

[SQL]select pg_database_size(‘nome_db’);[/SQL]

janeiro 2nd, 2008

alterar default search_path pgsql

Posted by Felipe Olivaes in Postgre SQL

aehuaehuaeh depois de pesquisar bastante, achei e o cara vê que é tão fácil!

da base de dados:
ALTER DATABASE #BASE_DE_DADOS# SET search_path TO “$user”,public,outro_schema

do usuário:
ALTER USER #NOME_DO_USER# SET search_path TO “$user”,public,outro_schema

outubro 8th, 2007

PostgreSQL – Npgsql/Windows – Only AuthenticationClearTextPassword and AuthenticationMD5Password

Posted by Felipe Olivaes in Postgre SQL, Windows

para resolver esse problema:

[code]Exception Details: Npgsql.NpgsqlException: Only AuthenticationClearTextPassword and AuthenticationMD5Password supported for now. Received: 4

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NpgsqlException: Only AuthenticationClearTextPassword and AuthenticationMD5Password supported for now. Received: 4]
Npgsql.NpgsqlConnector.CheckErrors() +86
Npgsql.NpgsqlConnector.Open() +425
Npgsql.NpgsqlConnectorPool.GetPooledConnector(NpgsqlConnection Connection) +508
Npgsql.NpgsqlConnectorPool.RequestPooledConnectorInternal(NpgsqlConnection Connection) +66
Npgsql.NpgsqlConnectorPool.RequestPooledConnector(NpgsqlConnection Connection) +124
Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection) +54
Npgsql.NpgsqlConnection.Open() +243
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
contato.TextBox1_PreRender(Object sender, EventArgs e) +136
System.Web.UI.Control.OnPreRender(EventArgs e) +2114636
System.Web.UI.WebControls.TextBox.OnPreRender(EventArgs e) +11
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360 [/code]

Edite o arquivo /usr/local/pgsql/data/pg_hba.conf e adicione:
[code]#host BASE_DE_DADOS USUARIO IP MASK METHOD
host BASEDEDADOS USUARIO 0.0.0.0 0.0.0.0 md5[/code]

só mudar a autenticação para md5 =-)

setembro 26th, 2007

Importando base de dados PGSQL pelo PSQL

Posted by Felipe Olivaes in Postgre SQL, xalassa

rapidin, como importar arquivo SQL utilizando console PSQL.

psql -d BASEDEDADOS -f ARQUIVO.SQL -U USUÃ?RIO

para ver o que está sendo executado, adicione: -a

setembro 26th, 2007

desconto kinghost

Código promocional Kinghost!

Ganhe 15% de desconto nas 3 primeiras mensalidades na melhor empresa de hospedagem do brasil com toda certeza…

Acesse o link abaixo
http://www.kinghost.com.br/promo/BIGDESCONTO.html
ou digite o código promocional BIGDESCONTO no cadastro

setembro 20th, 2007

Código promocional Kinghost

Código promocional Kinghost!

Ganhe 15% de desconto nas 3 primeiras mensalidades na melhor empresa de hospedagem do brasil com toda certeza…

Acesse o link abaixo
http://www.kinghost.com.br/promo/BIGDESCONTO.html
ou digite o código promocional BIGDESCONTO no cadastro

setembro 14th, 2007

Desconto Hospedagem Kinghost

Posted by Felipe Olivaes in Apache, MS SQL Server, MySQL, PHP, Postfix, Postgre SQL

Código promocional Kinghost!

Ganhe 15% de desconto nas 3 primeiras mensalidades na melhor empresa de hospedagem do brasil com toda certeza…

Acesse o link abaixo
http://www.kinghost.com.br/promo/BIGDESCONTO.html
ou digite o código promocional BIGDESCONTO no cadastro

Próxima página »


nuvem de tags:

24 horas acentuação Apache bash benchmark bios boot celular centos charset comando console Download esxi Firebird firefox http importação intel ipod kinghost legenda Linux lost mod_deflate msn mssql MySQL owner Padel PHP placa mãe portabilidade Postgre SQL recovery root password rewrite shell sinuca sql server svn temporada completa veronica mars vmware Windows ícones