Powershell / SQL Inventory and last backup date Skips some servers?

Good Morning experts... I have a text file with a list of servers.. I am trying to automate a script that scans through them all and checks all databases to ensure everything is getting backed up... It works great (I copied the guts of the script from here,
I think and modified it so I could "Learn").  The only problem I have is some of the servers report an error saying can not connect and bypasses it.  After the script is over, I can go back and query that single server and it responds correctly..
Has anyone else come across anything like that?  I will include the script I have been using.. if you had 100+ servers to support with MULTIPLE instances on each how would you do it?
<#####################################################################
# Get All instances and Date of last Full / Log Backup of each
######################################################################>
#region Variables
$TextFileLocation = "C:\serverlist.txt"
$intRow = 1
$BackgroundColor = 36
$FontColor = 25
#endregion
#Region Open Excel
$Excel = New-Object -ComObject Excel.Application
$Excel.visible = $True
$Excel = $Excel.Workbooks.Add()
$Sheet = $Excel.Worksheets.Item(1)
#endregion
#Go through text file one at a time
foreach($instance in Get-Content $TextFileLocation)
$Sheet.Cells.Item($intRow,1) = "INSTANCE NAME:"
$Sheet.Cells.Item($intRow,2) = $instance
$Sheet.Cells.Item($intRow,1).Font.Bold = $True
$Sheet.Cells.Item($intRow,2).Font.Bold = $True
for ($column =1; $column -le 2; $column++)
$Sheet.Cells.Item($intRow, $column).Interior.Colorindex = 44
$Sheet.Cells.Item($intRow, $column).Font.ColorIndex = $FontColor
#Increase Row count by 1
$intRow++
#Create sub-headers
$Sheet.Cells.Item($intRow,1) = "Name"
$Sheet.Cells.Item($intRow,2) = "LAST FULL BACKUP"
$Sheet.Cells.Item($intRow,3) = "LAST LOG BACKUP"
#Format the column headers
for ($col = 1; $col -le 3; $col++)
$Sheet.Cells.Item($intRow,$col).Font.Bold = $True
$Sheet.Cells.Item($intRow,$col).Interior.ColorIndex = $BackgroundColor
$Sheet.Cells.Item($intRow,$col).Font.ColorIndex = $FontColor
#Finished with Headers, now move to the data
$intRow++
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | Out-Null
# Create an SMO connection to the instance in servers.txt
$s = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $instance
$dbs = $s.Databases
foreach ($db in $dbs)
if ($db.Name -ne "tempdb")
if($db.LastBackupDate -eq "1/1/0001 12:00 AM")
$fullbackupdate = "Never Backed Up"
$fgColor = "red"
else
#$fullBackupDate= "{0:g2}" -f $db.LastBackupDate
$fullBackupDate = $db.LastBackupDate
$Sheet.Cells.Item($intRow, 1) = $db.Name
$Sheet.Cells.Item($intRow, 2) = $db.LastBackupDate #$fullBackupDate
if ($db.RecoveryModel.Tostring() -eq "SIMPLE")
$logBackupDate="Simple"
else
#See Date Above..-eq is same as =
if($db.LastLogBackupDate -eq "1/1/0001 12:00 AM")
$logBackupDate="Never"
else
#$logBackupDate= "{0:g2}" -f $db.LastLogBackupDate
$logBackupDate = $db.LastLogBackupDate
$Sheet.Cells.Item($intRow, 3) = $logBackupdate
$intRow ++
$intRow ++
$Sheet.UsedRange.EntireColumn.AutoFit()
cls
Am I going about this the correct way, or is there a "Better" way to do this that I have not come across yet?
Thank you

