728x90

Exploring Default Installation and SQL Paths in Lync Server 2013

http://howdouc.blogspot.com/2012/11/exploring-default-installation-and-sql.html

 

 

SfB Topology Builder – Select Database File Location

http://silbers.net/sfb-topology-builder-select-database-file-location/

 

How to Install Lync SQL Express to a Non-System Drive

https://guybachar.net/2014/03/29/how-to-install-lync-sql-express-to-a-non-system-drive/

 

 

Script: Set-Cs2013Features.ps1 – Easily Install Prerequisites and Tools for Microsoft Lync Server 2013

https://www.ucunleashed.com/1697

 

Lync Server 2013: Using the DatabasePathMap Parameter to Deploy Databases

https://blogs.technet.microsoft.com/nexthop/2012/11/20/lync-server-2013-using-the-databasepathmap-parameter-to-deploy-databases/

728x90
728x90

생성한 폴더의 이름을 다음중 마음에 드는것으로 변경합니다.
컴퓨터.{20D04FE0-3AEA-1069-A2D8-08002B30309D}

제어판.{21EC2020-3AEA-1069-A2DD-08002B30309D}

휴지통.{645FF040-5081-101B-9F08-00AA002F954E}

네트워크설정.{208D2C60-3AEA-1069-A2D7-08002B30309D}

프린터및팩스.{2227A280-3AEA-1069-A2DE-08002B30309D}

인터넷환경.{DB2112AD-0000-0000-0002-000004281965}


-- 폴더를 숨기는 방법(검색해도 폴더안 내용 검색이 안된다.)


1. 위 6개의 이름중 마음에 드는것으로 폴더 이름은 바꾼다.(pc환경에 따라 안되는 이름도 있을 수 있음.win10 경우 '인터넷환경'은

안되는것 같음..)


2. 폴더이름을 바꾸면 해당 폴더가 해당 아이콘으로 바뀌고 열었을때 해당 루트로 들어가진다.

예를 들면 휴지통으로 폴더이름을 변경하면 진짜 휴지통이 된다.(단, 우클릭후 속성을 누르면 용량은 원래 폴더임을 알 수 있음)


3. 폴더 옵션에서 '숨김파일 표시 안함'으로 변경후 해당 파일을 숨긴다.


-- 폴더를 다시 되돌리는 방법


1. 폴더 옵션에서 '보호된 운영체제 파일 숨기기(권장)'옵션을 해제한다.


2. 경우에 따라 위 옵션을 해제하여도 폴더이름이 그대로인경우가 있다. 당황하지 말고 우클릭후 속성을 누르면 위 파일이름이 나온다.

따라서 속성에서 파일이름을 변경해주면 된다.


단점. 기본 윈도우 검색기능만 안먹히는것 같다. (그게 어디인가..)

그럼에도 불구하고 숨김파일 표시를 누르면 검색이 된다.

꿀뷰에 파일 넣으면 안쪽 이미지 파일 출력됨....

에브리띵은 해보지는 않았는데....아마 검색될 것으로 추정이 됨..파일이 사라지는건 아니닌까..


728x90
728x90

-- Select Into 사용 방법

1. Select * Into New_Table_Name From Org_Table_Name

 

2. Select * Into New_Table_Name From Org_Table_Name

       Where Site='한국'

 

 

-- Insert Into 사용 방법

1. 두 테이블의 컬럼이 같을때 SELECT INSERT 하기

두개의 테이블간에 컬럼이 table_a 와 table _b 처럼 완전히 일치할 때는 아래와 같이 간단하게 처리할 수 있습니다.

-- 사용법

INSERT INTO [입력될 테이블명] SELECT * FROM [검색되는 테이블명]

예1) INSERT INTO table_b SELECT * FROM table_a

위의 예1) 에서는 table_a 의 레코드 전체를 table_b 로 삽입(INSERT) 시킵니다. 만약에 조건을 주어 데이터를 삽입(INSERT) 시키려 한다면 아래와 같이 뒤에 WHERE 절만 추가해 주시면 됩니다.

예2)
INSERT INTO table_b SELECT * FROM table_a WHERE seq = 2

위의 SQL 문은 table_a 에서 seq 의 값이 2 인 레코드를 table_b 에 INSERT 시킵니다.

 

 

2 . 두 테이블간의 컬럼이 일치하지 않을때 SELECT INSERT 하기
두개의 테이블간에 컬럼이 table_a 와 table _c 처럼 일치하지 않을때는 아래와 같이 컬럼명을 지정해 주시면됩니다.

-- 사용법

INSERT INTO [입력될 테이블명] (컬럼1, 컬럼2, ... ) SELECT 컬럼1, 컬럼2, ... FROM [검색되는 테이블명]

예3) INSERT INTO table_c ( seq, Name, Email, Idate ) SELECT seq, Name, Email, Idate FROM table_a

