Skip to content

Archive for

How to disconnect RDP session remotely?

It is quite possible that you want to make a remote desktop connection to your server but was not able to because of maximum RDP connections reached. In this case you can make use of below method to identify the currently connected RDP users and disconnect/logoff any user (Possibly the session which shows as Disc).

1) Run below command pn command prompt from your local machine to check currently connected users to your server.

C:\Users\User>qwinsta /server:servername

SESSIONNAME USERNAME ID STATE TYPE DEVICE
services                                          0    Disc
console                                          1     Conn
v6958            30   Disc
rdp-tcp#1             v3357             32    Active    rdpwd
rdp-tcp                                         65536    Listen

2) Run below query to disconnect user v3357 with session id 32
C:\Users\user>rwinsta 32 /server:servername

3) Run command in step 1 again to verify that the session id 32 is now gone and you will be able to make RDP connection now.

C:\Users\user>qwinsta /server:servername

SESSIONNAME USERNAME ID STATE TYPE DEVICE
services                                           0   Disc
console                                            1   Conn
v6958             30  Disc
rdp-tcp                                            65536   Listen

Multiple schema in a Netezza database

Starting from NPS V7.0.3 we can now create multiple schemas in a database. When we enable this option (system wide setting and by default this setting is disabled), we can choose to either throw error when invalid schema is referenced in any query or throw warning and use default schema. Only admin or users with create/alter schema can create or make changes to schema.

In previous releases we used to have only one schema in a database and that is the database owner schema i.e. user who created the database becomes the default schema.

How to enable multiple schema mode:
To enable multiple schema support we have to edit /nz/data/postgresql.conf and look for parameter enable_schema_dbo_check. We have to uncomment this option and set it to 0, 1 or 2.
0 – Do not enable multiple schema support. Default value.
1 – Enable multiple schema but with limited support. In this case if someone uses invalid schema then system will throw warning and will use Default schema instead.
2 – Enable multiple schema in full mode and system will throw error if invali schema is referenced.

Once the chnages are saved in postgresql.conf issue nzstop and nzstart for the change to take effect.

To disable multi schema mode just set the value to 0 or comment out enable_schema_dbo_check option in postgresql.conf file. When you disable schema users can still reference schemas in the queries but will not be able to make any changes to the schema.