Saturday, May 30, 2015

Microsoft SQL Server, Error: 926 SQL Server DB_SUSPECT solution

Error:

Database 'DBName' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926).


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=926&LinkId=20476

No se puede abrir la base de datos 'DBName'. Tiene la marca SUSPECT para recuperación. Consulte el registro de errores de SQL Server si desea más información. (Microsoft SQL Server, Error: 926)

Explanation


  • The database is marked as suspect because it failed the recovery process that brings a database to a consistent transactional state. This can occur during the following operations:
  • Starting up an instance of Microsoft® SQL Server™ 2000 or SQL Server 2005.
  • Attaching a database.
  • Using the RESTORE database or RESTORE LOG procedures.



Solution:


  • Starting up an instance of Microsoft® SQL Server™ 2000.
  • Attaching a database. (.mdf y .ldf files in same folder or path)
  • Using the RESTORE database or RESTORE LOG procedures



  • Abrir Microsoft® SQL Server™ 2000.
  • Adjuntar la base de datos (archivos .mdf y .ldf en la misma ruta o carpeta)
  • Usar la opción restaurar



Links

http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=926&LinkId=20476

https://technet.microsoft.com/en-us/library/aa258745%28v=sql.80%29.aspx

Thursday, May 28, 2015

Windows: Run MSI file as Administrator

Run MSI file as Administrator


Open and Run the CMD as Admin

Win vista,7, 8: Type "cmd" in run box (Start), then right-click command prompt, and then click "Run as administrator", or use the comand Ctrl+Shift + Enter


Go to the path where the file is locates: example C:\,copy C: it shows: >C:, and use this command:

msiexec  "ExampleInstall.msi"

Or try with this one:

msiexec  /a "ExampleInstall.msi"

Or try with this one:

runas /user:domain\user msiexec /a "ExampleInstall.msi"


I hope to be useful.

Thursday, May 21, 2015

Save and/or delete Eclipse launch profiles workspaces

Save and/or delete Eclipse launch profiles workspaces


If you need to save or delete launch profiles only delete or copy the files .launch in this path ...\workspace\.metadata\.plugins\org.eclipse.debug.core\.launches 

Windows: Mapear unidad de red Windows 8 / How to Map Network Drive in Windows 8

Mapear unidad de red en Windows 8/How to Map Network Drive in Windows 8

Archivo/Fácil acceso/Asignar como unidad

File/Access/Map network drive




Seleccionar la Unidad y adicionar la ruta tipo \\servidor\recurso
Select the unit and add the type path \\server\resource













Tuesday, May 19, 2015

PostgreSQL: org.postgresql.util.PSQLException: Connection rejected: FATAL: no pg_hba.conf entry for host ....

Connection rejected: FATAL: no pg_hba.conf entry for host


If you get this message in a PostgreSQL connection:

org.postgresql.util.PSQLException: Connection rejected: FATAL: no pg_hba.conf entry for host "192.168.1.1", user "userdb", database "exampledb", SSL off.

Just put your IP address in the pg_hba.conf file, Windows path C:\Program Files\PostgreSQL\9.0\data\


# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD
# IPv4 local connections:

host    all             all             127.0.0.1/32            md5

host    all             all             192.168.1.1/32        md5

Friday, May 15, 2015

Limit for PostreSQL, MySQL and Top for SQL Server

Limit for PostreSQL, MySQL and Top for SQL Server


If you need to select only one record in a query you can use this examples:



  • PostregSQL 


SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)


  • SQL Server


SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)


  • MySQL


SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)

Range
SELECT field FROM table WHERE condition = 'abc' LIMIT 5,10; --(Retrieve 1 rows 6-15)