위의 예3) 에서는 table_a 의 컬럼중 seq, Name, Email, Idate 컬럼을 table_c 에 Insert 시키고 있습니다. 한가지 주의
할 것은 table_c 의 구조가 table_b 와 다른 만큼 INSERT 될 컬럼이 SELECT 되는 컬럼과 일치하지 않으면 아래와 같은
에러가 발생하게 됩니다.

서버: 메시지 213, 수준 16, 상태 4, 줄 1
삽입 오류: 제공된 값의 개수나 열 이름이 테이블 정의와 일치하지 않습니다.

728x90
728x90

cA_Table
SET A_Column_01 = b.B_Column_01
FROM A_Table a
    INNER JOIN B_Table b
    ON a.A_Key = b.B_Key
WHERE a.A_Key is NOT NULL

 

예를 들어, A_Table의 A_Column_01의 값을 B_Table의 B_Column_01 값으로 업데이트 하려한다. 단, A_Table의 A_Key와 B_Table의 B_Key가 같은 항목에 한해서만 변경이 이루어져야 한다.
* 위와같이 Join이 필요한 업데이트 구문은 다음과 같다.

728x90
728x90

Select object_name(id) From syscomments Where text like '%테이블 명 또는 필드명%'
Group by object_name(id)
Order by object_name(id)

 

 

 

728x90
728x90

SELECT 컬럼1,컬럼2,컬럼3

FROM     테이블
GROUP BY 컬럼1,컬럼2,컬럼3

HAVING COUNT(*) > 1

728x90
728x90

서버쿼데이터를 비교하여, 결과값을 보고자하는 경우.

 

ex) A 테이블과 B 테이블을 비교하여 다른 내용이 있는경우 해당 칼럼을 출력.

 

select * from A where not exists
(select * from B where A.aa = B.aa)

 

A 테이블의 aa와 B 테이블의 aa가 다른 값인 경우, 데이터가 틀린 칼럼만 select문이 수행되어 보여진다.

728x90
728x90

해결 방법 

SQL Express 명령어로 설치

SQLEXPR_x64.exe /IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE /ACTION=Install /FEATURES=SQLEngine,Tools /INSTANCENAME=RTCLOCAL /TCPENABLED=1 /SQLSVCACCOUNT=”NT AUTHORITY\NetworkService” /SQLSYSADMINACCOUNTS=”Builtin\Administrators” /BROWSERSVCSTARTUPTYPE=”Automatic” /AGTSVCACCOUNT=”NT AUTHORITY\NetworkService” /SQLSVCSTARTUPTYPE=Automatic



증상 : SQL Express 설치 안됨.

SqlInstanceRtcLocal with a failure code of -2067922934.


728x90
728x90

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ee177028(v=technet.10)

 

Using the Where-Object Cmdlet

Filtering Returned Data

The Where-Object cmdlet provides a way for you to filter data returned by other cmdlets. For example, by default the Get-Process cmdlet returns information about all the processes currently running on your computer. However, suppose you’re interested in only those processes using more than 200 handles. (We’re not sure why you’d be interested in that, but ….) To get back only that subset of processes, call Get-Process and then pipe the results through Where-Object:

Get-Process | Where-Object {$_.handles -gt 200}

Take careful note of the syntax. To begin, the where clause is enclosed within curly braces; in addition, the $_ notation is used to represent the default object (that is, the object being transferred across the pipeline). Last, but surely not least, notice the comparison operator being used to indicate greater than: it’s -gt as opposed to >. Windows PowerShell does not use the standard arithmetic comparison operators; instead, it uses operators such as these:

  • -lt -- Less than

  • -le -- Less than or equal to

  • -gt -- Greater than

  • -ge -- Greater than or equal to

  • -eq -- Equal to

  • -ne -- Not equal to

  • -like - Like; uses wildcards for pattern matching

In other words, if we were looking for processes where handles were greater than or equal to 200 we’d use this command:

Get-Process | Where-Object {$_.handles -ge 200}

You can also use the -and and -or parameters to create even-more finitely targeted datasets. For example, suppose you’d like to return all the instances of the svchost process that are using more than 200 handles. All you have to do is include both criterion in your where clause, separating the two by using -and:

Get-Process | Where-Object {$_.handles -gt 200 -and $_.name -eq "svchost"}

Likewise, suppose you wanted a list of all the process that are using more than 200 handles or that have the name svchost (in other words, all processes using more than 200 handles as well as all the svchost processes, regardless of the number of handles they might be using). In that case, use the -or parameter to join the two parts of your where clause:

Get-Process | Where-Object {$_.handles -gt 200 -or $_.name -eq "svchost"}

Here’s another example; this one (using the Get-ChildItem cmdlet) shows you only the files in the folder C:\Scripts that are larger than 100,000 bytes:

Get-ChildItem c:\scripts | Where-Object {$_.length -gt 100000}

And let’s not forget the -like operator. This command returns all of the files in C:\Scripts that include the string test in the file name. Note the use of the two asterisks as wildcard characters:

Get-ChildItem c:\scripts | Where-Object {$_.name -like "*test*"}

