Is it possible to get server roles and database roles in a same query/script?
Add an INSERT...SELECT query to get the server-level role memberships. The example below also uses QUOTENAME to properly handle the concatenated literals and identifiers.

DECLARE @DatabaseName SYSNAME,    
        @sql VARCHAR(1000);
DECLARE @ResultTable TABLE(DatabaseName VARCHAR(100), ServerName VARCHAR(100), Name VARCHAR(100), TypeDesc Varchar(100), DatabaseRole VARCHAR(100) );
DECLARE DatabaseCursor CURSOR 
     FOR SELECT Name FROM sys.databases;
OPEN databaseCursor;
FETCH NEXT FROM databaseCursor INTO @DatabaseName;
WHILE (@@FETCH_STATUS = 0)
BEGIN
    SET @sql ='SELECT ' + QUOTENAME(@DatabaseName, '''') + ' AS [Database],
                      ' + QUOTENAME(@@SERVERNAME,'''') +  'AS [Server Name],
                      logins.name Name,
                      logins.type_desc TypeDesc, 
                      roles.name RoleName
               FROM '+QUOTENAME(@databaseName) +'.sys.database_role_members rm
               INNER JOIN '+QUOTENAME(@databaseName) +'.sys.database_principals roles ON rm.role_principal_id = roles.principal_id
               INNER JOIN '+QUOTENAME(@databaseName) +'.sys.database_principals logins ON rm.member_principal_id = logins.principal_id';
    INSERT INTO @ResultTable EXEC(@sql);
    FETCH NEXT FROM databaseCursor INTO @databaseName;
END;
CLOSE databaseCursor; 
DEALLOCATE databaseCursor; 

--get server roles
INSERT INTO @ResultTable 
SELECT
      NULL
    , @@SERVERNAME
    , logins.name
    , logins.type_desc
    , roles.name AS RoleName
FROM master.sys.server_role_members AS rm
JOIN master.sys.server_principals AS roles ON rm.role_principal_id = roles.principal_id AND type_desc = N'SERVER_ROLE'
JOIN master.sys.server_principals AS logins ON rm.member_principal_id = logins.principal_id;

SELECT * FROM @ResultTable;