Sorry JRV... I will put more of an example here.
I want to do an inventory of all our our instances and verify if they are being backed up correctly, I just wrote a script to test:
$TextFileLocation = "C:\servers.txt"
foreach($instance in get-content $TextFileLocation)
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | Out-Null
$s = New-Object ("Microsoft.SqlServer.Management.SMO.Server") $instance
$dbs = $s.Databases
foreach($db in $dbs)
$location = $db.Name
$logBackupDate = $db.LastLogBackupDate
if($db.RecoveryModel.Tostring() -eq "SIMPLE")
Write-host "$s - $location - SIMPLE Recovery"
elseif($db.RecoveryModel.ToString() -ne "SIMPLE")
Write-Host "$s - $location - $logBackupDate"
output is expected, and everything works fine... But some servers I get the following error:
PS K:\MyScripts\powershell> . 'C:\Users\scj0025\AppData\Local\Temp\Untitled30.ps1'
foreach : The following exception was thrown when trying to enumerate the collection: "Failed to connect to server poly04406.".
At C:\Users\scj0025\AppData\Local\Temp\Untitled30.ps1:9 char:8
+ foreach <<<< ($db in $dbs)
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException
    + FullyQualifiedErrorId : ExceptionInGetEnumerator
If I go to another script and look at the same server, I get the results I expect:
Function Get-SQLInstance {  
<#
.SYNOPSIS
Retrieves SQL server information from a local or remote servers.
.DESCRIPTION
Retrieves SQL server information from a local or remote servers. Pulls all
instances from a SQL server and detects if in a cluster or not.
.PARAMETER Computername
Local or remote systems to query for SQL information.
.NOTES
Name: Get-SQLInstance
Author: Boe Prox
DateCreated: 07 SEPT 2013
.EXAMPLE
Get-SQLInstance -Computername DC1
SQLInstance : MSSQLSERVER
Version : 10.0.1600.22
isCluster : False
Computername : DC1
FullName : DC1
isClusterNode : False
Edition : Enterprise Edition
ClusterName :
ClusterNodes : {}
Caption : SQL Server 2008
SQLInstance : MINASTIRITH
Version : 10.0.1600.22
isCluster : False
Computername : DC1
FullName : DC1\MINASTIRITH
isClusterNode : False
Edition : Enterprise Edition
ClusterName :
ClusterNodes : {}
Caption : SQL Server 2008
Description
Retrieves the SQL information from DC1
#>
[cmdletbinding()] 
Param (
[parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[Alias('__Server','DNSHostName','IPAddress')]
#[string[]]$ComputerName = Get-Host "C:\serverlist.txt"
[string[]]$ComputerName = $env:COMPUTERNAME
Process {
ForEach ($Computer in $Computername) {
$Computer = $computer -replace '(.*?)\..+','$1'
Write-Verbose ("Checking {0}" -f $Computer)
Try {
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Computer)
$baseKeys = "SOFTWARE\\Microsoft\\Microsoft SQL Server",
"SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SQL Server"
If ($reg.OpenSubKey($basekeys[0])) {
$regPath = $basekeys[0]
} ElseIf ($reg.OpenSubKey($basekeys[1])) {
$regPath = $basekeys[1]
} Else {
Continue
$regKey= $reg.OpenSubKey("$regPath")
If ($regKey.GetSubKeyNames() -contains "Instance Names") {
$regKey= $reg.OpenSubKey("$regpath\\Instance Names\\SQL" )
$instances = @($regkey.GetValueNames())
} ElseIf ($regKey.GetValueNames() -contains 'InstalledInstances') {
$isCluster = $False
$instances = $regKey.GetValue('InstalledInstances')
} Else {
Continue
If ($instances.count -gt 0) {
ForEach ($instance in $instances) {
$nodes = New-Object System.Collections.Arraylist
$clusterName = $Null
$isCluster = $False
$instanceValue = $regKey.GetValue($instance)
$instanceReg = $reg.OpenSubKey("$regpath\\$instanceValue")
If ($instanceReg.GetSubKeyNames() -contains "Cluster") {
$isCluster = $True
$instanceRegCluster = $instanceReg.OpenSubKey('Cluster')
$clusterName = $instanceRegCluster.GetValue('ClusterName')
$clusterReg = $reg.OpenSubKey("Cluster\\Nodes")
$clusterReg.GetSubKeyNames() | ForEach {
$null = $nodes.Add($clusterReg.OpenSubKey($_).GetValue('NodeName'))
$instanceRegSetup = $instanceReg.OpenSubKey("Setup")
Try {
$edition = $instanceRegSetup.GetValue('Edition')
} Catch {
$edition = $Null
Try {
$ErrorActionPreference = 'Stop'
#Get from filename to determine version
$servicesReg = $reg.OpenSubKey("SYSTEM\\CurrentControlSet\\Services")
$serviceKey = $servicesReg.GetSubKeyNames() | Where {
$_ -match "$instance"
} | Select -First 1
$service = $servicesReg.OpenSubKey($serviceKey).GetValue('ImagePath')
$file = $service -replace '^.*(\w:\\.*\\sqlservr.exe).*','$1'
$version = (Get-Item ("\\$Computer\$($file -replace ":","$")")).VersionInfo.ProductVersion
} Catch {
#Use potentially less accurate version from registry
$Version = $instanceRegSetup.GetValue('Version')
} Finally {
$ErrorActionPreference = 'Continue'
New-Object PSObject -Property @{
Computername = $Computer
SQLInstance = $instance
Edition = $edition
Version = $version
Caption = {Switch -Regex ($version) {
"^11" {'SQL Server 2012';Break}
"^10\.5" {'SQL Server 2008 R2';Break}
"^10" {'SQL Server 2008';Break}
"^9" {'SQL Server 2005';Break}
"^8" {'SQL Server 2000';Break}
Default {'Unknown'}
}}.InvokeReturnAsIs()
isCluster = $isCluster
isClusterNode = ($nodes -contains $Computer)
ClusterName = $clusterName
ClusterNodes = ($nodes -ne $Computer)
FullName = {
If ($Instance -eq 'MSSQLSERVER') {
$Computer
} Else {
"$($Computer)\$($instance)"
}.InvokeReturnAsIs()
} Catch {
Write-Warning ("{0}: {1}" -f $Computer,$_.Exception.Message)
When I run this command, I get:
PS C:\Users\scj0025\Documents> Get-SQLInstance -ComputerName poly04406
SQLInstance   : SQL642K5_01
Version       : 9.2.3042.00
isCluster     : False
Computername  : poly04406
FullName      : poly04406\SQL642K5_01
isClusterNode : False
Edition       : Enterprise Edition (64-bit)
ClusterName   : 
ClusterNodes  : {}
Caption       : SQL Server 2005
SQLInstance   : CONSQL2K8
Version       : 10.0.2531.0
isCluster     : False
Computername  : poly04406
FullName      : poly04406\CONSQL2K8
isClusterNode : False
Edition       : Enterprise Edition
ClusterName   : 
ClusterNodes  : {}
Caption       : SQL Server 2008
I notice to get this information the get-sqlinstance script is looking at the registry.. is that the "Better" way to get an accurate list of this?
(I understand they are looking for different things, but why wont the first script pick up the different instances on the server, I wonder...)

Similar Messages

  • Automatically read last backup date

    I've noticed that whether or not the Time Machine volume is mounted, the icon in the menu bar displays the last backup date. Is there any way I can read this data from the command line? I found the excellent tms utility (http://fernlightning.com/doku.php?id=software:misc:tms) but it seems to only give the date of last backup if the volume is mounted.
    I'm trying to create a simple script that notifies (via email) me if someone in my office hasn't backed up with Time Machine in over X days. Any help would be much appreciated.

    I'm not sure where it's recorded on the disk when the TM drive is unmounted but you can see it in system log. so if you grep through the log you'll find the record of the last backup. to see just the date the following will do for example
    cat /private/var/log/system.log |grep backup |tail -1 | awk '{print $1" " $2" "$3}'
    However, those logs are periodically recycled and if you don't back up in a while this info will be gone from the current system log and the command will return an empty output. you'd have to deal with that somehow. you could for example run the command periodically with a launch daemon and and store the outcome in a file so long as the outcome is not empty.

  • Last backup date blank

    Even though my Time Machine appears to be working, the Last Backup date is blank both in the menu bar status and in System Preferences. How do I correct this?

    I'm not sure where that's stored, but it may be in the preference file.
    Stop TM, de-select your TM drive (select "none"), note any exclusions in Options and quit System Preferences.
    Trash the file /Libarary/Preferences/com.apple.TimeMachine.plist (not in your home folder).
    Go back to TM Preferences, re-select your TM drive, re-enter any exclusions, turn TM back on (and perhaps do a +Back Up Now.)+

  • What’s up with “Last Backup” date?

    I have a 10g database running on Redhat and I can never get the Last Backup date to change. I was set by the Oracle default backup and has not changed yet. As you can see the data is 4/17/04.
    High Availability
    Instance Recovery Time (seconds) 12
    Last Backup Apr 17, 2004 2:07:53 AM
    Archiving Enabled
    Problem Archive Areas 2
    Flashback Logging Disabled
    When I click on the date link this page shows a more current backup, I think? Any idea what is going on? Is my database backed up?
    Results
    Select All | Select None
    Select Key Tag Completion Time Contents Device Type Status Obsolete Keep Pieces
    249 TAG20050330T023107 Mar 30, 2005 2:31:10 AM SPFILE, CONTROLFILE DISK AVAILABLE NO NO 1
    248 BACKUP_MAIN.ARGUSR_033005021640 Mar 30, 2005 2:30:53 AM ARCHIVED LOG DISK AVAILABLE NO NO 1
    244 BACKUP_MAIN.ARGUSR_033005021640 Mar 30, 2005 2:23:15 AM DATAFILE DISK AVAILABLE NO NO 1

    Fraid so .. there are way too many weird things and gotchas with this product.
    At this point I would delete the database from oem.
    Go into targets, select the db click remove.
    After about 10 minutes (or check the Management tab, overview .. verify the deletion was complete.
    Go back to the agent tab, click Go to the database prompt for it to rediscover the database.

  • What would happen if I turn off my backup and delete backup data From my device? Will it delete my music and everything for ever or just stay in the cloud but not on my device?

    What would happen if I turn off my backup and delete backup data From my device? Will it delete my music and everything for ever or just stay in the cloud but not on my device?

    If you have multiple devices backing up to the Cloud, you will see all of them listed. You would click on each device to change what is backed up from that device. You can then delete your individual back-ups.
    Once you have all your settings to your liking, you can then go back to Settings>iCloud>Storage & Backup, and click on Back Up Now (bottom of the screen) to create a fresh backup with your new settings.
    Cheers,
    GB

  • SQL to generate last weeks date(not a stored procudure)

    I need SQL to generate last weeks dates starting from Monday to Sunday. I don't want to use any table data or stored procedure. I need inline SQL. Please help me with your suggestions. Thanks in advance for the help.

    varun wrote:
    I need SQL to generate last weeks dates starting from Monday to Sunday. I don't want to use any table data or stored procedure. I need inline SQL. Please help me with your suggestions. Thanks in advance for the help.below should get you started
      1* SELECT SYSDATE-LEVEL from dual CONNECT BY LEVEL < 8
    SQL> /
    SYSDATE-L
    21-APR-13
    20-APR-13
    19-APR-13
    18-APR-13
    17-APR-13
    16-APR-13
    15-APR-13
    7 rows selected.

  • Query users, access level and last logon date

    <p>Hello,</p><p> </p><p>Does anybody know how to query Essbase to look up users accesslevel and last logon date?</p><p> </p><p> </p><p>Rey Fiesta</p>

    It can be done using the API. Access level is a little complicated because it can be by individual or group they belong to and it of course is different by application/database

  • Exchange 2010 server with 2 DAG servers - DAG1 and DAG2 - backup with 2 DPM servers one for each DAG server

    Hello,
      Please advice, i have an Exchange 2010 server with 2 DAG servers - DAG1 and DAG2 - backup with 2 DPM servers, one for DAG1 and one for DAG2 is it possible ?

    Hi,
    I confirmed with Exchange support team that DAGs could be backed up separately.
    Meanwhile backup database is important if you need to recover both Exchange server settings and database. See:
    Recover a database availability group member server
    http://technet.microsoft.com/en-us/library/dd638206.aspx
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Time Machine shows no last backup date or oldest backup date

    Hi,
    Sorry for the long title and if this question has already been posted, a search didn't show it up. I'm running leopard 10.5.6 on my iMac 2.4ghz intel, and the time machine icon in the menu bar has stopped showing the date of the last backup and when I check in sys pref no date info is shown for the most recent of the oldest.
    Anyone have any idea how to cure this.
    Thanks.
    Jez.

    I have been using TM for about a month with a new LaCie d2 Quadra. I do not know how this is calibrated for dates. When I activate TM it shows today. For anything back from there it dates everything January 17, 2009 6:45 PMCDT until it goes back to February. In the spot indicating the latest backup it is Jan 17 09 6:45 PMCDT for today. What do you think is responsible for time and date being the same and the actual backups are dated with the wrong date going back until clicking back in time it's the Jan. date until March 20,2009 January 17,2009 6:45 AMCDT. I tried the com.apple.TimeMachine.plist idea. No change.

  • Last Backup Date doesn't change

    Since installing BB Desktop 6 (including the beta), my last desktop date has never changed from my initial install date (7/26/10 @ 5:25 pm).
    I had hoped the release version would solve this.  I back up daily, but the date does not change on the DM6 "home screen".  I have verified that the back-ups are in the correct path and are valid back up files (I can restore data).
    I have searched through the registry and various RIM files in the users/appdata, program files/common files directories, but see no file that is obviously the source of the date fed to DM on start-up.
    I tried a repair install.  No dice.
    My install was an upgrade from 5.0.1, and I didn't wipe and reinstall because I didn't want to lose my add-in sync and custom filter options.  In DM5, I had weekly back-up set and it worked like clockwork...although I couldn't see the date, it was obviously keeping track...now if I set to weekly, it attempts to back up whenever I connect because it thinks it is 2 weeks late.
    If this is the worse issue I have with DM6, so be it...just annoying more than anything else...
    Also...I installed on 2 other PCs (3 total)...the issue is only present on the 1 PC.

    In the case of the Browser Data Cace that one is really easy to get rid of. 
    Start Desktop Software 6
    Attach your BB
    Wait for, or cancel the sync / backup
    Click Device
    Click Delete Device Data
    Change the radio button from "All data" (Why is that the default?) to "Selected data"
    Scroll down to "Browser Data Cache" and check it.
    Uncheck the "Back up data" box, since you are unable to backup this database anyway...
    Click Delete
    When asked to confirm the deletion, click "Ok"
    You shoudl see a progress bar and the message "Deleting Browser Data Cache"
    Once it completes, you will get a dialog that says "Your data has been deleted", click close.
    That shoudl return the browser data cache to a clean state and eliminate the problem.   I'm not sure if the same procedure will work on your profile database or not.  I know in my case when the profile database gets corrupted, I end up restoring it from a backup before the corruption, and it ends up being fine again for a long time.
    John Wohlers

  • PowerShell Active Directory: Get last logon date of a deleted user

    So, my first post in this noble community. I've been lurking here and I've been getting some good information. Hopefully, you guys can help me in this concern which may be simple to some but I couldn't seem to get around it.
    Is it possible to get the last logon date of a DELETED user in Active Directory?
    I can get the available properties of deleted users using the following:
    Get-ADObject -Filter {samaccountname -eq <account_name> -and ObjectClass -eq "user"} -IncludeDeletedObjects -Properties *
    But the last logon date is not one of the properties available from Get-ADObject. Get-ADUser has the last logon property, but it does not have data on deleted users. Is there anyway this can be achieved? Perhaps convert an ADObject to an ADUser?
    Any information would be much appreciated. Thank you.

    Thanks everyone for your response. It looks like jrv is leading me to the right path, but I'm still having issues. I'm trying to get the lastlogon time by querying all the DCs in our domain, but every query returns a null lastlogon time for all the deleted
    users I tried:
    $DomainControllers = ((Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ }).Name
    foreach ($DC in $DomainControllers)
        $dn=(Get-ADObject -Filter {samaccountname -eq <user_account>} -includedeletedobjects -server $DC).DistinguishedName
        $user=[adsi]"LDAP://$dn"
        $user.LastLogon
    It always returns null. Morever, simply executing [adsi]"LDAP://$dn" from each DC gives the following error:
    format-default : The following exception occurred while retrieving member
    "distinguishedName": "There is no such object on the server.
        + CategoryInfo          : NotSpecified: (:) [format-default], ExtendedType
       SystemException
        + FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Comm
       ands.FormatDefaultCommand
    It's a bit surprising to me though, since $user=[adsi]"LDAP://$dn" does return a value for $user (instead of null whenever an error is encountered) of type System.DirectoryServices.DirectoryEntry but it has no members.
    Anyone know what I'm missing?

  • First Generation Ipod Shuffle: Play count and Last Played date

    I have a 1st Gen Ipod shuffle that works great in all other respects but it doesn't track the number of "plays" or the "last play" dates. Which means I can't use the "Smart Playlists" Itunes feature to be sure that the music on it stay fresh, non-repetitive. Another problem is if I listen to a podcast on the Ipod Shuffle then in Itunes the podcast appears as though it has never played before. This gets confusing as I listen to a number of podcasts.
    I have tried resetting and restoring the Ipod shuffle. Is there anything I can do to it to make it track the number of plays or last played dates?

    All my tracks should be MP3s or AAC.  I ripped them myselfs with iTunes.  I may have bought some songs directly off of record labels or some other online music store, but I own my music legally whether I bought it on CD or got given it by magazines or record labels.
    I went to the gym today.  I set the shuffle to random.  Some songs were synched back to iTunes but they weren't the songs I listened to, at least not all of them.  Some of them may have been the songs I listened to last workout, at least one or two of the songs updated I did listen to today.
    I listened to some other songs last night on my main Mac so it is easy to determine which songs iTunes updated this morning.
    I haven't had much time to play with Match.  It is still updating and uploading, it has 6000 songs to go.  That means in a half month of trying it has managed to find and/or upload a little over 1000 songs actually close to 2000 now.  It is something, but it isn't the service I was sold.  All my songs and playlists were supposed to be available in the cloud.  That hasn't happened and in the case of my smart playlists will never happen. 
    I'll read you link, but I wrote a blog posting how I was disappointed with the service so far.
    Thanks!

  • IPod Shuffle 2 no longer updating playlist play count and last played date

    I use my shuffle 2 in the gym.  When I'm done working out I sync and the most recently played songs are rotated off using a smart play list.  This is no longer working.  I reset the shuffle 2, I've forced sync and auto filled many times.  My latest workout it still lists all the songs I just listened to in the order I listened to them and has their last played date as many months ago.
    This seems to be affecting my other iPod too, but it is tougher to diagnose.  I signed up to iTunes Match and after several days that is still running but I noticed this problem long before iTunes Match became available in Canada.  Both my iPod Shuffle and iTunes are up to date but my music is on an older but upgraded Mac.  It has a G4 so no Lion upgrade, I just checked it is 10.5.8

    All my tracks should be MP3s or AAC.  I ripped them myselfs with iTunes.  I may have bought some songs directly off of record labels or some other online music store, but I own my music legally whether I bought it on CD or got given it by magazines or record labels.
    I went to the gym today.  I set the shuffle to random.  Some songs were synched back to iTunes but they weren't the songs I listened to, at least not all of them.  Some of them may have been the songs I listened to last workout, at least one or two of the songs updated I did listen to today.
    I listened to some other songs last night on my main Mac so it is easy to determine which songs iTunes updated this morning.
    I haven't had much time to play with Match.  It is still updating and uploading, it has 6000 songs to go.  That means in a half month of trying it has managed to find and/or upload a little over 1000 songs actually close to 2000 now.  It is something, but it isn't the service I was sold.  All my songs and playlists were supposed to be available in the cloud.  That hasn't happened and in the case of my smart playlists will never happen. 
    I'll read you link, but I wrote a blog posting how I was disappointed with the service so far.
    Thanks!

  • SQL Inseting a Set Of Data To Run SQL Queries and Produce a Data Table

    Hello,
    I am an absolute newbie to SQL.
    I have purchased the book "Oracle 10g The Complete Reference" by Kevin Loney.
    I have read through the introductory chapters regarding relational databases and am attempting to copy and paste the following data and run an SQL search from the preset data.
    However when I attempt to start my database and enter the data by using copy and paste into the following:
    C:\Windows\system32 - "Cut Copy & Paste" rem **************** onwards
    I receive the following message: drop table Newspaper;
    'drop' is not recognised as an external or internal command, operable programme or batch file.
    Any idea how one would overcome this initial proble?
    Many thanks for any solutions to this problem.
    rem *******************
    rem The NEWSPAPER Table
    rem *******************
    drop table NEWSPAPER;
    create table NEWSPAPER (
    Feature VARCHAR2(15) not null,
    Section CHAR(1),
    Page NUMBER
    insert into NEWSPAPER values ('National News', 'A', 1);
    insert into NEWSPAPER values ('Sports', 'D', 1);
    insert into NEWSPAPER values ('Editorials', 'A', 12);
    insert into NEWSPAPER values ('Business', 'E', 1);
    insert into NEWSPAPER values ('Weather', 'C', 2);
    insert into NEWSPAPER values ('Television', 'B', 7);
    insert into NEWSPAPER values ('Births', 'F', 7);
    insert into NEWSPAPER values ('Classified', 'F', 8);
    insert into NEWSPAPER values ('Modern Life', 'B', 1);
    insert into NEWSPAPER values ('Comics', 'C', 4);
    insert into NEWSPAPER values ('Movies', 'B', 4);
    insert into NEWSPAPER values ('Bridge', 'B', 2);
    insert into NEWSPAPER values ('Obituaries', 'F', 6);
    insert into NEWSPAPER values ('Doctor Is In', 'F', 6);
    rem *******************
    rem The NEWSPAPER Table
    rem *******************
    drop table NEWSPAPER;
    create table NEWSPAPER (
    Feature VARCHAR2(15) not null,
    Section CHAR(1),
    Page NUMBER
    insert into NEWSPAPER values ('National News', 'A', 1);
    insert into NEWSPAPER values ('Sports', 'D', 1);
    insert into NEWSPAPER values ('Editorials', 'A', 12);
    insert into NEWSPAPER values ('Business', 'E', 1);
    insert into NEWSPAPER values ('Weather', 'C', 2);
    insert into NEWSPAPER values ('Television', 'B', 7);
    insert into NEWSPAPER values ('Births', 'F', 7);
    insert into NEWSPAPER values ('Classified', 'F', 8);
    insert into NEWSPAPER values ('Modern Life', 'B', 1);
    insert into NEWSPAPER values ('Comics', 'C', 4);
    insert into NEWSPAPER values ('Movies', 'B', 4);
    insert into NEWSPAPER values ('Bridge', 'B', 2);
    insert into NEWSPAPER values ('Obituaries', 'F', 6);
    insert into NEWSPAPER values ('Doctor Is In', 'F', 6);

    You need to be in SQL*Plus logged in as a user.
    This page which I created for my Oracle students may be of some help:
    http://www.morganslibrary.org/reference/setup.html
    But to logon using "/ as sysdba" you must be in SQL*Plus (sqlplus.exe).

  • What does the First and Last Unbrick date mean?

    I got an iphone 4 from someone and it's supposed to be on Telus but isn't working with their sims. I got it checked on iphoneosunlock.com and they confirmed its with telus but also said was:  
    First Unbrick Date: 23/08/12
    Last Unbrick Date 30/08/13
    The last unbrick date is tomorrow so does anyone know what this means or what will happen?

    Apple refers to activating a device as "unbricking." Your "last unbrick date" is the last date the device was activated with a carrier according to Apple's systems. As this information is always sent to Apple from all carriers that want to activate devices with a carrier profile (device settings specific to each carrier). If you activate a device with multiple carriers through its life (take it from T-Mobile to Aio Wireless for example), it will have multiple unbrick dates in the device history maintained with Apple.

Maybe you are looking for