Here’s the kind of data you can expect to get back:

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---          5/6/2006  10:24 PM      34198 test.csv
-a---         5/19/2006   9:11 AM       5918 test.htm
-a---         5/19/2006   8:16 AM      34226 test.log
-a---         5/19/2006   1:20 PM         65 test.ps1
-a---         5/20/2006   9:52 AM        150 test.psc1
-a---         5/20/2006   9:52 AM        150 test.psc1e.psc1
-a---         5/19/2006   1:27 PM        565 test.txt
-a---         4/17/2006   6:41 PM      24064 test.txt.doc
-a---         5/19/2006   1:45 PM       1971 test.vbs
-a---         5/17/2006   1:41 PM       9248 test.xls
-a---         5/19/2006   1:20 PM     628234 Test.xml
-a---          4/6/2006  10:26 PM        205 test_NODUPL.txt
Where-Object Aliases
  • where

728x90
728x90

 

https://docs.microsoft.com/en-us/sysinternals/downloads/ 

Sysinternals Utilities Index

PortMon
v3.03 (January 12, 2012)
Monitor serial and parallel port activity with this advanced monitoring tool. It knows about all standard serial and parallel IOCTLs and even shows you a portion of the data being sent and received. Version 3.x has powerful new UI enhancements and advanced filtering capabilities.

ProcDump
v9.0 (May 16, 2017)
This command-line utility is aimed at capturing process dumps of otherwise difficult to isolate and reproduce CPU spikes. It also serves as a general process dump creation utility and can also monitor and generate process dumps when a process has a hung window or unhandled exception.

Process Explorer
v16.21 (May 16, 2017)
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.

Process Monitor
v3.50 (Febryary 13, 2018)
Monitor file system, Registry, process, thread and DLL activity in real-time.

PsExec
v2.2 (June 29, 2016)
Execute processes on remote systems.

PsFile
v1.03 (June 29, 2016)
See what files are opened remotely.

PsGetSid
v1.45 (June 29, 2016)
Displays the SID of a computer or a user.

PsInfo
v1.78 (June 29, 2016)
Obtain information about a system.

PsKill
v1.16 (June 29, 2016)
Terminate local or remote processes.

PsPing
v2.01 (January 29, 2014)
Measure network performance.

PsList
v1.4 (June 29, 2016)
Show information about processes and threads.

PsLoggedOn
v1.35 (June 29, 2016)
Show users logged on to a system.

PsLogList
v2.8 (June 29, 2016)
Dump event log records.

PsPasswd
v1.24 (June 29, 2016)
Changes account passwords.

PsService
v2.25 (June 29, 2016)
View and control services.

PsShutdown
v2.52 (December 4, 2006)
Shuts down and optionally reboots a computer.

PsSuspend
v1.07 (June 29, 2016)
Suspend and resume processes.

PsTools
v2.45 (July 4, 2016)
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

RAMMap
v1.51 (May 31, 2018)
An advanced physical memory usage analysis utility that presents usage information in different ways on its several different tabs.

RegDelNull
v1.11 (July 4, 2016)
Scan for and delete Registry keys that contain embedded null-characters that are otherwise undeleteable by standard Registry-editing tools.

Registry Usage (RU.md)
v1.2 (July 4, 2016)
View the registry space usage for the specified registry key.

RegJump
v1.1 (April 20, 2015)
Jump to the registry path you specify in Regedit.

SDelete
v2.01 (February 13, 2018)
Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.

ShareEnum
v1.6 (November 1, 2006)
Scan file shares on your network and view their security settings to close security holes.

ShellRunas
v1.01 (February 28, 2008)
Launch programs as a different user via a convenient shell context-menu entry.

Sigcheck
v2.70 (October 19, 2018)
Dump file version information and verify that images on your system are digitally signed.

Streams
v1.6 (July 4, 2016)
Reveal NTFS alternate streams.

Strings
v2.52 (June 20, 2013)
Search for ANSI and UNICODE strings in binary images.

Sync
v2.2 (July 4, 2016)
Flush cached data to disk.

Sysmon
8.0 (July 5, 2018)
Monitors and reports key system activity via the Windows event log.

TCPView
v3.05 (July 25, 2011)
Active socket command-line viewer.

VMMap
v3.22 (October 19, 2018)
VMMap is a process virtual and physical memory analysis utility.

VolumeId
v2.1 (July 4, 2016)
Set Volume ID of FAT or NTFS drives.

Whois
v1.20 (November 19, 2017)
See who owns an Internet address.

WinObj
v2.22 (February 14, 2011)
The ultimate Object Manager namespace viewer is here.

ZoomIt
v4.5 (June 20, 2013)
Presentation utility for zooming and drawing on the screen.

728x90

'IT이야기 > Utility' 카테고리의 다른 글

Sysinternals Utilities-1  (0) 2018.12.13
[psping] TCP 연결 상태 체크  (0) 2018.12.13
필수 설치 프로그램  (0) 2018.11.16

+ Recent posts