Friday, September 29, 2017

Autosys

Request the access to the URL
How to use the URL (dozens tabs and hundreds of forms)
Install Autosys agent
create the account (name/password)
Need request autosys to reset the password
Need  to add the user to local admin group on the server 
Need to grant scheduler access to be provisioned 

Still get Error: E121104 Permission denied to process required action.
Reason: You don't have the proper naming standards ??
      True, after the name is updated, the job is created successfully


Login failed for user ... 
Need involve DBA to grant the account database access.

SQL Service Account
SQL Agent Account
Application Account
Autosys ID

login to ACCE to raise the request
    to request ACCE access, need ensure you have a PRD AD group created, and send email
      -                  AD group
-                  MAL code
-                  Mapping Values (if available)

Create PAT AD group, add autosys id to this group, ask app resource to add tthe group to local admin group
Create PRD AD group

After login, can not see the expected option from business unit 

stop sudo service cybagent stop
start sudo service cybagent start
status sudo service cybagent status

grep 'scheduler' /etc/salt/grains

ps -ef | grep -i cybagent

Thursday, September 14, 2017

English collection

Bermuda Triangle
Youth before beauty

Wednesday, August 23, 2017

Install minecraft mod on Mac (for version 1.8)

https://www.youtube.com/watch?v=7Fz6vVQr4Zk


  1. Download MineCraft 1.8.8 (taobao)
  2. Download HMCL-2.7.6.23.jar
  3. Download and install forge-1.8-11.14.4.1563-installer.jar
  4. Download TooManyItems2015_02_14_1.8_Forge.jar and lom-1.8-1.2.jar
  5. Run HMCL-2.7.6.23.jar, version choose 1.8-forge1.8- …, click Games->Mods->Add and select the mods to install
  6. Test game to verify 5 mods are loaded 

Or after buy minecraft PC & MAC
1. Download and install minecraft, make sure can login and play
2. Download forge forge-1.12.1-14.22.1.2478-installer.jar, not the forge-1.12.1-14.22.1.2478-universal.jar. The universal version will report the below error:
We appear to be missing one or more essential library files.
You will need to add them to your server before FML and Forge will run successfully.java.lang.ClassNotFoundException: net.minecraft.launchwrapper.Launch
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:44)
3. Double click and select client to install forge
4. Done

Friday, August 4, 2017

Beginning ASP.NET 4 in C# 2010 note

1.
To quick check whether IIS is installed, try http://localhost
2.
When IIS is installed, it creates a directory c:\inetput\wwwroot
3.
The "Classic" application pool is only used to keep backward compatibility.
4.
Configure the website through IIS is an easier way than to edit web.config file
5.
Use debugging only while testing the web application: debug="true"
6.
To enable tracing, add Trace="true" to <% Page ...
and add Trace.IsEnabled = true; in Page_Load method
and you can add
 Trace.Write("") to add your own message
7. Application-Level tracing
add the below in web.config <system.web>
<trace enabled="true" ...>
and access through trace.axd

Wednesday, August 2, 2017

SQL server t-sql limitation

1. Cannot use + in the parameter, say when you try to call a procedure with a parameter: @param1+'Test'
It's not supported, you have to define a new variable and set @param1+'Test' to the new variable and then call the procedure with the parameter
2. Cannot call procedure from function, need to use procedure with output parameter

Wednesday, July 26, 2017

SQL server 2012 cannot be started after reboot

When install SQL server 2012, the service cannot be started after the computer is rebooted. By checking the event log,
it mentions "this service account does not have the required user right log on as a service...".
The solution should add the "Log on as a service" right to an account on your local computer, but unfortunately, add user or group is greyed out by the domain admin.
So the real feasible solution is to uninstall and reinstall, when reinstall, set "NT AUTHORITY\NETWORKSERVICE" as the logon user for all services except "SQL Server Browser"
as it's already set to log on as "NT AUTHORITY\LOCALSERVICE".
To add "NT AUTHORITY\NETWORKSERVICE", input "Network Service" and then click "Check Names".
Now SQL server 2012 is accessible even after restart. And you can run SSMS as administrator to attach the mdf (database) which were created/used before the uninstllation.

Tuesday, July 25, 2017

SQLServer 2012 T-SQL fundamentals note

1.
Microsoft recommends that when you refer to objects in your code you always use the twopart
object names.
The examples here use a schema named dbo that is created automatically in every database and is
also used as the default schema for users who are not explicitly associated with a different schema.
2. Note that a query that uses OFFSET-FETCH must have an ORDER BY clause.
SELECT TOP (5) WITH TIES ...
SELECT orderid, orderdate, custid, empid
FROM Sales.Orders
ORDER BY orderdate, orderid
OFFSET 50 ROWS FETCH NEXT 25 ROWS ONLY;
3.
SELECT orderid, custid, val,
ROW_NUMBER() OVER(PARTITION BY custid
ORDER BY val) AS rownum
FROM Sales.OrderValues
ORDER BY custid, val;
4.
Notice the use of the letter N to prefix the string ‘D%’; it stands for National and is used to denote
that a character string is of a Unicode data type (NCHAR or NVARCHAR), as opposed to a
regular
character data type (CHAR or VARCHAR).
5.
SQL Server's identity is the counter part for Oracle's sequence
keycol INT NOT NULL IDENTITY(1, 1) CONSTRAINT PK_T1 PRIMARY KEY,
SET @new_key = SCOPE_IDENTITY(); --to get a newly generated identity value
The sequence object is a feature that was added in SQL Server 2012 as an alternative key-generating
mechanism for identity.
6.
SQL Server 2008 and SQL Server 2012 support a statement called MERGE that allows you to modify
data,
7.
BEGIN TRAN;
INSERT INTO dbo.T1(keycol, col1, col2) VALUES(4, 101, 'C');
INSERT INTO dbo.T2(keycol, col1, col2) VALUES(4, 201, 'X');
COMMIT TRAN;
8.
The GO command is not really a T-SQL command; it’s actually a command used by SQL Server’s client
tools, such as SSMS, to denote the end of a batch.
run the following code to suppress the default output produced by DML statements that indicates how
many rows were affected.
SET NOCOUNT ON;
9.
The sp_executesql stored procedure was introduced after the EXEC command. It is more secure and
more flexible in the sense that it has an interface; that is, it supports input and output parameters.
Note
that unlike EXEC, sp_executesql supports only Unicode character strings as the input batch of code.




Each instance of SQL Server can contain multiple databases like System databases master, model, tempdb, msdb and Resource.
model: The model database is used as a template for new databases. Every new database
that you create is initially created as a copy of model
tempdb: this database is destroyed and recreated as a copy of the model database every time
you restart the instance of SQL Server.
You can define a property called collation at the database level that will determine language
support, case sensitivity, and sort order for character data in that database.
In terms of security, to be able to connect to a SQL Server instance, the database administrator
(DBA) must create a logon for you. The DBA needs to map your logon to a database user in each database that you are supposed to
have access to.
Although SQL Server can write to multiple data files in parallel, it can write to only one log file at a
time, in a sequential manner. Therefore, unlike with data files, having multiple log files does not result
in a performance benefit.
a database contains schemas, and schemas contain objects. You can think of a schema as a
container of objects such as tables, views, stored procedures, and others.
Microsoft recommends that when you refer to objects in your code you always use the twopart
object names.


select user_name()
select @@VERSION