Tuesday, June 3, 2008

RECOVERING A DATABASE WITH SUSPECT STATUS

To RECOVER a DATABASE STATUS you need to run sp_resetstatus. If you don’t have one, below are the steps on how to create and execute sp_resetstatus on WINDOWS platform for SYSBASE server.

1) Go to start --> run --> cmd
2) At cmd prompt type this command

C:\>isql –Uusernamehere –Sservernamehere

3) To create and execute sp_resetstatus, take the following steps
At command prompt

1> use master
2> go
1> sp_configure "allow updates", 1
2> go


4) Create the sp_resetstatus procedure in the master database.

Start --> program --> Sybase --> Sybase central java edition

After that, write the following to the sp. Name it as sp_resetstatus:

CREATE PROC sp_resetstatus @dbname varchar(30) ASDECLARE @msg varchar(80)IF @@trancount > 0BEGINPRINT "Can't run sp_resetstatus from within a transaction."RETURN (1)ENDIF suser_id() != 1BEGINSELECT @msg = "You must be the System Administrator (SA)"SELECT @msg = @msg + " to execute this procedure."RETURN (1)ENDIF (SELECT COUNT(*) FROM master..sysdatabasesWHERE name = @dbname) != 1BEGINSELECT @msg = "Database '" + @dbname + "' does not exist!"PRINT @msgRETURN (1)ENDIF (SELECT COUNT(*) FROM master..sysdatabasesWHERE name = @dbname AND status & 256 = 256) != 1BEGINPRINT "sp_resetstatus can only be run on suspect databases."RETURN (1)ENDBEGIN TRANUPDATE master..sysdatabases SET status = status ^ 256WHERE name = @dbnameIF @@error != 0 OR @@rowcount != 1ROLLBACK TRANELSE BEGINCOMMIT TRANSELECT @msg = "Database '" + @dbname + "' status reset!"PRINT @msgPRINT " " PRINT "WARNING: You must reboot SQL Server prior to "PRINT " accessing this database!"PRINT " "ENDGO

5) after the procedure is created, at the command prompt type

1> use master
2> go
1> sp_configure "allow updates", 0
2> go


6) to run sp_resetstatus, at the command prompt type

1> sp_resetstatus "databasename"
2> go
Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Sunday, June 1, 2008

SYSTEMS DATABASE RELOCATION


note: use sp_helpdb 'DATABASE name' to check the location of the database before you start and do backup all the DATABASES first.


STEP 1:master

1) stop SQL SERVER
2) copy master to the new location
3) check the registry parameter :
open regedit(modify registry)
-->local machine -->software -->microsoft -->mssqlserver -->MSSQLSERVER -->parameter
change below parameter
-dD:\Microsoft SQL Server\MSSQL\data\master.mdf (-d should remain)
-lD:\Microsoft SQL Server\MSSQL\data\mastlog.ldf (-l should remain)
4) start sql server


STEP 2:tempdb

1) query analyzer
use master
go
Alter database tempdb modify file (name = tempdev, filename = 'h:\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'h:\templog.ldf')
go
Results after command completed:
"File 'tempdev' modified in sysaltfiles. Delete old file after restarting SQL Server.File 'templog' modified in sysaltfiles. "
You may delete the old file after restarting SQL Server.
2) restart sql server (do sp_helpdb to check the changes)
3) delete the old physical files.


STEP 3:msdb and model

1) if the db is hardened :open regedit(modify registry)
-->local machine -->software -->microsoft -->mssqlserver -->mssqlserver -->parameter-->rightclick, add new string value name SQLArg3 and value data -T3608
2) restart sql
3) query analyzer (pls close enterprise manager)
note: make sure the physical file exists at the new location.
example:
sp_detach_db xxx, 'true'goEXEC sp_attach_db 'xxx','c:\xxx.mdf','c:\xxx.ldf'
sp_detach_db yyy, 'true'goEXEC sp_attach_db 'yyy','c:\yyy.mdf','c:\yyy.ldf'
(do sp_helpdb to check the changes)
4) delete newly created string value name SQLArg3 and value data -T3608
5) restart sql server

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Thursday, May 29, 2008

STORAGE AREA NETWORK (SAN)

A SAN is a specialized, high-speed network attaching SERVERS and STORAGE DEVICES. A SAN allows “any-to-any” connection across the network, using interconnects elements such as routers, gateways, hubs, SWITCHES and DIRECTORS.

It eliminates the traditional dedicated connection between a server and storage, and the concept that the server effectively “owns and manages” the storage devices. It also eliminates any restriction to the amount of data that a server can access, currently limited by the number of storage devices attached to the individual server.

Instead, a SAN introduces the flexibility of networking to enable one server or many heterogeneous servers to share a common storage utility, which may comprise many storage devices, including disk, tape, and optical storage. Additionally, the storage utility may be located far from the servers that use it.

It can be local, or can be extended over geographical distances. SANs create new methods of attaching storage to servers. These new methods can enable great improvements in both availability and performance.

Today’s SANs are used to connect shared storage arrays and tape libraries to multiple servers, are used by clustered servers for failover and are used to bypass traditional network bottlenecks. It facilitates direct, high-speed data transfers between servers and storage devices.
Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Friday, May 23, 2008

OMNET++ with VISUAL C++ 2005

Here are simple steps:


  • download visual c++ express from microsoft webpage, the installation must be done online.
  • but this one will only work for the omnet samples simulation (example: tictoc.exe) or .exe files that are already created. if YOU want to create new omnet simulation YOU need to have the original or full version of visual c++ 2005. since the express version does not contain program to run 'nmake' statement.
  • download omnet++ from omnet webpage, make sure the version is for windows and visual c++ 2005
  • make sure YOU have installed visual c++ 2005 before installing omnet++
  • some of the omnet version require Windows rebooting some does not. so make sure you save those running applications.
  • then you can start testing the samples provided by the version.
  • more steps....coming

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Thursday, May 15, 2008

AUTOIT..

Getting to know AUTOIT

  • a freeware designed to automate Windows GUI and general scripting.
  • very small in size, self-contained and will run on all versions of Windows.
  • supports complex expressions, user functions, and loops.
  • suitable for those who are not Windows expert (exm: with one click button, you can run multiple .bat command)

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

OMNeT++

OMNeT++ ... What Is IT????
  • OMNeT++ a discrete event simulation, mainly of communication networks.
  • OMNeT++ can be used in other areas, example simulation of complex IT systems, queueing networks or hardware architectures as well.
  • OMNeT++ extensive GUI support, and the simulation kernel can be embedded easily into other applications.
  • OMNeT++ comes with different version or suits depending on the platforms.guess what??... it is free for noncomercial purpose -- academic research.




Platforms:

  • Windows
  • Linux Knoppix
  • Ubuntu


Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

Working with NS2

What is NS-2?
  • Network Simulator 2.
  • It is an open-source software which can be freely downloaded from its official website.
  • There are many available versions with different protocol of interest.
  • Basically, the procedures of NS-2 simulation execution involve providing traffic pattern and mobility pattern to a simulation scenario
  • The results obtained may be in the form of raw data and that can be interpreted by using appropriate programming language


Platform ...
  • Linux Knoppix
  • Ubuntu
  • Windows
  • Red hat

Digg Technorati del.icio.us Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy