Need help in writing test cases while upgradin oracle from 10g to 11g
hi all
I want to write test cases for ugrading oracle 10g to 11g i have some idea but want your input.and at the same time some people taking upgrade testing as to ensure that everything works after the upgrade - stremas, jobs, procedures.but i think as 11g is backward compatible all the things should work properly.If not then how can we write a test cases for that,your help is most welcome.
Thanks in advance
Hi;
Please see below notes which could give you some idea to create your test case. By the way if your components are certified wiht 11g so there should be any bad issue for your upgrade
Minimizing Downtime During Production Upgrade [ID 478308.1]
Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
Different Upgrade Methods For Upgrading Your Database [ID 419550.1]
Please check my blog
http://heliosguneserol.wordpress.com/2010/06/17/move-to-oracle-database-11g-release-2-wiht-mike-dietrich/
In this pdf you can see patch of to upgrade db from x to n wiht many senerios wiht all related metalinks notes which is created by Oracle worker Mike Dietrich
Regard
Helios
Similar Messages
-
Need help for writing extract program
hi
i need help for writing extract program to retriew data from legacy system.
i already developed bdc programs for me31k and me21.
my requirement is to write extract program s for those t.codes.
to retriew data from legacy system and stored in flat file.i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
You haven't posted ANY 'java program' for us to help with.
The forum is NOT a coding service. It is to help you with YOUR code.
Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment. -
Need help with writing a query with dynamic FROM clause
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'Simply sticking the later query in the first query does not work.
Any pointers will be appreciated.
Thanks
rogers42Hi,
rogers42 wrote:
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'
Remember that anything inside quotes is case-sensitive. Is the owner really "Schema_Name" with a capital S and a capital N, and 8 lower-case letters?
Simply sticking the later query in the first query does not work.Right; the table name must be given when you compile the query. It's not an expression that you can generate in the query itself.
Any pointers will be appreciated.In SQL*Plus, you can do something like the query bleow.
Say you want to count the rows in scott.emp, but you're not certain that the name is emp; it could be emp_2011 or emp_august, or anything else that starts with e. (And the name could change every day, so you can't just look it up now and hard-code it in a query that you want to run in the future.)
Typically, how dynamic SQL works is that some code (such as a preliminary query) gets some of the information you need to write the query first, and you use that information in a SQL statement that is compiled and run after that. For example:
-- Preliminary Query:
COLUMN my_table_name_col NEW_VALUE my_table_name
SELECT table_name AS my_table_name_col
FROM all_tables
WHERE owner = 'SCOTT'
AND table_name LIKE 'E%';
-- Main Query:
SELECT COUNT (*) AS cnt
FROM scott.&my_table_name
;This assumes that the preliminary query will find exactly one row; that is, it assumes that SCOTT has exactly one table whose name starts with E. Could you have 0 tables in the schema, or more than 1? If so, what results would you want? Give a concrete example, preferably suing commonly available tables (like those in the SCOTT schema) so that the poepl who want to help you can re-create the problem and test their ideas.
Edited by: Frank Kulash on Aug 11, 2011 2:30 PM -
Need help in writing data from JSP to excel
Hi ,
I need help in writing the data from JSP to excel.I somehow able to retrieve the data into excel but unable to get the required format.
For eg: The amount should be displayed in 0.00 format .when i am exporting it to excel it is displaying as 0 :( .
I am using the following code in JSP.
"out.print(amt + '\t');"
Would like to know if there is any otherway where in i can get my requirement.
Thanks
TomHi,
Try using format part of the JSTL tag libs.
Syntax :
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatNumber value="40" pattern="$#,##0.00"/>
I need help in writing the data from JSP to excel.I
somehow able to retrieve the data into excelHow do u convert the jsp to excel?
One way to convert the jsp page to excel, is to render it as an excel appl instead of html. Set the content type of the response to application/ms-excel.
response.setContentType("application/ms-excel")Hope this Helps.... -
I need help in resolving a problem that prevents me from accessing the iTunes store. Message reads " iTunes cannot contact the iTunes store" and also says that my laptop is no longer authorized to access my account. Help!
Go up to the top of your screen on iTunes and click on 'Store'. Then go down to 'Authorize This Computer'. That should cover part of it unless you've already authorized a bunch of other computers to use your account. If that's the case, you'll have to go to one of those computers and click the button just below it to 'deauthorize your account' from that computer. If you're not able to access the store, check your internet connection to make sure you are connected. Hope this helps.. good luck!
-
hy i need help i want to downgrade my iphone 4 from ios 6.0.1 to 5.1.1 how can i do because i dont like the ios 6. pls help thank
There's no official way to do that. Downgrading was never supported since the first iPhone.
-
hi
i need help please . when i want to buy app from store ask me the security question
but i forgot the answer
so i need to the link to rest answer of security questionThe Best Alternatives for Security Questions and Rescue Mail
a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
b. Call Apple Support in your country: Customer Service: Contact Apple support.
c. Rescue email address and how to reset Apple ID security questions. -
Hi All,
I need help on Configuring the Site to Site VPN from Cisco 2811 to Websense Cloud for web Traffic redirect
2811 having C2800NM-ADVIPSERVICESK9-M
2811 router connects to the Internet SW then connects to the Internet router.
Note- For Authentication am using the Device ID & Pre share key. I am worried as all user traffic goes with PAT and not firing up my tunnel for port 80 traffic. Can you please suggest what can be the issue ?
Below is router config for VPN & NAT
crypto keyring ISR_Keyring
pre-shared-key hostname vpn.websense.net key 2c22524d554556442d222d565f545246
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp keepalive 10
crypto isakmp profile isa-profile
keyring ISR_Keyring
self-identity user-fqdn [email protected]
match identity user vpn-proxy.websense.net
crypto ipsec transform-set ESP-NULL-SHA esp-null esp-sha-hmac
crypto map GUEST_WEB_FILTER 10 ipsec-isakmp
set peer vpn.websense.net dynamic
set transform-set ESP-NULL-SHA
set isakmp-profile isa-profile
match address 101
interface FastEthernet0/1
description connected to Internet
ip address 216.222.208.101 255.255.255.128
ip access-group HVAC_Public in
ip nat outside
ip virtual-reassembly
duplex full
speed 100
no cdp enable
crypto map GUEST_WEB_FILTER
access-list 101 permit tcp 192.168.8.0 0.0.3.255 any eq www
access-list 103 deny ip 192.168.8.0 0.0.3.255 host 85.115.41.187 log
access-list 103 deny ip 192.168.8.0 0.0.3.255 host 85.115.41.181 log
access-list 103 deny ip 192.168.8.0 0.0.3.255 host 85.115.41.182 log
access-list 103 deny ip 192.168.8.0 0.0.3.255 86.111.216.0 0.0.1.255
access-list 103 deny ip 192.168.8.0 0.0.3.255 116.50.56.0 0.0.7.255
access-list 103 deny ip 192.168.8.0 0.0.3.255 86.111.220.0 0.0.3.255
access-list 103 deny ip 192.168.8.0 0.0.3.255 103.1.196.0 0.0.3.255
access-list 103 deny ip 192.168.8.0 0.0.3.255 177.39.96.0 0.0.3.255
access-list 103 deny ip 192.168.8.0 0.0.3.255 196.216.238.0 0.0.1.255
access-list 103 permit ip 192.168.8.0 0.0.3.255 any
ip nat pool mypool 216.222.208.101 216.222.208.101 netmask 255.255.255.128
ip nat inside source list 103 interface FastEthernet0/1 overload
ip nat inside source route-map nonat pool mypool overloadHow does Websense expect your source IPs in the tunnel? 192.168.8.0 0.0.3.255 or PAT'ed 216.222.208.101 ?
Check
show crypto isakmp sa
show crypto ipsec sa
show crypto session
You'd better remove the preshared key from your post. -
Error while migrating from 10g to 11g
Hi
I am migrating a bpel process wit partner link activity from 10g to 11g
I got an error.It says there is no composite file in the process .so, migration is filed.
Pls help me...Hi Eric,
Thanks for the reply.Here is the info in the logfile.
INFO: UPGBPEL-02036: Starting migration for source projects in the list : "C:\jdevstudio10131\jdev\mywork\myBPELApplication\PickDemo.backup.backup"
INFO: UPGBPEL-02029: Backed up source contents can be found in: "C:\jdevstudio10131\jdev\mywork\myBPELApplication\PickDemo.backup.backup.backup"
INFO: UPGBPEL-02007: Using source directory list: "C:\jdevstudio10131\jdev\mywork\myBPELApplication\PickDemo.backup.backup\bpel"
INFO: UPGBPEL-02008: Using target directory: "C:\jdevstudio10131\jdev\mywork\myBPELApplication\PickDemo.backup.backup"
INFO: UPGBPEL-02047: Upgrade messages are available in log file : "C:\OFM\jdev_home\jdeveloper\\upgrade\logs\PickDemo.backup.backup2010-08-16-15-43-33PM.log"
INFO: Suitcase directory is C:\jdevstudio10131\jdev\mywork\myBPELApplication\PickDemo.backup.backup\bpel
INFO: There are 0 task files in the suitcase
INFO: No more than one .task file in the upgrade source directory and hence not upgrading the bpel src
INFO: UPGBPEL-02041: Retrieving wsdl for partnerLink "AsyncWait" from "http://xppro:8888/orabpel/default/AsyncWait/AsyncWait?wsdl". This wsdl location can be used later for any manual setup of composite reference binding, if the upgrade plan includes using 1013x endpoints for the interim.
SEVERE: Upgrade failed. Check the logs for any exceptions. Ensure that the WSDL URLs specified in the project are reachable and a valid 10.1.3.x project is used for upgrade. Before re-attempting upgrade, restore the original project code source from the backup directory.
java.net.ConnectException: Connection refused: connect
at oracle.viewgen.plugin.bpel.BPELPlugin.createComponentType(BPELPlugin.java:172)
at oracle.viewgen.ViewGenerator.main(ViewGenerator.java:223)
Caused by: oracle.j2ee.ws.wsdl.LocalizedWSDLException: WSDLException: faultCode=PARSER_ERROR: Failed to read wsdl file at: "http://xppro:8888/orabpel/default/AsyncWait/AsyncWait?wsdl", caused by: java.net.ConnectException. : java.net.ConnectException: Connection refused: connect
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:371)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:615)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:258)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:229)
at oracle.viewgen.wsdl.WSDLUtil.getWSDL(WSDLUtil.java:60)
at oracle.viewgen.componentType.bpel.BpelDDUtil.checkAndUpdateBPELDD(BpelDDUtil.java:477)
at oracle.viewgen.plugin.bpel.BPELPlugin.createComponentType(BPELPlugin.java:107)
... 1 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.<init>(Socket.java:372)
at java.net.Socket.<init>(Socket.java:215)
at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:212)
at HTTPClient.HTTPConnection$EstablishConnection$2.run(HTTPConnection.java:4268)
at HTTPClient.HttpClientConfiguration.doAction(HttpClientConfiguration.java:708)
at HTTPClient.HTTPConnection.doAction(HTTPConnection.java:5379)
at HTTPClient.HTTPConnection$EstablishConnection.run(HTTPConnection.java:4254)
i dont have any clue on this error. -
Hi,
Please help in writing a UDF for these fields in mapping, which I need for the object Iu2019m doing currently.
The fields are like this:
1) batch_no = "TRUNC((GetMaxObjid('x_txn_sap_parts')-POWER(2,28))/5000)+1",
2) lot_id = "TRUNC((GetMaxObjid('x_txn_sap_parts')-POWER(2,28))/500)+1",
3) How to use JDBC connection factory class in the UDF.
Some logic I can provide which I know i.e. Power (2, 28) means 2 to the power of 28 (2 multiplied 28 times), Trunc means truncate, X_TXN_SAP_Parts is a database table.The Target fields are Batch_no, lot_id & Objid.Actually, objid is mapped initially to a source field i.e. Object ID and in this function it is only being used for the calculation of the batch_no.
Thanks in Advance,
Sreedhar.Hi,
Following with my query I've tried to use this code but still I'm unable to execute the mapping.
import java.util.*;
import com.sap.aii.mapping.lookup.*;
import com.sap.aii.mapping.lookup.*;
DataBaseAccessor accessor = null;
DataBaseResult JDBCOutPayload = null;
String BusinessSystem="clarify_dev_bizsys";
//give your business system having channel name
String CommunicationChannel="JDBC_TO_CDEV";
//give your channel name
String InputPayload= " select X_TXN_PRE_SITE_XFACE.nextval from dual;";
//give your sql query
try {
Channel channel =
LookupService.getChannel(BusinessSystem,CommunicationChannel);
accessor = LookupService.getDataBaseAccessor(channel);
DataBaseResult resultSet = accessor.execute(InputPayload);
for(Iterator rows = resultSet.getRows();rows.hasNext();){
Map rowMap = (Map)rows.next();
Object cValue = rowMap.get("batchno");
//field name of field required , as in database
catch (Exception e) {}
finally {
if (accessor != null)
accessor.close();
result.addValue((String)cValue);
--> I don't know what are the parameters to be used and how to be used in the UDF because this is the first time I'm writing a UDF.
--> The problem in using this query is that both OBJID & BatchNo. are on the target side and the value for the OBJID is retrieved by a SELECT query from the database.
Kindly help me how to resolve this query of mine.
Thanks in Advance.
Sreedhar. -
Need help in writing a vbscript
Hi,
I need help in wring a vbscript. I have serached for the vbscript on the net, but could not find any.
I need to add a file to an msi using vbscript. - That's the requirement.
For this I have done the following with the help of vbscript.
1. With the insert statement I inserted a new copmonent in the FeatureComponent Table.
2. Now the next thing I did is, I inserted a new row in the File table using insert statement again. The file is uncompressed.
3. Since the file is a non-version file I also added a row in the MSIFileHash table.
4. Also, now added the Component in the component table.
After doing this I am able to see the chnages in the mst, however whrn I try to install it I get an error 2725 (Invalid database tables).
Can somebody please post a vbscript which can add a file to an msi?Hi All,
Thanks for all your responses.
Yes, It is not so easy. I never said it was. Thanks for pointing out Orca. We use Orca on a daily basis.
What exactly I am looking at, is this.
We have some standard applications which needs to be repackaged every month. The repackaging process is same and does not change at least for these packages. So I was actually looking at automating these things.
What I did so far.
First we have created an object for Windows installer. I have then taken a copy of the original msi and then opened the database of this temporary msi database in transact mode. Once the database is opened we can use select, insert, update
and delete statements to update the database.
I could successfully add a registry to the msi. The component was also added successfully to the component table. I also could make changes to the Property table.
The tricky part comes with the addition of file to the file table.
The addition of file requires the following steps.
1. Add a new row to the file table. This can be done with the Insert statement.
2. We then need to associate the file to a new component or any other component already existing in the msi. In my case I am creating a new component.
3. We then have to associate this components to a feature in the FeatureComponents table.
4. Since the file I am adding is a non-versioned file, a new row also has to be added to the MSIFILEHASH table.
I could see the changes that I have done using the mst. But when I try to install the msi with the mst, I get the error 2725. I checked everything. All the other steps except for the file addition works fine.
To check whether I am indeed right, I have did this.
Skipped the file addition part to the msi. Every other change that I make works and I am able to install the msi with the mst successfully.
For obvious security reasons I will not be able to share the vbscript with you. If you guys think, that this is not a right forum for this question, please let me know the right forum. I have been stuck with this issue from the past 6 months. Any help would
really be appreciated. -
Need help in writing an update statement
Hi,
my requirement is as follows..
I have a simple table with just three fields in it
Field_1 Field_2 Field_3
A 1 2
A 0 5
A 2 1
A 3 4
B 1 3
C 2 3
given a value of field_1 i need to select a row that has min(field_2)
in this case the 2nd row from the above table if the value given is "A".
any help will be greatly appreciated.
thanks.Your subject says "update" but your requirement was a "select" statement.
Don't say I never give any options:
sql>select * from x;
F FIELD_2 FIELD_3
A 1 2
A 0 5
A 2 1
A 3 4
B 1 3
C 2 3
6 rows selected.
sql>select *
2 from x t1
3 where field_1 = 'A'
4 and field_2 = (select min(t2.field_2)
5 from x t2
6 where t2.field_1 = t1.field_1
7 group by t2.field_1);
F FIELD_2 FIELD_3
A 0 5
1 row selected.
sql>select *
2 from x
3 where (field_1, field_2) in (select field_1, min(field_2)
4 from x
5 where field_1 = 'A'
6 group by field_1);
F FIELD_2 FIELD_3
A 0 5
1 row selected.
sql>select field_1, field_2, field_3
2 from (select x.*, row_number() over (order by field_2) rn
3 from x
4 where field_1 = 'A')
5 where rn = 1;
F FIELD_2 FIELD_3
A 0 5
1 row selected.
sql>select *
2 from (select *
3 from x
4 where field_1 = 'A'
5 order by field_2)
6 where rownum = 1;
F FIELD_2 FIELD_3
A 0 5
1 row selected. -
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Private-owned deletes and batch writing test case
Has someone dealt with the following scenario ?
I have an order containing order items a a private owned one-to-many relation ship.
When i delete many order lines toplink generates the delete commands for order items and orders. When using batch writing the delete commands are generated in a way that the batch writing is useless (each delete command is generated on its own batch command as the following:
[TopLink Finer]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--Begin batch statements
[TopLink Fine]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--DELETE FROM TL_ORDER_ITEM WHERE (ORDER_ID = ?)
[TopLink Fine]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])-- bind => [1]
[TopLink Finer]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--End Batch Statements
[TopLink Finest]: 2008.03.03 05:57:10.359--UnitOfWork(8066625)--Thread(Thread[main,5,main])--Execute query DeleteObjectQuery( Customer Order #26 Date Ordered: java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Paris",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=184,lastRule=java.util.SimpleTimeZone[id=Europe/Paris,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2004,MONTH=9,WEEK_OF_YEAR=43,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=296,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=3600000,DST_OFFSET=3600000] Order Total: 2550.0)
[TopLink Finest]: 2008.03.03 05:57:10.359--UnitOfWork(8066625)--Thread(Thread[main,5,main])--Register the existing object Order Item: #5 Quantity: 1
[TopLink Finer]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--Begin batch statements
[TopLink Fine]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--DELETE FROM TL_CUSTOMER_ORDER WHERE (ORDER_ID = ?)
[TopLink Fine]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])-- bind => [1]
[TopLink Finer]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--End Batch Statements
If the test case does not define a private owned relation and all the deletes are done in the toplink application (first order items and the orders then the bach writing contains all the deletes.
Any hint to have batch writing and private-owned deletes behaving on the same batch chunk on Toplink 10.1.3.3 ?Ok ill try to make a incompete code with the example of the problem in comments.
class studenttest;
//this is the messed up part all the way at the bottom of the class
case 6:
ts.write(NodeList);
break;\\\\\\\\\\\\\\
public class TStream{
private StudentNodeList NodeList = new StudentNodeList();
//calls this method
//had it as public void write (StudentNodeList NodeList)
public void write(Student NodeList)
try
output = new PrintWriter("database.txt");
for(int i = 0; i < 5; i++)
// had it as output.print(NodeList.equals(LastName) + "\t");
output.print(NodeList.getFirstname() + "\t");
output.print(NodeList.getLastname() + "\t");
output.print(NodeList.getID() + "\t");
output.print(NodeList.getyear() + "\t");
output.print(NodeList.getgpa() + "\t");
output.println();
} -
Need help in writing a vbs script
I am very new to scripting and need help in scripting the following:
When the Windows 7 machine boots up or a user logs on (easy to do with GPO), I want to execute a script that starts some services
ONLY if the length of the computer name is less than or equal to 15 else it should exit. It has to be done in the background without any user interaction.
The script should be able to work for both x86 and x64 version of Win7.
Any help would be greatly appreciated.
Thanks in advance.
JD
JDHi,
I highly recommend that you skip VBScript and learn PowerShell instead. This is pretty trivial in PowerShell:
If ($env:COMPUTERNAME.Length -le 15) {
# Do stuff
# HINT: Look into Start-Service
Write-Host "Under limit: $env:COMPUTERNAME"
} Else {
# Do optional stuff
Write-Host "Over limit: $env:COMPUTERNAME"
(OT: jrv - happy? =])
If you must stick with VBScript for some odd reason, here's an example to get you started:
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputerName = wshNetwork.ComputerName
If Len(strComputerName) <= 15 Then
'Do stuff here when the name is short enough
WScript.Echo "Under limit: " & strComputerName
Else
'Do stuff here when the name is too long (only if you want to)
WScript.Echo "Over limit: " & strComputerName
End If
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/services/
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing)
Maybe you are looking for
-
OS download error in app store? Anyone else?
I finally got my code for the up to date program. The code was accepted. However, when it tries to download it says "waiting" and then just times out with an "error has ocurred". I can download other apps just fine. Has anyone else seen this? Su
-
Connecting an excel file as a database source in crystal
Hi I have crystal 2011 on my pc and I can easily access information in an excel file by connecting it as a data source. However, when i copy the excel file onto the SAP server and try to connect to the excel file there, it connects ok but there is
-
Appleworks document to iPod ?
Hi All , I'm starting a new cosmetic business and I've made a word processing document with photos in Appleworks for a presentation. I've printed it up and also made a disk for my iBook . The colors on the printed pages aren't true to the colors of t
-
How long has Itunes/app store been charging tax on purchases?
I purchased something for 99 cent today and received my bill and I have an 8 cent charge. Was there ever anything sent out about apple planning on charging taxes on itunes purchases? It's inconvenient to buy those gift cards when the card denominatio
-
Dear friends I mistakenly erased my iphone5 by Find my iphone app. Now I want to recover my pics and videos. In icloud I am not finding any icon folder which used to be there. I am using ios 7. Plz help me what to do. Thanks